aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/config/config.ts1
-rw-r--r--src/commands/config/features.ts2
-rw-r--r--src/commands/dev/servers.ts4
-rw-r--r--src/commands/dev/test.ts10
-rw-r--r--src/commands/info/guildInfo.ts2
-rw-r--r--src/commands/info/help.ts3
-rw-r--r--src/commands/info/links.ts3
-rw-r--r--src/commands/info/userInfo.ts2
-rw-r--r--src/commands/moulberry-bush/capes.ts2
-rw-r--r--src/commands/utilities/highlight-!.ts2
-rw-r--r--src/commands/utilities/reminders.ts2
11 files changed, 24 insertions, 9 deletions
diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts
index 2fae2fd..5346924 100644
--- a/src/commands/config/config.ts
+++ b/src/commands/config/config.ts
@@ -354,6 +354,7 @@ 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 2e7d623..7fa82a9 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/servers.ts b/src/commands/dev/servers.ts
index 173970b..378893e 100644
--- a/src/commands/dev/servers.ts
+++ b/src/commands/dev/servers.ts
@@ -1,6 +1,6 @@
import { BushCommand, ButtonPaginator, type BushMessage, type BushSlashMessage } from '#lib';
-import { APIEmbed } from 'discord-api-types';
-import { type Guild } from 'discord.js';
+import type { APIEmbed } from 'discord-api-types';
+import type { Guild } from 'discord.js';
export default class ServersCommand extends BushCommand {
public constructor() {
diff --git a/src/commands/dev/test.ts b/src/commands/dev/test.ts
index 669001f..9784412 100644
--- a/src/commands/dev/test.ts
+++ b/src/commands/dev/test.ts
@@ -1,5 +1,4 @@
import { BushCommand, ButtonPaginator, Shared, type BushMessage } from '#lib';
-// eslint-disable-next-line node/file-extension-in-import
import { Routes } from 'discord-api-types/rest/v9';
import {
ActionRow,
@@ -55,10 +54,15 @@ 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] });
@@ -78,6 +82,7 @@ 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] });
@@ -87,6 +92,7 @@ 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);
}
@@ -119,6 +125,7 @@ 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);
}
@@ -151,6 +158,7 @@ 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/guildInfo.ts b/src/commands/info/guildInfo.ts
index a4b7fb9..ed8a973 100644
--- a/src/commands/info/guildInfo.ts
+++ b/src/commands/info/guildInfo.ts
@@ -1,6 +1,6 @@
import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage, type OptionalArgType } from '#lib';
import assert from 'assert';
-import { GuildDefaultMessageNotifications, GuildExplicitContentFilter } from 'discord-api-types';
+import { GuildDefaultMessageNotifications, GuildExplicitContentFilter } from 'discord-api-types/v9';
import {
ApplicationCommandOptionType,
Embed,
diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts
index 2383566..ef3ef30 100644
--- a/src/commands/info/help.ts
+++ b/src/commands/info/help.ts
@@ -143,14 +143,17 @@ 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 25b040c..d9d5b8a 100644
--- a/src/commands/info/links.ts
+++ b/src/commands/info/links.ts
@@ -22,10 +22,13 @@ 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/commands/info/userInfo.ts b/src/commands/info/userInfo.ts
index 97cdc30..02a3be6 100644
--- a/src/commands/info/userInfo.ts
+++ b/src/commands/info/userInfo.ts
@@ -7,7 +7,7 @@ import {
type BushSlashMessage,
type BushUser
} from '#lib';
-import { APIApplication, TeamMemberMembershipState } from 'discord-api-types';
+import { TeamMemberMembershipState, type APIApplication } from 'discord-api-types/v9';
import {
ActivityType,
ApplicationCommandOptionType,
diff --git a/src/commands/moulberry-bush/capes.ts b/src/commands/moulberry-bush/capes.ts
index 032f62d..47a4ea6 100644
--- a/src/commands/moulberry-bush/capes.ts
+++ b/src/commands/moulberry-bush/capes.ts
@@ -1,6 +1,6 @@
import { BushCommand, ButtonPaginator, DeleteButton, type BushMessage, type OptionalArgType } from '#lib';
import assert from 'assert';
-import { APIEmbed } from 'discord-api-types';
+import { APIEmbed } from 'discord-api-types/v9';
import { ApplicationCommandOptionType, AutocompleteInteraction, PermissionFlagsBits } from 'discord.js';
import Fuse from 'fuse.js';
import got from 'got';
diff --git a/src/commands/utilities/highlight-!.ts b/src/commands/utilities/highlight-!.ts
index 332af03..687990f 100644
--- a/src/commands/utilities/highlight-!.ts
+++ b/src/commands/utilities/highlight-!.ts
@@ -1,6 +1,6 @@
import { BushCommand, Highlight, HighlightWord, type BushSlashMessage } from '#lib';
import { Flag, type ArgumentGeneratorReturn, type SlashOption } from 'discord-akairo';
-import { ApplicationCommandOptionType } from 'discord-api-types';
+import { ApplicationCommandOptionType } from 'discord-api-types/v9';
import { ApplicationCommandSubCommandData, AutocompleteInteraction, CacheType } from 'discord.js';
type Unpacked<T> = T extends (infer U)[] ? U : T;
diff --git a/src/commands/utilities/reminders.ts b/src/commands/utilities/reminders.ts
index 509da67..10206c1 100644
--- a/src/commands/utilities/reminders.ts
+++ b/src/commands/utilities/reminders.ts
@@ -1,6 +1,6 @@
import { BushCommand, ButtonPaginator, Reminder, type BushMessage, type BushSlashMessage } from '#lib';
import assert from 'assert';
-import { APIEmbed } from 'discord-api-types';
+import { APIEmbed } from 'discord-api-types/v9';
import { PermissionFlagsBits } from 'discord.js';
import { Op } from 'sequelize';