Skip to content

Commit

Permalink
suppress eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
IRONM00N committed Feb 2, 2024
1 parent 0226cc4 commit cadcb4e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/common/ConfirmationPrompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export class ConfirmationPrompt {
time: 300_000
});

// eslint-disable-next-line @typescript-eslint/no-misused-promises
collector.on('collect', async (interaction: MessageComponentInteraction) => {
await interaction.deferUpdate().catch(() => {});
if (interaction.user.id == this.message.author.id || this.message.client.config.owners.includes(interaction.user.id)) {
Expand All @@ -57,6 +58,7 @@ export class ConfirmationPrompt {
}
});

// eslint-disable-next-line @typescript-eslint/no-misused-promises
collector.on('end', async () => {
await msg.delete().catch(() => {});
if (!responded) resolve(false);
Expand Down
2 changes: 2 additions & 0 deletions lib/common/DeleteButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ export class DeleteButton {
time: 300000
});

// eslint-disable-next-line @typescript-eslint/no-misused-promises
collector.on('collect', async (interaction: MessageComponentInteraction) => {
await interaction.deferUpdate().catch(() => undefined);
if (interaction.user.id == this.message.author.id || this.message.client.config.owners.includes(interaction.user.id)) {
if (msg.deletable && !CommandUtil.deletedMessages.has(msg.id)) await msg.delete();
}
});

// eslint-disable-next-line @typescript-eslint/no-misused-promises
collector.on('end', async () => {
this.updateComponents(true, true);
await msg.edit(<string | MessagePayload | MessageEditOptions>this.messageOptions).catch(() => undefined);
Expand Down
1 change: 1 addition & 0 deletions src/commands/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ export default class ConfigCommand extends BotCommand {
filter: (i) => i.guildId === msg.guildId && i.message?.id === msg.id
});

// eslint-disable-next-line @typescript-eslint/no-misused-promises
collector.on('collect', async (interaction: MessageComponentInteraction) => {
if (interaction.user.id === message.author.id || this.client.config.owners.includes(interaction.user.id)) {
assert(message.inGuild());
Expand Down
2 changes: 2 additions & 0 deletions src/commands/config/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default class FeaturesCommand extends BotCommand {
filter: (i) => i.guildId === msg.guildId && i.message?.id === msg.id
});

// eslint-disable-next-line @typescript-eslint/no-misused-promises
collector.on('collect', async (interaction: StringSelectMenuInteraction) => {
if (interaction.user.id === message.author.id || this.client.config.owners.includes(interaction.user.id)) {
assert(message.inGuild());
Expand All @@ -71,6 +72,7 @@ export default class FeaturesCommand extends BotCommand {
}
});

// eslint-disable-next-line @typescript-eslint/no-misused-promises
collector.on('end', async () => {
await msg
.edit({ components: [this.generateComponents(guildFeaturesArr, false, !message.author.isOwner())] })
Expand Down

0 comments on commit cadcb4e

Please sign in to comment.