diff --git a/src/commands-contextmenu/congratsmessage.ts b/src/commands-contextmenu/congratsmessage.ts index 1b05d2b..bf9d4ef 100644 --- a/src/commands-contextmenu/congratsmessage.ts +++ b/src/commands-contextmenu/congratsmessage.ts @@ -1,4 +1,4 @@ -import { ApplicationCommandType, ContextMenuCommandBuilder, InteractionContextType, PermissionFlagsBits, userMention } from "discord.js" +import { ApplicationCommandType, ContextMenuCommandBuilder, InteractionContextType, MessageFlags, PermissionFlagsBits, userMention } from "discord.js" import { IContextMenu } from "~/typings" export default { @@ -19,7 +19,7 @@ export default { if (!message) { interaction.reply({ content: "That user does not exist.", - ephemeral: true + flags: MessageFlags.Ephemeral }) return } @@ -36,7 +36,7 @@ export default { await interaction.reply({ content: "Sent a congrats message", - ephemeral: true + flags: MessageFlags.Ephemeral }) } } as IContextMenu diff --git a/src/commands-contextmenu/resetnick.ts b/src/commands-contextmenu/resetnick.ts index ab15554..18ebe57 100644 --- a/src/commands-contextmenu/resetnick.ts +++ b/src/commands-contextmenu/resetnick.ts @@ -1,4 +1,4 @@ -import { ApplicationCommandType, ContextMenuCommandBuilder, InteractionContextType, PermissionFlagsBits } from "discord.js" +import { ApplicationCommandType, ContextMenuCommandBuilder, InteractionContextType, MessageFlags, PermissionFlagsBits } from "discord.js" import { IContextMenu } from "~/typings" export default { @@ -19,7 +19,7 @@ export default { if (!target) { interaction.reply({ content: "That user does not exist.", - ephemeral: true + flags: MessageFlags.Ephemeral }) return } @@ -27,7 +27,7 @@ export default { if (target.id === interaction.user.id) { interaction.reply({ content: "You can't reset your own nickname.", - ephemeral: true + flags: MessageFlags.Ephemeral }) return } @@ -35,7 +35,7 @@ export default { if (!target.manageable) { interaction.reply({ content: "I cannot reset that user's nickname.", - ephemeral: true + flags: MessageFlags.Ephemeral }) return } @@ -46,7 +46,7 @@ export default { ) interaction.reply({ content: `Reset ${target.user.username}'s nickname.`, - ephemeral: true + flags: MessageFlags.Ephemeral }) } } as IContextMenu diff --git a/src/commands-contextmenu/updateuser.ts b/src/commands-contextmenu/updateuser.ts index 0aadac7..f7a0dfc 100644 --- a/src/commands-contextmenu/updateuser.ts +++ b/src/commands-contextmenu/updateuser.ts @@ -1,4 +1,4 @@ -import { ApplicationCommandType, ContextMenuCommandBuilder, InteractionContextType, PermissionFlagsBits, userMention } from "discord.js" +import { ApplicationCommandType, ContextMenuCommandBuilder, InteractionContextType, MessageFlags, PermissionFlagsBits, userMention } from "discord.js" import { getVerify } from "src/drizzle/functions.js" import { devMessage, embedColor, hypixelGuildID } from "~/config/options.js" import { waitingListRole } from "~/config/roles.js" @@ -19,7 +19,7 @@ export default { .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), async execute({ interaction }) { - await interaction.deferReply({ ephemeral: true }) + await interaction.deferReply({ flags: MessageFlags.Ephemeral }) const targetId = interaction.targetId const user = await interaction.guild!.members.fetch(targetId) diff --git a/src/commands/clear.ts b/src/commands/clear.ts index 231e4e9..224115c 100644 --- a/src/commands/clear.ts +++ b/src/commands/clear.ts @@ -1,4 +1,4 @@ -import { channelMention, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, TextChannel, userMention } from "discord.js" +import { channelMention, InteractionContextType, MessageFlags, PermissionFlagsBits, SlashCommandBuilder, TextChannel, userMention } from "discord.js" import { embedColor } from "~/config/options.js" import { ICommand } from "~/typings" import logToChannel from "~/utils/Functions/logtochannel.js" @@ -22,7 +22,7 @@ export default { .setContexts(InteractionContextType.Guild), async execute({ interaction }) { - await interaction.deferReply({ ephemeral: true }) + await interaction.deferReply({ flags: MessageFlags.Ephemeral }) const amount = interaction.options.getInteger("amount")! const channel = interaction.channel as TextChannel diff --git a/src/commands/help.ts b/src/commands/help.ts index 517f8a5..8410e8b 100644 --- a/src/commands/help.ts +++ b/src/commands/help.ts @@ -1,4 +1,4 @@ -import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ComponentType, InteractionContextType, SlashCommandBuilder } from "discord.js" +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ComponentType, InteractionContextType, MessageFlags, SlashCommandBuilder } from "discord.js" import { devMessage, embedColor } from "~/config/options.js" import { ICommand } from "~/typings" @@ -139,7 +139,7 @@ export default { if (page === 1) { await i.reply({ content: "You are already at the first page", - ephemeral: true + flags: MessageFlags.Ephemeral }) return } @@ -161,14 +161,14 @@ export default { await i.reply({ content: "Page " + page, - ephemeral: true + flags: MessageFlags.Ephemeral }) } if (i.customId === nextId) { if (page === maxPage) { await i.reply({ content: "You are already at the last page", - ephemeral: true + flags: MessageFlags.Ephemeral }) return } @@ -190,7 +190,7 @@ export default { await i.reply({ content: "Page " + page, - ephemeral: true + flags: MessageFlags.Ephemeral }) } }) diff --git a/src/commands/send.ts b/src/commands/send.ts index a77976c..3bd8fd5 100644 --- a/src/commands/send.ts +++ b/src/commands/send.ts @@ -1,4 +1,4 @@ -import { ChannelType, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, TextChannel } from "discord.js" +import { ChannelType, InteractionContextType, MessageFlags, PermissionFlagsBits, SlashCommandBuilder, TextChannel } from "discord.js" import { devMessage, embedColor } from "~/config/options.js" import { ICommand } from "~/typings" @@ -27,7 +27,7 @@ export default { .setContexts(InteractionContextType.Guild), async execute({ interaction }) { - await interaction.deferReply({ ephemeral: true }) + await interaction.deferReply({ flags: MessageFlags.Ephemeral }) const message = interaction.options.getString("message")! const channel = (interaction.options.getChannel("channel") || interaction.channel) as TextChannel diff --git a/src/commands/setnick.ts b/src/commands/setnick.ts index f5e8dce..ed00cec 100644 --- a/src/commands/setnick.ts +++ b/src/commands/setnick.ts @@ -1,4 +1,4 @@ -import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js" +import { GuildMember, InteractionContextType, MessageFlags, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js" import { devMessage, embedColor } from "~/config/options.js" import { ICommand } from "~/typings" import logToChannel from "~/utils/Functions/logtochannel.js" @@ -34,7 +34,7 @@ export default { if (!member.manageable) { interaction.reply({ content: "I cannot set the nickname for this user!", - ephemeral: true + flags: MessageFlags.Ephemeral }) return } @@ -74,7 +74,7 @@ export default { icon_url: interaction.guild!.iconURL() || undefined } }], - ephemeral: true + flags: MessageFlags.Ephemeral }) } } as ICommand diff --git a/src/commands/setup.ts b/src/commands/setup.ts index 3dbb333..101cc3a 100644 --- a/src/commands/setup.ts +++ b/src/commands/setup.ts @@ -4,6 +4,7 @@ import { ButtonStyle, ChannelType, InteractionContextType, + MessageFlags, PermissionFlagsBits, SlashCommandBuilder, TextChannel @@ -159,7 +160,7 @@ export default { await interaction.reply({ content: "Message sent", - ephemeral: true + flags: MessageFlags.Ephemeral }) } } as ICommand diff --git a/src/commands/slowmode.ts b/src/commands/slowmode.ts index ef3dce7..16fb0d5 100644 --- a/src/commands/slowmode.ts +++ b/src/commands/slowmode.ts @@ -1,4 +1,13 @@ -import { channelMention, ChannelType, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, TextChannel, userMention } from "discord.js" +import { + channelMention, + ChannelType, + InteractionContextType, + MessageFlags, + PermissionFlagsBits, + SlashCommandBuilder, + TextChannel, + userMention +} from "discord.js" import { devMessage, embedColor } from "~/config/options.js" import { ICommand } from "~/typings" import logToChannel from "~/utils/Functions/logtochannel.js" @@ -27,7 +36,7 @@ export default { .setContexts(InteractionContextType.Guild), async execute({ interaction }) { - await interaction.deferReply({ ephemeral: true }) + await interaction.deferReply({ flags: MessageFlags.Ephemeral }) const seconds = interaction.options.getInteger("seconds") ?? 5 const channel = (interaction.options.getChannel("channel") || interaction.channel) as TextChannel diff --git a/src/commands/staff/help.ts b/src/commands/staff/help.ts index 139afa9..dbe5108 100644 --- a/src/commands/staff/help.ts +++ b/src/commands/staff/help.ts @@ -1,4 +1,4 @@ -import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ComponentType } from "discord.js" +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ComponentType, MessageFlags } from "discord.js" import { devMessage, embedColor } from "~/config/options.js" import { SubCommmndClient } from "~/typings" @@ -126,7 +126,7 @@ const cmd: SubCommmndClient = async (interaction, client) => { if (page === 1) { await i.reply({ content: "You are already at the first page", - ephemeral: true + flags: MessageFlags.Ephemeral }) return } @@ -148,14 +148,14 @@ const cmd: SubCommmndClient = async (interaction, client) => { await i.reply({ content: "Page " + page, - ephemeral: true + flags: MessageFlags.Ephemeral }) } if (i.customId === nextId) { if (page === maxPage) { await i.reply({ content: "You are already at the last page", - ephemeral: true + flags: MessageFlags.Ephemeral }) return } @@ -177,7 +177,7 @@ const cmd: SubCommmndClient = async (interaction, client) => { await i.reply({ content: "Page " + page, - ephemeral: true + flags: MessageFlags.Ephemeral }) } }) diff --git a/src/components/buttons/guildapply.ts b/src/components/buttons/guildapply.ts index 7e72003..5df7a55 100644 --- a/src/components/buttons/guildapply.ts +++ b/src/components/buttons/guildapply.ts @@ -1,4 +1,4 @@ -import { ActionRowBuilder, ButtonBuilder, ButtonStyle, GuildMember, TextChannel } from "discord.js" +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, GuildMember, MessageFlags, TextChannel } from "discord.js" import { addGuildApp, getGuildApp } from "src/drizzle/functions.js" import { ignM, largeM, smallM } from "~/config/limitmessages.js" import { applicationsChannel, embedColor } from "~/config/options.js" @@ -12,7 +12,7 @@ export default { description: "Guild application button.", async execute({ interaction }) { - await interaction.deferReply({ ephemeral: true }) + await interaction.deferReply({ flags: MessageFlags.Ephemeral }) const user = interaction.member as GuildMember const guild = interaction.guild! const userRoles = user.roles.cache.map(role => role.id) diff --git a/src/components/buttons/guildinactivitylog.ts b/src/components/buttons/guildinactivitylog.ts index 51fcc8b..4fbdbf8 100644 --- a/src/components/buttons/guildinactivitylog.ts +++ b/src/components/buttons/guildinactivitylog.ts @@ -1,4 +1,4 @@ -import { ActionRowBuilder, ButtonBuilder, ButtonStyle, GuildMember, TextChannel } from "discord.js" +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, GuildMember, MessageFlags, TextChannel } from "discord.js" import { ignM, largeM, smallM } from "~/config/limitmessages.js" import { embedColor, inactivityLogChannel } from "~/config/options.js" import { inactivity } from "~/config/questions.js" @@ -19,7 +19,7 @@ export default { if (!userRoles.some(role => guildRoles.includes(role.id))) { await interaction.reply({ content: "Only guild members can use this button.", - ephemeral: true + flags: MessageFlags.Ephemeral }) return } @@ -48,14 +48,14 @@ export default { } catch (error) { await interaction.reply({ content: "Please enable your DMs.", - ephemeral: true + flags: MessageFlags.Ephemeral }) return } await interaction.reply({ content: "Please check your DMs.", - ephemeral: true + flags: MessageFlags.Ephemeral }) const input = await user.dmChannel!.awaitMessages({ diff --git a/src/components/buttons/inactiveapplicationaccept.ts b/src/components/buttons/inactiveapplicationaccept.ts index 801b35b..6c2b06f 100644 --- a/src/components/buttons/inactiveapplicationaccept.ts +++ b/src/components/buttons/inactiveapplicationaccept.ts @@ -1,3 +1,4 @@ +import { MessageFlags } from "discord.js" import { IButton } from "~/typings" export default { @@ -7,7 +8,7 @@ export default { async execute({ interaction }) { await interaction.reply({ content: "This button is currently disabled.", - ephemeral: true + flags: MessageFlags.Ephemeral }) } } as IButton diff --git a/src/components/buttons/inactiveapplicationdeny.ts b/src/components/buttons/inactiveapplicationdeny.ts index 888c1f8..fd81832 100644 --- a/src/components/buttons/inactiveapplicationdeny.ts +++ b/src/components/buttons/inactiveapplicationdeny.ts @@ -1,3 +1,4 @@ +import { MessageFlags } from "discord.js" import { IButton } from "~/typings" export default { @@ -7,7 +8,7 @@ export default { async execute({ interaction }) { await interaction.reply({ content: "This button is currently disabled.", - ephemeral: true + flags: MessageFlags.Ephemeral }) } } as IButton diff --git a/src/components/buttons/staffapply.ts b/src/components/buttons/staffapply.ts index d2142fc..5df8b65 100644 --- a/src/components/buttons/staffapply.ts +++ b/src/components/buttons/staffapply.ts @@ -1,4 +1,4 @@ -import { ActionRowBuilder, ButtonBuilder, ButtonStyle, GuildMember, TextChannel } from "discord.js" +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, GuildMember, MessageFlags, TextChannel } from "discord.js" import { addStaffApp, getSetting, getStaffApp } from "src/drizzle/functions.js" import { ignM, largeM } from "~/config/limitmessages.js" import { embedColor, staffApplicationsChannel } from "~/config/options.js" @@ -28,7 +28,7 @@ export default { } if (interaction.customId === "staffapply") { - await interaction.deferReply({ ephemeral: true }) + await interaction.deferReply({ flags: MessageFlags.Ephemeral }) if (user.user.id !== env.prod.dev) { if (status === "0") { diff --git a/src/components/buttons/waitingListUpdate.ts b/src/components/buttons/waitingListUpdate.ts index 209a807..228b5af 100644 --- a/src/components/buttons/waitingListUpdate.ts +++ b/src/components/buttons/waitingListUpdate.ts @@ -1,3 +1,4 @@ +import { MessageFlags } from "discord.js" import { getWaitingLists, removeWaitingList } from "src/drizzle/functions.js" import { hypixelGuildID } from "~/config/options.js" import { IButton } from "~/typings" @@ -8,7 +9,7 @@ export default { description: "Update the waiting list.", async execute({ interaction }) { - await interaction.deferReply({ ephemeral: true }) + await interaction.deferReply({ flags: MessageFlags.Ephemeral }) const user = interaction.user const message = interaction.message diff --git a/src/components/modals/verifyModal.ts b/src/components/modals/verifyModal.ts index 8c6a051..6925d5a 100644 --- a/src/components/modals/verifyModal.ts +++ b/src/components/modals/verifyModal.ts @@ -1,4 +1,4 @@ -import { GuildMember } from "discord.js" +import { GuildMember, MessageFlags } from "discord.js" import { addVerify, getVerify } from "src/drizzle/functions.js" import { devMessage, embedColor, hypixelGuildID } from "~/config/options.js" import { IModal } from "~/typings" @@ -11,7 +11,7 @@ export default { description: "Verify box.", async execute({ interaction }) { - await interaction.deferReply({ ephemeral: true }) + await interaction.deferReply({ flags: MessageFlags.Ephemeral }) const user = interaction.member as GuildMember const ign = interaction.fields.fields.get("verifyign")!.value diff --git a/src/utils/Events/button.ts b/src/utils/Events/button.ts index 37efd88..0cb5020 100644 --- a/src/utils/Events/button.ts +++ b/src/utils/Events/button.ts @@ -1,4 +1,4 @@ -import { Events } from "discord.js" +import { Events, MessageFlags } from "discord.js" import fs from "fs" import path from "path" import { embedColor } from "~/config/options.js" @@ -28,7 +28,7 @@ export default async function loadButtonEvents(client: Client, ft: FileType) { if (!button) { interaction.reply({ content: "Button logic not implemented. This is most likely an old button", - ephemeral: true + flags: MessageFlags.Ephemeral }) console.error(`No event matching ${interaction.customId} was found.`) return @@ -58,7 +58,7 @@ export default async function loadButtonEvents(client: Client, ft: FileType) { description: "There was an error while executing this button!", color: embedColor }], - ephemeral: true + flags: MessageFlags.Ephemeral }) } else { await interaction.editReply({ diff --git a/src/utils/Events/command.ts b/src/utils/Events/command.ts index cd49883..20d82ec 100644 --- a/src/utils/Events/command.ts +++ b/src/utils/Events/command.ts @@ -1,4 +1,4 @@ -import { Events } from "discord.js" +import { Events, MessageFlags } from "discord.js" import fs from "fs" import path from "path" import { embedColor } from "~/config/options.js" @@ -26,7 +26,7 @@ export default async function loadSlashCommandsEvents(client: Client, ft: FileTy if (!command) { interaction.reply({ content: "Command logic not implemented. This is most likely an old command", - ephemeral: true + flags: MessageFlags.Ephemeral }) console.error(`No command matching ${interaction.commandName} was found.`) return @@ -56,7 +56,7 @@ export default async function loadSlashCommandsEvents(client: Client, ft: FileTy description: "There was an error while executing this command!", color: embedColor }], - ephemeral: true + flags: MessageFlags.Ephemeral }) } else { await interaction.editReply({ diff --git a/src/utils/Events/contextmenu.ts b/src/utils/Events/contextmenu.ts index ff58166..4d1683e 100644 --- a/src/utils/Events/contextmenu.ts +++ b/src/utils/Events/contextmenu.ts @@ -1,4 +1,4 @@ -import { Events } from "discord.js" +import { Events, MessageFlags } from "discord.js" import fs from "fs" import path from "path" import { embedColor } from "~/config/options.js" @@ -26,7 +26,7 @@ export default async function loadContextMenuEvents(client: Client, ft: FileType if (!command) { interaction.reply({ content: "Command logic not implemented. This is most likely an old command", - ephemeral: true + flags: MessageFlags.Ephemeral }) console.error(`No command matching ${interaction.commandName} was found.`) return @@ -56,7 +56,7 @@ export default async function loadContextMenuEvents(client: Client, ft: FileType description: "There was an error while executing this contextmenu command!", color: embedColor }], - ephemeral: true + flags: MessageFlags.Ephemeral }) } else { await interaction.editReply({ diff --git a/src/utils/Events/modal.ts b/src/utils/Events/modal.ts index 78e6aef..205decc 100644 --- a/src/utils/Events/modal.ts +++ b/src/utils/Events/modal.ts @@ -1,4 +1,4 @@ -import { Events } from "discord.js" +import { Events, MessageFlags } from "discord.js" import fs from "fs" import path from "path" import { embedColor } from "~/config/options.js" @@ -25,7 +25,7 @@ export default async function loadModalEvents(client: Client, ft: FileType) { if (!modal) { interaction.reply({ content: "Modal logic not implemented. This is most likely an old modal", - ephemeral: true + flags: MessageFlags.Ephemeral }) console.error(`No modal matching ${interaction.customId} was found.`) return