aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-02-14 20:51:15 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-02-14 20:51:15 -0500
commitc2a0bfbeff572a6226919e7f6283fee4af411793 (patch)
treeb39c69d33c5467598c4599cd5b91776994a1ebb8 /src
parentc66e80752db6dfe66c57501ce33848c771a9fc13 (diff)
downloadtanzanite-c2a0bfbeff572a6226919e7f6283fee4af411793.tar.gz
tanzanite-c2a0bfbeff572a6226919e7f6283fee4af411793.tar.bz2
tanzanite-c2a0bfbeff572a6226919e7f6283fee4af411793.zip
fix: remove ts-ingores
Diffstat (limited to 'src')
-rw-r--r--src/commands/config/config.ts1
-rw-r--r--src/commands/config/features.ts2
-rw-r--r--src/commands/dev/test.ts9
-rw-r--r--src/commands/info/help.ts3
-rw-r--r--src/commands/info/links.ts3
-rw-r--r--src/lib/common/AutoMod.ts2
-rw-r--r--src/lib/common/ButtonPaginator.ts5
-rw-r--r--src/lib/common/ConfirmationPrompt.ts2
-rw-r--r--src/lib/common/DeleteButton.ts1
-rw-r--r--src/lib/common/util/Moderation.ts1
-rw-r--r--src/listeners/ws/INTERACTION_CREATE.ts2
11 files changed, 1 insertions, 30 deletions
diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts
index 5346924..2fae2fd 100644
--- a/src/commands/config/config.ts
+++ b/src/commands/config/config.ts
@@ -354,7 +354,6 @@ export default class ConfigCommand extends BushCommand {
};
const components = new ActionRow().addComponents(
- // @ts-expect-error: outdated @discord.js/builders
new ButtonComponent().setStyle(ButtonStyle.Primary).setCustomId('command_settingsBack').setLabel('Back')
);
settingsEmbed.setDescription(
diff --git a/src/commands/config/features.ts b/src/commands/config/features.ts
index 7fa82a9..2e7d623 100644
--- a/src/commands/config/features.ts
+++ b/src/commands/config/features.ts
@@ -90,7 +90,7 @@ export default class FeaturesCommand extends BushCommand {
.setMaxValues(1)
.setMinValues(1)
.setOptions(
- ...guildFeatures.map((f) =>
+ guildFeatures.map((f) =>
new SelectMenuOption().setLabel(guildFeaturesObj[f].name).setValue(f).setDescription(guildFeaturesObj[f].description)
)
)
diff --git a/src/commands/dev/test.ts b/src/commands/dev/test.ts
index 9784412..7bcc583 100644
--- a/src/commands/dev/test.ts
+++ b/src/commands/dev/test.ts
@@ -54,15 +54,10 @@ export default class TestCommand extends BushCommand {
if (['button', 'buttons'].includes(args?.feature?.toLowerCase())) {
const ButtonRow = new ActionRow().addComponents(
- // @ts-expect-error: outdated @discord.js/builders
new ButtonComponent().setStyle(ButtonStyle.Primary).setCustomId('primaryButton').setLabel('Primary'),
- // @ts-expect-error: outdated @discord.js/builders
new ButtonComponent().setStyle(ButtonStyle.Secondary).setCustomId('secondaryButton').setLabel('Secondary'),
- // @ts-expect-error: outdated @discord.js/builders
new ButtonComponent().setStyle(ButtonStyle.Success).setCustomId('successButton').setLabel('Success'),
- // @ts-expect-error: outdated @discord.js/builders
new ButtonComponent().setStyle(ButtonStyle.Danger).setCustomId('dangerButton').setLabel('Danger'),
- // @ts-expect-error: outdated @discord.js/builders
new ButtonComponent().setStyle(ButtonStyle.Link).setLabel('Link').setURL('https://www.youtube.com/watch?v=dQw4w9WgXcQ')
);
return await message.util.reply({ content: 'buttons', components: [ButtonRow] });
@@ -82,7 +77,6 @@ export default class TestCommand extends BushCommand {
.setTitle('Title');
const buttonRow = new ActionRow().addComponents(
- // @ts-expect-error: outdated @discord.js/builders
new ButtonComponent().setStyle(ButtonStyle.Link).setLabel('Link').setURL('https://google.com/')
);
return await message.util.reply({ content: 'Test', embeds: [embed], components: [buttonRow] });
@@ -92,7 +86,6 @@ export default class TestCommand extends BushCommand {
const row = new ActionRow();
for (let b = 1; b <= 5; b++) {
const id = (a + 5 * (b - 1)).toString();
- // @ts-expect-error: outdated @discord.js/builders
const button = new ButtonComponent().setStyle(ButtonStyle.Primary).setCustomId(id).setLabel(id);
row.addComponents(button);
}
@@ -125,7 +118,6 @@ export default class TestCommand extends BushCommand {
const row = new ActionRow();
for (let b = 1; b <= 5; b++) {
const id = (a + 5 * (b - 1)).toString();
- // @ts-expect-error: outdated @discord.js/builders
const button = new ButtonComponent().setStyle(ButtonStyle.Secondary).setCustomId(id).setLabel(id);
row.addComponents(button);
}
@@ -158,7 +150,6 @@ export default class TestCommand extends BushCommand {
content: 'Click for modal',
components: [
new ActionRow().addComponents(
- // @ts-expect-error: outdated @discord.js/builders
new ButtonComponent().setStyle(ButtonStyle.Primary).setLabel('Modal').setCustomId('test;modal')
)
]
diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts
index ef3ef30..2383566 100644
--- a/src/commands/info/help.ts
+++ b/src/commands/info/help.ts
@@ -143,17 +143,14 @@ export default class HelpCommand extends BushCommand {
const row = new ActionRow();
if (!client.config.isDevelopment && !client.guilds.cache.some((guild) => guild.ownerId === message.author.id)) {
- // @ts-expect-error: outdated @discord.js/builders
row.addComponents(new ButtonComponent().setStyle(ButtonStyle.Link).setLabel('Invite Me').setURL(util.invite));
}
if (!client.guilds.cache.get(client.config.supportGuild.id)?.members.cache.has(message.author.id)) {
row.addComponents(
- // @ts-expect-error: outdated @discord.js/builders
new ButtonComponent().setStyle(ButtonStyle.Link).setLabel('Support Server').setURL(client.config.supportGuild.invite)
);
}
if (packageDotJSON?.repository)
- // @ts-expect-error: outdated @discord.js/builders
row.addComponents(new ButtonComponent().setStyle(ButtonStyle.Link).setLabel('GitHub').setURL(packageDotJSON.repository));
else void message.channel?.send('Error importing package.json, please report this to my developer.');
diff --git a/src/commands/info/links.ts b/src/commands/info/links.ts
index d9d5b8a..25b040c 100644
--- a/src/commands/info/links.ts
+++ b/src/commands/info/links.ts
@@ -22,13 +22,10 @@ export default class LinksCommand extends BushCommand {
public override async exec(message: BushMessage | BushSlashMessage) {
const buttonRow = new ActionRow();
if (!client.config.isDevelopment || message.author.isOwner()) {
- // @ts-expect-error: outdated @discord.js/builders
buttonRow.addComponents(new ButtonComponent().setStyle(ButtonStyle.Link).setLabel('Invite Me').setURL(util.invite));
}
buttonRow.addComponents(
- // @ts-expect-error: outdated @discord.js/builders
new ButtonComponent().setStyle(ButtonStyle.Link).setLabel('Support Server').setURL(client.config.supportGuild.invite),
- // @ts-expect-error: outdated @discord.js/builders
new ButtonComponent().setStyle(ButtonStyle.Link).setLabel('GitHub').setURL(packageDotJSON.repository)
);
return await message.util.reply({ content: 'Here are some useful links:', components: [buttonRow] });
diff --git a/src/lib/common/AutoMod.ts b/src/lib/common/AutoMod.ts
index 9024260..784085d 100644
--- a/src/lib/common/AutoMod.ts
+++ b/src/lib/common/AutoMod.ts
@@ -156,7 +156,6 @@ export class AutoMod {
? [
new ActionRow().addComponents(
new ButtonComponent()
- // @ts-expect-error: outdated @discord.js/builders
.setStyle(ButtonStyle.Danger)
.setLabel('Ban User')
.setCustomId(`automod;ban;${this.message.author.id};everyone mention and scam phrase`)
@@ -278,7 +277,6 @@ export class AutoMod {
? [
new ActionRow().addComponents(
new ButtonComponent()
- // @ts-expect-error: outdated @discord.js/builders
.setStyle(ButtonStyle.Danger)
.setLabel('Ban User')
.setCustomId(`automod;ban;${this.message.author.id};${highestOffence.reason}`)
diff --git a/src/lib/common/ButtonPaginator.ts b/src/lib/common/ButtonPaginator.ts
index 09e059c..a289855 100644
--- a/src/lib/common/ButtonPaginator.ts
+++ b/src/lib/common/ButtonPaginator.ts
@@ -173,31 +173,26 @@ export class ButtonPaginator {
protected getPaginationRow(disableAll = false): ActionRow<ActionRowComponent> {
return new ActionRow().addComponents(
new ButtonComponent()
- // @ts-expect-error: outdated @discord.js/builders
.setStyle(ButtonStyle.Primary)
.setCustomId('paginate_beginning')
.setEmoji(PaginateEmojis.BEGINNING)
.setDisabled(disableAll || this.curPage === 0),
new ButtonComponent()
- // @ts-expect-error: outdated @discord.js/builders
.setStyle(ButtonStyle.Primary)
.setCustomId('paginate_back')
.setEmoji(PaginateEmojis.BACK)
.setDisabled(disableAll || this.curPage === 0),
new ButtonComponent()
- // @ts-expect-error: outdated @discord.js/builders
.setStyle(ButtonStyle.Primary)
.setCustomId('paginate_stop')
.setEmoji(PaginateEmojis.STOP)
.setDisabled(disableAll),
new ButtonComponent()
- // @ts-expect-error: outdated @discord.js/builders
.setStyle(ButtonStyle.Primary)
.setCustomId('paginate_next')
.setEmoji(PaginateEmojis.FORWARD)
.setDisabled(disableAll || this.curPage === this.embeds.length - 1),
new ButtonComponent()
- // @ts-expect-error: outdated @discord.js/builders
.setStyle(ButtonStyle.Primary)
.setCustomId('paginate_end')
.setEmoji(PaginateEmojis.END)
diff --git a/src/lib/common/ConfirmationPrompt.ts b/src/lib/common/ConfirmationPrompt.ts
index 1f027ef..bd11c5c 100644
--- a/src/lib/common/ConfirmationPrompt.ts
+++ b/src/lib/common/ConfirmationPrompt.ts
@@ -31,13 +31,11 @@ export class ConfirmationPrompt {
this.messageOptions.components = [
new ActionRow().addComponents(
new ButtonComponent()
- // @ts-expect-error: outdated @discord.js/builders
.setStyle(ButtonStyle.Primary)
.setCustomId('confirmationPrompt_confirm')
.setEmoji({ id: util.emojisRaw.successFull, name: 'successFull', animated: false })
.setLabel('Yes'),
new ButtonComponent()
- // @ts-expect-error: outdated @discord.js/builders
.setStyle(ButtonStyle.Danger)
.setCustomId('confirmationPrompt_cancel')
.setEmoji({ id: util.emojisRaw.errorFull, name: 'errorFull', animated: false })
diff --git a/src/lib/common/DeleteButton.ts b/src/lib/common/DeleteButton.ts
index f2e0ff3..cf3b416 100644
--- a/src/lib/common/DeleteButton.ts
+++ b/src/lib/common/DeleteButton.ts
@@ -68,7 +68,6 @@ export class DeleteButton {
this.messageOptions.components = [
new ActionRow().addComponents(
new ButtonComponent()
- // @ts-expect-error: outdated @discord.js/builders
.setStyle(ButtonStyle.Primary)
.setCustomId('paginate__stop')
.setEmoji(PaginateEmojis.STOP)
diff --git a/src/lib/common/util/Moderation.ts b/src/lib/common/util/Moderation.ts
index c2236ab..04ccb31 100644
--- a/src/lib/common/util/Moderation.ts
+++ b/src/lib/common/util/Moderation.ts
@@ -271,7 +271,6 @@ export class Moderation {
new ActionRow({
type: ComponentType.ActionRow,
components: [
- // @ts-expect-error: outdated @discord.js/builders
new ButtonComponent({
custom_id: `appeal;${this.punishmentToPresentTense(options.punishment)};${
options.guild.id
diff --git a/src/listeners/ws/INTERACTION_CREATE.ts b/src/listeners/ws/INTERACTION_CREATE.ts
index fd79529..f44c06c 100644
--- a/src/listeners/ws/INTERACTION_CREATE.ts
+++ b/src/listeners/ws/INTERACTION_CREATE.ts
@@ -224,14 +224,12 @@ export default class WsInteractionCreateListener extends BushListener {
new ActionRow({
type: 1,
components: [
- // @ts-expect-error: outdated @discord.js/builders
new ButtonComponent({
type: 2,
custom_id: `appeal_accept;${punishment};${guildId};${userId};${modlogCase}`,
label: 'Accept',
style: 3 /* Success */
}).toJSON(),
- // @ts-expect-error: outdated @discord.js/builders
new ButtonComponent({
type: 2,
custom_id: `appeal_deny;${punishment};${guildId};${userId};${modlogCase}`,