diff options
| author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-04-20 18:37:22 -0400 |
|---|---|---|
| committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-04-20 18:37:22 -0400 |
| commit | f01be2e3ce820e5737416180efa3e5852ece72c4 (patch) | |
| tree | a972af929940173e4e2d9f843124a8dfb293bc90 | |
| parent | bcb3dc5fcd21f7626d4c5a8c009dca5658a4436b (diff) | |
| download | tanzanite-f01be2e3ce820e5737416180efa3e5852ece72c4.tar.gz tanzanite-f01be2e3ce820e5737416180efa3e5852ece72c4.tar.bz2 tanzanite-f01be2e3ce820e5737416180efa3e5852ece72c4.zip | |
fix invite link, remove store channel, update to use builder methods, fix breaking changes
106 files changed, 875 insertions, 982 deletions
diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 1da6f41..7ea97f7 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -69,11 +69,6 @@ module.exports = { { paths: [ { - name: 'discord-api-types', - message: 'Please use discord-api-types/v9 instead.', - allowTypeImports: true - }, - { name: 'console', importNames: ['assert'], message: 'Import from the assert module instead.' diff --git a/.vscode/settings.json b/.vscode/settings.json index d2bbf71..53249d1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -96,5 +96,6 @@ "discord.removeDetails": false, "discord.removeLowerDetails": false, "discord.removeRemoteRepository": false, - "discord.removeTimestamp": false + "discord.removeTimestamp": false, + "cSpell.words": ["Embedbuilder"] } diff --git a/package.json b/package.json index 36b2f35..e5fb508 100644 --- a/package.json +++ b/package.json @@ -60,59 +60,59 @@ "@notenoughupdates/humanize-duration": "^4.0.1", "@notenoughupdates/simplify-number": "^1.0.1", "@notenoughupdates/wolfram-alpha-api": "^1.0.1", - "@sentry/integrations": "^6.19.3", - "@sentry/node": "^6.19.3", - "@sentry/tracing": "^6.19.3", + "@sentry/integrations": "^6.19.6", + "@sentry/node": "^6.19.6", + "@sentry/tracing": "^6.19.6", "canvas": "^2.9.1", "chalk": "^5.0.1", "common-tags": "^1.8.2", "deep-lock": "^1.0.0", "discord-akairo": "npm:@notenoughupdates/discord-akairo@dev", - "discord-api-types": "0.27.3", + "discord-api-types": "0.31.2", "discord.js": "npm:@notenoughupdates/discord.js@dev", "fuse.js": "^6.5.3", - "googleapis": "^99.0.0", + "googleapis": "^100.0.0", "got": "^12.0.3", "lodash": "^4.17.21", - "mathjs": "^10.4.2", - "nanoid": "^3.3.2", + "mathjs": "^10.5.0", + "nanoid": "^3.3.3", "node-os-utils": "^1.3.6", "numeral": "^2.0.6", "pg": "^8.7.3", "pg-hstore": "^2.3.4", - "prettier": "^2.6.1", + "prettier": "^2.6.2", "pretty-bytes": "^6.0.0", "rimraf": "^3.0.2", - "sequelize": "6.17.0", + "sequelize": "6.19.0", "tinycolor2": "^1.4.2", "typescript": "^4.6.3", "vm2": "^3.9.9" }, "devDependencies": { - "@sapphire/snowflake": "^3.2.0", - "@sentry/types": "^6.19.3", + "@sapphire/snowflake": "^3.2.1", + "@sentry/types": "^6.19.6", "@types/common-tags": "^1.8.1", "@types/eslint": "^8.4.1", "@types/express": "^4.17.13", - "@types/lodash": "^4.14.181", - "@types/node": "^17.0.23", + "@types/lodash": "^4.14.182", + "@types/node": "^17.0.25", "@types/node-os-utils": "^1.2.0", "@types/numeral": "^2.0.2", "@types/pg": "^8.6.5", - "@types/prettier": "^2.4.4", + "@types/prettier": "^2.6.0", "@types/rimraf": "^3.0.2", "@types/tinycolor2": "^1.4.3", "@types/validator": "^13.7.2", - "@typescript-eslint/eslint-plugin": "^5.17.0", - "@typescript-eslint/parser": "^5.17.0", - "eslint": "^8.12.0", + "@typescript-eslint/eslint-plugin": "^5.20.0", + "@typescript-eslint/parser": "^5.20.0", + "eslint": "^8.13.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-deprecation": "^1.3.2", - "eslint-plugin-import": "^2.25.4", + "eslint-plugin-import": "^2.26.0", "node-fetch": "^3.2.3" }, "packageManager": "yarn@3.2.0", "resolutions": { - "discord-api-types": "0.27.3" + "discord-api-types": "0.31.2" } } diff --git a/src/arguments/discordEmoji.ts b/src/arguments/discordEmoji.ts index 9c4991f..3edf123 100644 --- a/src/arguments/discordEmoji.ts +++ b/src/arguments/discordEmoji.ts @@ -1,5 +1,5 @@ import type { BushArgumentTypeCaster } from '#lib'; -import type { Snowflake } from 'discord-api-types/v9'; +import type { Snowflake } from 'discord-api-types/v10'; export const discordEmoji: BushArgumentTypeCaster<DiscordEmojiInfo | null> = (_, phrase) => { if (!phrase) return null; diff --git a/src/commands/admin/channelPermissions.ts b/src/commands/admin/channelPermissions.ts index 37610b3..c06b5fa 100644 --- a/src/commands/admin/channelPermissions.ts +++ b/src/commands/admin/channelPermissions.ts @@ -1,6 +1,6 @@ import { BushCommand, ButtonPaginator, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; import assert from 'assert'; -import { ApplicationCommandOptionType, Embed, PermissionFlagsBits } from 'discord.js'; +import { ApplicationCommandOptionType, EmbedBuilder, PermissionFlagsBits } from 'discord.js'; export default class ChannelPermissionsCommand extends BushCommand { public constructor() { @@ -88,9 +88,9 @@ export default class ChannelPermissionsCommand extends BushCommand { } const failure = failedChannels.map((c) => `<#${c.id}>`).join(' '); if (failure.length > 2000) { - const paginate: Embed[] = []; + const paginate: EmbedBuilder[] = []; for (let i = 0; i < failure.length; i += 4000) { - paginate.push(new Embed().setDescription(failure.substring(i, Math.min(failure.length, i + 4000)))); + paginate.push(new EmbedBuilder().setDescription(failure.substring(i, Math.min(failure.length, i + 4000)))); } const normalMessage = `Finished changing perms! Failed channels:`; return await ButtonPaginator.send(message, paginate, normalMessage); diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts index a90a267..c1dd142 100644 --- a/src/commands/config/config.ts +++ b/src/commands/config/config.ts @@ -12,19 +12,19 @@ import { import assert from 'assert'; import { type ArgumentGeneratorReturn, type SlashOption } from 'discord-akairo'; import { - ActionRow, + ActionRowBuilder, ApplicationCommandOptionType, - ButtonComponent, + ButtonBuilder, ButtonStyle, Channel, - Embed, + EmbedBuilder, Formatters, GuildMember, InteractionUpdateOptions, PermissionFlagsBits, Role, - SelectMenuComponent, - SelectMenuOption, + SelectMenuBuilder, + UnsafeSelectMenuOptionBuilder, User, type Message, type MessageComponentInteraction, @@ -285,18 +285,21 @@ export default class ConfigCommand extends BushCommand { case 'command_settingsSel': { if (!interaction.isSelectMenu()) return; - return interaction.update( + await interaction.update( await this.generateMessageOptions(message, interaction.values[0] as keyof typeof guildSettingsObj) ); + return; } case 'command_settingsBack': { if (!interaction.isButton()) return; - return interaction.update(await this.generateMessageOptions(message)); + await interaction.update(await this.generateMessageOptions(message)); + return; |
