aboutsummaryrefslogtreecommitdiff
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
parentc66e80752db6dfe66c57501ce33848c771a9fc13 (diff)
downloadtanzanite-c2a0bfbeff572a6226919e7f6283fee4af411793.tar.gz
tanzanite-c2a0bfbeff572a6226919e7f6283fee4af411793.tar.bz2
tanzanite-c2a0bfbeff572a6226919e7f6283fee4af411793.zip
fix: remove ts-ingores
-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
-rw-r--r--yarn.lock52
12 files changed, 27 insertions, 56 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}`,
diff --git a/yarn.lock b/yarn.lock
index 23c0b0d..21e2cec 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -15,38 +15,38 @@ __metadata:
linkType: hard
"@discordjs/builders@npm:^0.13.0-dev":
- version: 0.13.0-dev.1644753796.3ae6f3c
- resolution: "@discordjs/builders@npm:0.13.0-dev.1644753796.3ae6f3c"
+ version: 0.13.0-dev.1644797188.0dfdb2c
+ resolution: "@discordjs/builders@npm:0.13.0-dev.1644797188.0dfdb2c"
dependencies:
"@sindresorhus/is": ^4.4.0
- discord-api-types: ^0.26.1
+ discord-api-types: ^0.27.0
ts-mixer: ^6.0.0
tslib: ^2.3.1
zod: ^3.11.6
- checksum: c9456389f7e0e0ccccaee0bc06924d6a92e47e941c334258b555c50c7d64cac72caafdbdbd913df62f107d21cd42d1f01f0dcbc75b9396a9ac3e3ea849cb501f
+ checksum: 675a19e9060f1938d0ad27e702abfc9de693e9957333e52fabc2eac1062dd14027c86802ba77d6ed96885af88f8960ba370c67b9fda8766f22b78b37c89ae58f
languageName: node
linkType: hard
"@discordjs/collection@npm:^0.6.0-dev":
- version: 0.6.0-dev.1644753793.3ae6f3c
- resolution: "@discordjs/collection@npm:0.6.0-dev.1644753793.3ae6f3c"
- checksum: 2ac348f3d5a0d9b3eb23e03db255b6de52a1dbdf8047061ff67adc83d7826a1c638de2d38007e20d87d76a7f1fb1a6050deed60ae9867916d1a66dc26a1cd1f8
+ version: 0.6.0-dev.1644797195.0dfdb2c
+ resolution: "@discordjs/collection@npm:0.6.0-dev.1644797195.0dfdb2c"
+ checksum: 74b09940eb92dc0695f7e370b92b46778f61512c6055a6aeffbecb2966ad2eac9a851b3c99f6343a3ed40e69dea05416299962a10bb022be14c9047e98f2eacc
languageName: node
linkType: hard
"@discordjs/rest@npm:^0.4.0-dev":
- version: 0.4.0-dev.1644753853.3ae6f3c
- resolution: "@discordjs/rest@npm:0.4.0-dev.1644753853.3ae6f3c"
+ version: 0.4.0-dev.1644797194.0dfdb2c
+ resolution: "@discordjs/rest@npm:0.4.0-dev.1644797194.0dfdb2c"
dependencies:
"@discordjs/collection": ^0.6.0-dev
"@sapphire/async-queue": ^1.2.0
"@sapphire/snowflake": ^3.1.0
"@types/node-fetch": ^2.5.12
- discord-api-types: ^0.26.1
+ discord-api-types: ^0.27.0
form-data: ^4.0.0
node-fetch: ^2.6.7
tslib: ^2.3.1
- checksum: 6871129ea94619e2f97282cad23fc3dd70580869cdbc4e76d773fc2d9e06944dc31580dc6f46bfccf4bb0b9bde844a68900c82222526b088181900eeffcf22fa
+ checksum: 5d6ac8e96a9c84257b355ffa19ee9d78f668c122251c2256afb0bbbcd5b2c363007367a89845169efd267e6e4820761510e4fe21eb7627cdc52ecee13f9216e3
languageName: node
linkType: hard
@@ -1290,46 +1290,46 @@ __metadata:
linkType: hard
"discord-akairo@npm:@notenoughupdates/discord-akairo@dev":
- version: 9.1.2-dev.1644723718.99887ac
- resolution: "@notenoughupdates/discord-akairo@npm:9.1.2-dev.1644723718.99887ac"
- checksum: 9a6abf342d4abadcf8ee6af3e20235399bcac215ad58d4cbacd6a6f39dbfd32e8601574a1561cb5b538e82ac05f47864cf8c4d2a3586505f47284a45efcb49c8
+ version: 9.1.3-dev.1644799330.8fbaf39
+ resolution: "@notenoughupdates/discord-akairo@npm:9.1.3-dev.1644799330.8fbaf39"
+ checksum: 85cedfc65ce7dfce1ae34fe8df2c99b66ff8376e7b51679da39cb5c31592bb386b06b51adbbe47c5b0b9f95c4fa7824986a24e4bb64d0287cc68b8bbb2715829
languageName: node
linkType: hard
"discord-api-types-next@npm:discord-api-types@next":
- version: 0.28.0-next.ed1f717.1644755287
- resolution: "discord-api-types@npm:0.28.0-next.ed1f717.1644755287"
- checksum: d33ee0264a6e3669951b9c3f157c7010802736dbd142937258dc34bf27bd71a98667c96fb65d61603429c606d5a19a9c017bdf74dfa4988ea9a2841a99b1dde0
+ version: 0.27.1-next.0ad06fc.1644796817
+ resolution: "discord-api-types@npm:0.27.1-next.0ad06fc.1644796817"
+ checksum: 08b192e8ec8ca120b53dc551a7006a8fe08e3cb51b71b8fbd81a1a8835df04b8861153993b70d18be4f0c2629325d231050b9a22ac81c99545b60df9a6f392ae
languageName: node
linkType: hard
-"discord-api-types@npm:0.27.0, discord-api-types@npm:^0.27.0":
+"discord-api-types@npm:0.27.0":
version: 0.27.0
resolution: "discord-api-types@npm:0.27.0"
checksum: 5a74a49ad7e57ea24e67d431de30cc7056d6d422b607c7d5a7dd35c683c8b87d70ec35a0d3929971adb411acc3df2bd6a77c1401ce30b29690bd1305e427265c
languageName: node
linkType: hard
-"discord-api-types@npm:^0.26.1":
- version: 0.26.1
- resolution: "discord-api-types@npm:0.26.1"
- checksum: e53bfa7589b24108e6b403dbe213da34c4592f72e2b8fde6800dcb6c703065887ecbd644e1cdf694e4c7796954bc51462ced868f26ec45dc1e0dc4fa8d3c723c
+"discord-api-types@npm:^0.27.0, discord-api-types@npm:^0.27.1":
+ version: 0.27.1
+ resolution: "discord-api-types@npm:0.27.1"
+ checksum: 5e3473eb01eb3e7ed2b1313513f165644dc70f1f64fb130a50b40394b41c97b1202f4de00b17df34a9f0916269595a091421955bb1e8dbd8e0475637512f2057
languageName: node
linkType: hard
"discord.js@npm:@notenoughupdates/discord.js@dev":
- version: 14.0.0-dev.1644769585.0143bcc
- resolution: "@notenoughupdates/discord.js@npm:14.0.0-dev.1644769585.0143bcc"
+ version: 14.0.0-dev.1644804511.4f2ea6d
+ resolution: "@notenoughupdates/discord.js@npm:14.0.0-dev.1644804511.4f2ea6d"
dependencies:
"@discordjs/builders": ^0.13.0-dev
"@discordjs/collection": ^0.6.0-dev
"@discordjs/rest": ^0.4.0-dev
"@sapphire/snowflake": ^3.1.0
"@types/ws": ^8.2.2
- discord-api-types: ^0.27.0
+ discord-api-types: ^0.27.1
node-fetch: ^2.6.7
ws: ^8.5.0
- checksum: 653276988184559a57ed5d07ae5955cd04300fa9245aa5820a9adb39aa538e3efc5f28174d09b8f255ff8d9d018c5cb404c6c3bd87d217fcdf7ef7bd316860b8
+ checksum: c7f404fdc080d2ef119d0c49f689424822a8db88d822c3816de8ceb5a66242bef2472e30c7f9f7492672bced2fff87ddf4a0e3a3862ed0dc75959f57f699815f
languageName: node
linkType: hard