Skip to content

Commit 1c08120

Browse files
committed
Resolve deprecation
1 parent 22b576b commit 1c08120

16 files changed

Lines changed: 54 additions & 39 deletions

File tree

src/commands/aoc.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
type CacheType,
33
type CommandInteraction,
4+
MessageFlags,
45
SlashCommandBuilder,
56
SlashCommandStringOption,
67
} from "discord.js";
@@ -174,15 +175,15 @@ export default class AoCCommand implements ApplicationCommand {
174175
if (!command.channel?.isTextBased()) {
175176
await command.reply({
176177
content: "Mach mal nicht hier",
177-
ephemeral: true,
178+
flags: MessageFlags.Ephemeral,
178179
});
179180
return;
180181
}
181182

182183
if (!aocConfig.enabled) {
183184
await command.reply({
184185
content: "AoC ist gerade nicht",
185-
ephemeral: true,
186+
flags: MessageFlags.Ephemeral,
186187
});
187188
return;
188189
}

src/commands/ehre.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
type CommandInteraction,
33
type InteractionReplyOptions,
4+
MessageFlags,
45
type MessagePayload,
56
type MessageReaction,
67
SlashCommandBuilder,
@@ -69,7 +70,7 @@ async function createEhreTable(
6970
],
7071
},
7172
],
72-
ephemeral: false,
73+
flags: MessageFlags.Ephemeral,
7374
};
7475
}
7576

src/commands/faulenzerping.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
ContextMenuCommandBuilder,
88
type ContextMenuCommandType,
99
type Message,
10+
MessageFlags,
1011
type Role,
1112
RoleSelectMenuBuilder,
1213
type RoleSelectMenuInteraction,
@@ -35,7 +36,7 @@ export default class FaulenzerPingCommand implements ApplicationCommand {
3536
if (!command.member || !context.roleGuard.isTrusted(command.member)) {
3637
await command.reply({
3738
content: "Du bist nicht berechtigt, diesen Command zu benutzen.",
38-
ephemeral: true,
39+
flags: MessageFlags.Ephemeral,
3940
});
4041
return;
4142
}
@@ -49,7 +50,7 @@ export default class FaulenzerPingCommand implements ApplicationCommand {
4950
.setPlaceholder("Rolle mit Faulenzern"),
5051
),
5152
],
52-
ephemeral: true,
53+
flags: MessageFlags.Ephemeral,
5354
});
5455

5556
let confirmation: RoleSelectMenuInteraction<CacheType>;

