Make whois ephemeral outside staff channels

This commit is contained in:
Tarrgon
2025-05-29 09:56:27 -04:00
parent f8f326ec6b
commit 6197697932
3 changed files with 11 additions and 10 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
import { ApplicationIntegrationType, ChatInputCommandInteraction, Client, InteractionContextType, MessageFlags, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js';
import { handleWhoIsInteraction } from '../utils';
import { ApplicationIntegrationType, BitFieldResolvable, ChatInputCommandInteraction, Client, GuildBasedChannel, InteractionContextType, MessageFlags, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js';
import { channelIsInStaffCategory, handleWhoIsInteraction } from '../utils';
export default {
name: 'whois',
@@ -31,6 +31,6 @@ export default {
const idToUse = (user?.id ?? id) as string;
handleWhoIsInteraction(interaction, idToUse);
handleWhoIsInteraction(interaction, idToUse, !(await channelIsInStaffCategory(interaction.channel as GuildBasedChannel)));
}
};