mirror of
https://github.com/nx-bat/discordbot-ng.git
synced 2026-09-22 10:29:10 -04:00
15 lines
695 B
TypeScript
15 lines
695 B
TypeScript
import { CommandInteraction, MessageFlags } from 'discord.js';
|
|
import { config } from '../config';
|
|
import { Database } from '../shared/Database';
|
|
import { getE621Alts } from './alt-utils';
|
|
|
|
export async function handleWhoIsInteraction(interaction: CommandInteraction, idToUse: string, ephemeral = false) {
|
|
if (ephemeral) await interaction.deferReply({ flags: [MessageFlags.Ephemeral] });
|
|
else await interaction.deferReply();
|
|
|
|
if (!interaction.guild) return interaction.editReply('This command must be used in a server');
|
|
|
|
const content = await getE621Alts(idToUse, interaction.guild!);
|
|
|
|
interaction.editReply(`<@${idToUse}>'s e621 and discord account(s):\n${content}`);
|
|
} |