Skip to content

Commit 8d4a82e

Browse files
Techbot121Meta Construct
authored andcommitted
use flags, as the ephemeral prop is deprecated
1 parent 175c275 commit 8d4a82e

File tree

9 files changed

+10
-10
lines changed

9 files changed

+10
-10
lines changed

app/services/discord/modules/commands/DeepL.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export const MenuDeeplCommand: MenuCommand = {
220220
description: `
221221
\`\`\`\n${msg.content}\`\`\`\n**${res.data.translations[0].detected_source_language} -> EN**\n\`\`\`\n${res.data.translations[0].text}\`\`\``,
222222
};
223-
await ctx.reply({ embeds: [embed], ephemeral: true });
223+
await ctx.reply({ embeds: [embed], flags: Discord.MessageFlags.Ephemeral });
224224
} else {
225225
await ctx.reply(
226226
EphemeralResponse("Something went wrong while trying to translate.")

app/services/discord/modules/commands/GetStickerUrl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const MenuGetStickerUrlCommand: MenuCommand = {
2424
}`
2525
)
2626
.join("\n"),
27-
ephemeral: true,
27+
flags: Discord.MessageFlags.Ephemeral,
2828
});
2929
},
3030
};

app/services/discord/modules/commands/GetVoiceMessageUrl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const MenuGetVoiceMessageUrlCommand: MenuCommand = {
1919
}
2020
await ctx.reply({
2121
content: voiceUris.url,
22-
ephemeral: true,
22+
flags: Discord.MessageFlags.Ephemeral,
2323
});
2424
},
2525
};

app/services/discord/modules/commands/Role.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export const SlashRoleCommand: SlashCommand = {
311311
],
312312
},
313313
execute: async ctx => {
314-
await ctx.deferReply({ ephemeral: true });
314+
await ctx.deferReply({ flags: Discord.MessageFlags.Ephemeral });
315315
const cmd = ctx.options.getSubcommand();
316316
try {
317317
switch (cmd) {

app/services/discord/modules/commands/TempVoiceChannel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const SlashVoiceCommand: SlashCommand = {
4343
return;
4444
}
4545

46-
await ctx.deferReply({ ephemeral: true });
46+
await ctx.deferReply({ flags: Discord.MessageFlags.Ephemeral });
4747

4848
try {
4949
const channel = await bot.getGuild()?.channels.create({

app/services/discord/modules/commands/WhyBan.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const SlashWhyBanCommand: SlashCommand = {
2020
},
2121

2222
async execute(ctx, bot) {
23-
await ctx.deferReply({ ephemeral: true });
23+
await ctx.deferReply({ flags: Discord.MessageFlags.Ephemeral });
2424
const banService = await bot.container.getService("Bans");
2525
const ban = await banService.getBan(ctx.options.getString("query", true));
2626
if (!ban) {

app/services/discord/modules/commands/developer/ManageMediaLinks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const SlashManageMediaLinks: SlashCommand = {
2828
switch (cmd) {
2929
case "remove":
3030
const url = ctx.options.getString("url", true);
31-
await ctx.deferReply({ ephemeral: true });
31+
await ctx.deferReply({ flags: Discord.MessageFlags.Ephemeral });
3232
const db = await (await bot.container.getService("SQL")).getLocalDatabase();
3333
if (!db) {
3434
ctx.followUp(EphemeralResponse("Could not get the DB :("));
@@ -70,7 +70,7 @@ export const MenuManageMediaLinksCommand: MenuCommand = {
7070
await ctx.reply(EphemeralResponse("this doesn't look like a media link"));
7171
return;
7272
}
73-
await ctx.deferReply({ ephemeral: true });
73+
await ctx.deferReply({ flags: Discord.MessageFlags.Ephemeral });
7474
const db = await (await bot.container.getService("SQL")).getLocalDatabase();
7575
if (!db) {
7676
ctx.followUp(EphemeralResponse("Could not get the DB :("));

app/services/discord/modules/commands/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { SlashWhyBanCommand } from "./WhyBan";
2323
import Discord, { REST } from "discord.js";
2424

2525
export function EphemeralResponse(content: string): Discord.InteractionReplyOptions {
26-
return { content: content, ephemeral: true };
26+
return { content: content, flags: Discord.MessageFlags.Ephemeral };
2727
}
2828

2929
export const slashCommands = [

app/services/gamebridge/payloads/AdminNotifyPayload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default class AdminNotifyPayload extends Payload {
2929
if (!(await server.discord.isAllowed(ctx.user))) {
3030
await ctx.reply({
3131
content: "you're not allowed to use this button...",
32-
ephemeral: true,
32+
flags: Discord.MessageFlags.Ephemeral,
3333
});
3434
return;
3535
}

0 commit comments

Comments
 (0)