src/commands/gegenstand.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
type AutocompleteInteraction,
66
type ChatInputCommandInteraction,
77
type CommandInteraction,
8+
MessageFlags,
89
SlashCommandBuilder,
910
SlashCommandStringOption,
1011
SlashCommandSubcommandBuilder,
@@ -252,7 +253,7 @@ export default class GegenstandCommand implements ApplicationCommand {
252253
if (template.onUse === undefined) {
253254
await interaction.reply({
254255
content: "Dieser Gegenstand kann nicht benutzt werden.",
255-
ephemeral: true,
256+
flags: MessageFlags.Ephemeral,
256257
});
257258
return;
258259
}
@@ -269,7 +270,7 @@ export default class GegenstandCommand implements ApplicationCommand {
269270
sentry.captureException(error);
270271
await interaction.reply({
271272
content: "Beim Benutzen dieses Gegenstands ist ein Fehler aufgetreten.",
272-
ephemeral: true,
273+
flags: MessageFlags.Ephemeral,
273274
});
274275
}
275276

@@ -279,7 +280,7 @@ export default class GegenstandCommand implements ApplicationCommand {
279280

280281
await interaction.reply({
281282
content: "Ok.",
282-
ephemeral: true,
283+
flags: MessageFlags.Ephemeral,
283284
});
284285
}
285286

@@ -293,7 +294,7 @@ export default class GegenstandCommand implements ApplicationCommand {
293294
if (!item) {
294295
await interaction.reply({
295296
content: "Diesen Gegensand hast du nicht.",
296-
ephemeral: true,
297+
flags: MessageFlags.Ephemeral,
297298
});
298299
return;
299300
}
@@ -302,7 +303,7 @@ export default class GegenstandCommand implements ApplicationCommand {
302303
if (!template) {
303304
await interaction.reply({
304305
content: "Dieser Gegenstand ist unbekannt.",
305-
ephemeral: true,
306+
flags: MessageFlags.Ephemeral,
306307
});
307308
return;
308309
}

src/commands/google.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
type CommandInteraction,
33
type GuildMember,
4+
MessageFlags,
45
SlashCommandBuilder,
56
SlashCommandStringOption,
67
SlashCommandUserOption,
@@ -73,7 +74,7 @@ export default class GoogleCommand implements ApplicationCommand {
7374
const embed = buildEmbed(user, reply);
7475
await command.reply({
7576
embeds: [embed],
76-
ephemeral: false,
77+
flags: undefined,
7778
});
7879
}
7980
}

src/commands/info.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
ButtonStyle,
77
SlashCommandBuilder,
88
ComponentType,
9+
MessageFlags,
910
} from "discord.js";
1011

1112
import type { ApplicationCommand, MessageCommand } from "@/commands/command.js";
@@ -160,7 +161,7 @@ export default class InfoCommand implements ApplicationCommand, MessageCommand {
160161
const embed = await buildEmbed(command.guild, context.client.user.avatarURL() ?? undefined);
161162
await command.reply({
162163
embeds: [embed],
163-
ephemeral: true,
164+
flags: MessageFlags.Ephemeral,
164165
components: [
165166
{
166167
type: ComponentType.ActionRow,

src/commands/lauscher.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
ButtonBuilder,
99
ButtonStyle,
1010
ActionRowBuilder,
11+
MessageFlags,
1112
} from "discord.js";
1213

1314
import type { ApplicationCommand } from "@/commands/command.js";
@@ -242,7 +243,7 @@ export default class Lauscher implements ApplicationCommand {
242243
await setUserRegistration(command.user, activated);
243244
await command.reply({
244245
content: "Hab ik gemacht, dicker",
245-
ephemeral: true,
246+
flags: MessageFlags.Ephemeral,
246247
});
247248
return;
248249
}
@@ -253,7 +254,7 @@ export default class Lauscher implements ApplicationCommand {
253254
if (!interval) {
254255
await command.reply({
255256
content: "Das ist kein gültiger Zeitraum, bruder",
256-
ephemeral: true,
257+
flags: MessageFlags.Ephemeral,
257258
});
258259
return;
259260
}
@@ -263,7 +264,7 @@ export default class Lauscher implements ApplicationCommand {
263264
if (!stats?.tracks || stats.tracks.length === 0) {
264265
await command.reply({
265266
content: "Konnte keine Stats finden, bruder",
266-
ephemeral: true,
267+
flags: MessageFlags.Ephemeral,
267268
});
268269
return;
269270
}

src/commands/modcommands/ban.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {
22
type CommandInteraction,
3+
MessageFlags,
34
type PermissionsString,
45
SlashCommandBuilder,
56
SlashCommandIntegerOption,
@@ -65,7 +66,7 @@ export default class BanCommand implements ApplicationCommand, MessageCommand {
6566
if (!userAsGuildMember) {
6667
await command.reply({
6768
content: "Yo, der ist nicht auf dem Server",
68-
ephemeral: true,
69+
flags: MessageFlags.Ephemeral,
6970
});
7071
return;
7172
}
@@ -82,7 +83,7 @@ export default class BanCommand implements ApplicationCommand, MessageCommand {
8283
if (err) {
8384
await command.reply({
8485
content: err,
85-
ephemeral: true,
86+
flags: MessageFlags.Ephemeral,
8687
});
8788
return;
8889
}

src/commands/modcommands/ghostwriter.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {
22
type CommandInteraction,
3+
MessageFlags,
34
type PermissionsString,
45
SlashCommandBuilder,
56
SlashCommandStringOption,
@@ -39,7 +40,7 @@ export default class GhostwriterCommand implements ApplicationCommand {
3940
}
4041

4142
/*if (isMarcel(command.user)) {
42-
await command.reply({ content: "Ne alter, du machst wieder nur Scheiße", ephemeral: true });
43+
await command.reply({ content: "Ne alter, du machst wieder nur Scheiße", flags: MessageFlags.Ephemeral });
4344
const now = new Date();
4445
if (this.lastBlame !== null && (now.getTime() - this.lastBlame.getTime()) < 1 * 1000 * 60 * 60) {
4546
return;
@@ -68,6 +69,6 @@ export default class GhostwriterCommand implements ApplicationCommand {
6869
} else {
6970
await channel.send(content);
7071
}
71-
await command.reply({ content: "Okay mein Ghoete", ephemeral: true });
72+
await command.reply({ content: "Okay mein Ghoete", flags: MessageFlags.Ephemeral });
7273
}
7374
}

src/commands/modcommands/unban.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
SlashCommandBuilder,
33
SlashCommandUserOption,
44
ChatInputCommandInteraction,
5+
MessageFlags,
56
} from "discord.js";
67
import type { Message, CommandInteraction, PermissionsString } from "discord.js";
78

@@ -38,7 +39,7 @@ export default class UnbanCommand implements ApplicationCommand, MessageCommand
3839
if (!userAsGuildMember) {
3940
await command.reply({
4041
content: "Yo, der ist nicht auf dem Server",
41-
ephemeral: true,
42+
flags: MessageFlags.Ephemeral,
4243
});
4344
return;
4445
}
@@ -48,7 +49,7 @@ export default class UnbanCommand implements ApplicationCommand, MessageCommand
4849
if (err) {
4950
await command.reply({
5051
content: err,
51-
ephemeral: true,
52+
flags: MessageFlags.Ephemeral,
5253
});
5354
return;
5455
}

0 commit comments

Comments
 (0)