diff options
22 files changed, 406 insertions, 139 deletions
diff --git a/package.json b/package.json index cff65c0..c5de396 100644 --- a/package.json +++ b/package.json @@ -194,4 +194,4 @@ "unplugged": true } } -}
\ No newline at end of file +} diff --git a/src/commands/admin/channelPermissions.ts b/src/commands/admin/channelPermissions.ts index 3b8c157..993e811 100644 --- a/src/commands/admin/channelPermissions.ts +++ b/src/commands/admin/channelPermissions.ts @@ -81,8 +81,8 @@ export default class ChannelPermissionsCommand extends BushCommand { const failure = failedChannels.map((e) => `<#${e.id}>`).join(' '); if (failure.length > 2000) { const paginate: MessageEmbed[] = []; - for (let i = 0; i < failure.length; i += 2000) { - paginate.push(new MessageEmbed().setDescription(failure.substring(i, Math.min(failure.length, i + 2000)))); + for (let i = 0; i < failure.length; i += 4000) { + paginate.push(new MessageEmbed().setDescription(failure.substring(i, Math.min(failure.length, i + 4000)))); } const normalMessage = `Finished changing perms! Failed channels:`; return await client.util.buttonPaginate(message, paginate, normalMessage); diff --git a/src/commands/config/customAutomodPhrases.ts b/src/commands/config/customAutomodPhrases.ts new file mode 100644 index 0000000..7735939 --- /dev/null +++ b/src/commands/config/customAutomodPhrases.ts @@ -0,0 +1,64 @@ +// import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; + +// export default class CustomAutomodPhrasesCommand extends BushCommand { +// public constructor() { +// super('customAutomodPhrases', { +// aliases: ['customautomodphrases'], +// category: 'config', +// description: { +// content: 'Configure additional phrases to be used for automod.', +// usage: 'customautomodphrases <requiredArg> [optionalArg]', +// examples: ['template 1 2'] +// }, +// args: [ +// { +// id: 'required_argument', +// type: 'string', +// prompt: { +// start: 'What would you like to set your first argument to be?', +// retry: '{error} Pick a valid argument.', +// optional: false +// } +// }, +// { +// id: 'optional_argument', +// type: 'string', +// prompt: { +// start: 'What would you like to set your second argument to be?', +// retry: '{error} Pick a valid argument.', +// optional: true +// } +// } +// ], +// slash: false, //set this to true +// slashOptions: [ +// { +// name: 'required_argument', +// description: 'What would you like to set your first argument to be?', +// type: 'STRING', +// required: true +// }, +// { +// name: 'optional_argument', +// description: 'What would you like to set your second argument to be?', +// type: 'STRING', +// required: false +// } +// ], +// superUserOnly: true, +// ownerOnly: true, +// channel: 'guild', +// hidden: true, +// clientPermissions: ['SEND_MESSAGES'], +// userPermissions: ['SEND_MESSAGES'] +// }); +// } + +// public override async exec( +// message: BushMessage | BushSlashMessage, +// args: { required_argument: string; optional_argument: string } +// ): Promise<unknown> { +// return await message.util.reply(`${util.emojis.error} Do not use the template command.`); +// args; +// } +// } diff --git a/src/commands/config/levelRoles.ts b/src/commands/config/levelRoles.ts new file mode 100644 index 0000000..df63914 --- /dev/null +++ b/src/commands/config/levelRoles.ts @@ -0,0 +1,61 @@ +import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; + +export default class LevelRolesCommand extends BushCommand { + public constructor() { + super('levelRole', { + aliases: ['levelrole', 'levelroles', 'lr'], + category: 'config', + description: { + content: 'Command description.', + usage: 'levelrole <role> <level>', + examples: ['levelrole 1 2'] + }, + args: [ + { + id: 'role', + type: 'role', + prompt: { + start: 'What would you like to set your first argument to be?', + retry: '{error} Pick a valid argument.', + optional: false + } + }, + { + id: 'level', + type: 'integer', + prompt: { + start: 'What would you like to set your second argument to be?', + retry: '{error} Pick a valid argument.', + optional: false + } + } + ], + slash: true, + slashOptions: [ + { + name: 'role', + description: 'What would you like to set your first argument to be?', + type: 'STRING', + required: true + }, + { + name: 'level', + description: 'What would you like to set your second argument to be?', + type: 'STRING', + required: true + } + ], + channel: 'guild', + clientPermissions: ['SEND_MESSAGES'], + userPermissions: ['SEND_MESSAGES', 'MANAGE_GUILD', 'MANAGE_ROLES'] + }); + } + + public override async exec( + message: BushMessage | BushSlashMessage, + args: { required_argument: string; optional_argument: string } + ): Promise<unknown> { + return await message.util.reply(`${util.emojis.error} Do not use the template command.`); + args; + } +} diff --git a/src/commands/leveling/setLevel.ts b/src/commands/leveling/setLevel.ts index 2cd9099..1869773 100644 --- a/src/commands/leveling/setLevel.ts +++ b/src/commands/leveling/setLevel.ts @@ -22,7 +22,7 @@ export default class SetLevelCommand extends BushCommand { }, { id: 'level', - type: 'number', + type: 'integer', prompt: { start: 'What level would you like to set the user to?', retry: '{error} Choose a valid level to set the user to.' diff --git a/src/commands/moderation/_lockdown.ts b/src/commands/moderation/_lockdown.ts index 68197df..5df9f18 100644 --- a/src/commands/moderation/_lockdown.ts +++ b/src/commands/moderation/_lockdown.ts @@ -34,7 +34,7 @@ export default class LockdownCommand extends BushCommand { } public override async exec(message: BushMessage | BushSlashMessage, { all }: { all: boolean }): Promise<unknown> { - return await message.util.reply('no'); + return await message.util.reply('Unfortunately my developer is too lazy to implement this command.'); if (!all) { if (!['GUILD_TEXT', 'GUILD_NEWS'].includes(message.channel!.type)) return message.util.reply(`${util.emojis.error} You can only lock down text and announcement channels.`); diff --git a/src/commands/moderation/hideCase.ts b/src/commands/moderation/hideCase.ts index 2529531..cf7b4de 100644 --- a/src/commands/moderation/hideCase.ts +++ b/src/commands/moderation/hideCase.ts @@ -20,7 +20,10 @@ export default class HideCaseCommand extends BushCommand { } } ], - userPermissions: ['MANAGE_MESSAGES'], + userPermissions: (message) => { + return message.member?.permissions.has('MANAGE_MESSAGES') ? null : ['MANAGE_MESSAGES']; + }, + clientPermissions: ['SEND_MESSAGES'], slash: true, slashOptions: [ { diff --git a/src/commands/moderation/mute.ts b/src/commands/moderation/mute.ts index de79b32..9e68d63 100644 --- a/src/commands/moderation/mute.ts +++ b/src/commands/moderation/mute.ts @@ -99,13 +99,13 @@ export default class MuteCommand extends BushCommand { const prefix = await message.guild!.getSetting('prefix'); switch (responseCode) { case 'missing permissions': - return `${util.emojis.error} Could not mute ${victimBoldTag} because I am missing the \`Manage Roles\` permission.`; + return `${util.emojis.error} Could not mute ${victimBoldTag} because I am missing the **Manage Roles** permission.`; case 'no mute role': - return `${util.emojis.error} Could not mute ${victimBoldTag}, you must set a mute role with \`${prefix}muterole\`.`; + return `${util.emojis.error} Could not mute ${victimBoldTag}, you must set a mute role with \`${prefix}config muteRole\`.`; case 'invalid mute role': - return `${util.emojis.error} Could not mute ${victimBoldTag} because the current mute role no longer exists. Please set a new mute role with \`${prefix}muterole\`.`; + return `${util.emojis.error} Could not mute ${victimBoldTag} because the current mute role no longer exists. Please set a new mute role with \`${prefix}config muteRole\`.`; case 'mute role not manageable': - return `${util.emojis.error} Could not mute ${victimBoldTag} because I cannot assign the current mute role, either change the role's position or set a new mute role with \`${prefix}muterole\`.`; + return `${util.emojis.error} Could not mute ${victimBoldTag} because I cannot assign the current mute role, either change the role's position or set a new mute role with \`${prefix}config muteRole\`.`; case 'error giving mute role': return `${util.emojis.error} Could not mute ${victimBoldTag}, there was an error assigning them the mute role.`; case 'error creating modlog entry': diff --git a/src/commands/moderation/role.ts b/src/commands/moderation/role.ts index fd7b817..8cdfea0 100644 --- a/src/commands/moderation/role.ts +++ b/src/commands/moderation/role.ts @@ -9,7 +9,7 @@ export default class RoleCommand extends BushCommand { description: { content: "Manages users' roles.", usage: 'role <add|remove> <user> <role> [duration]', - examples: ['role add spammer nogiveaways 7days'] + examples: ['role add spammer nogiveaways 7days', 'ra tyman muted', 'rr tyman staff'] }, slash: true, slashOptions: [ diff --git a/src/commands/utilities/activity.ts b/src/commands/utilities/activity.ts index 2d818e7..30f11cb 100644 --- a/src/commands/utilities/activity.ts +++ b/src/commands/utilities/activity.ts @@ -6,16 +6,19 @@ const activityMap = { 'Betrayal.io': '773336526917861400', 'Fishington.io': '814288819477020702', 'YouTube Together': '755600276941176913', - 'Chess in the Park': '832012774040141894' + 'Chess in the Park': '832012774040141894', + 'Watch Together': '880218394199220334' }; function map(phase: string) { - if (['yt', 'youtube'].includes(phase)) return activityMap['YouTube Together']; + if (client.consts.regex.snowflake.test(phase)) return phase; + else if (Object.keys(activityMap).includes(phase)) return activityMap[phase as keyof typeof activityMap]; + else if (['yt', 'youtube'].includes(phase)) return activityMap['Watch Together']; else if (['chess', 'park'].includes(phase)) return activityMap['Chess in the Park']; else if (['poker'].includes(phase)) return activityMap['Poker Night']; else if (['fish', 'fishing', 'fishington'].includes(phase)) return activityMap['Fishington.io']; else if (['betrayal'].includes(phase)) return activityMap['Betrayal.io']; - else return undefined; + else return null; } const activityTypeCaster = (_message: Message | BushMessage | BushSlashMessage, phrase: string) => { @@ -76,7 +79,8 @@ export default class YouTubeCommand extends BushCommand { { name: 'Betrayal.io', value: '773336526917861400' }, { name: 'Fishington.io', value: '814288819477020702' }, { name: 'YouTube Together', value: '755600276941176913' }, - { name: 'Chess in the Park', value: '832012774040141894' } + { name: 'Chess in the Park', value: '832012774040141894' }, + { name: 'Watch Together', value: '880218394199220334' } ] } ], diff --git a/src/commands/utilities/suicide.ts b/src/commands/utilities/suicide.ts index 0ec84a5..a05cdaa 100644 --- a/src/commands/utilities/suicide.ts +++ b/src/commands/utilities/suicide.ts @@ -13,7 +13,8 @@ export default class TemplateCommand extends BushCommand { }, slash: true, clientPermissions: ['SEND_MESSAGES'], - userPermissions: ['SEND_MESSAGES'] + userPermissions: ['SEND_MESSAGES'], + bypassChannelBlacklist: true }); } diff --git a/src/inhibitors/blacklist/channelGlobalBlacklist.ts b/src/inhibitors/blacklist/channelGlobalBlacklist.ts index d870307..2725431 100644 --- a/src/inhibitors/blacklist/channelGlobalBlacklist.ts +++ b/src/inhibitors/blacklist/channelGlobalBlacklist.ts @@ -1,4 +1,4 @@ -import { BushInhibitor, BushMessage, BushSlashMessage } from '@lib'; +import { BushCommand, BushInhibitor, BushMessage, BushSlashMessage } from '@lib'; export default class UserGlobalBlacklistInhibitor extends BushInhibitor { public constructor() { @@ -10,11 +10,11 @@ export default class UserGlobalBlacklistInhibitor extends BushInhibitor { }); } - public override exec(message: BushMessage | BushSlashMessage): boolean { + public override exec(message: BushMessage | BushSlashMessage, command: BushCommand): boolean { if (!message.author || !message.guild) return false; if (client.isOwner(message.author) || /* client.isSuperUser(message.author) ||*/ client.user!.id === message.author.id) return false; - if (client.cache.global.blacklistedChannels.includes(message.channel!.id)) { + if (client.cache.global.blacklistedChannels.includes(message.channel!.id) && !command.bypassChannelBlacklist) { return true; } return false; diff --git a/src/inhibitors/blacklist/channelGuildBlacklist.ts b/src/inhibitors/blacklist/channelGuildBlacklist.ts index d02408c..63334c4 100644 --- a/src/inhibitors/blacklist/channelGuildBlacklist.ts +++ b/src/inhibitors/blacklist/channelGuildBlacklist.ts @@ -1,4 +1,4 @@ -import { BushInhibitor, BushMessage, BushSlashMessage } from '@lib'; +import { BushCommand, BushInhibitor, BushMessage, BushSlashMessage } from '@lib'; export default class ChannelGuildBlacklistInhibitor extends BushInhibitor { public constructor() { @@ -10,12 +10,20 @@ export default class ChannelGuildBlacklistInhibitor extends BushInhibitor { }); } - public override async exec(message: BushMessage | BushSlashMessage): Promise<boolean> { + public override async exec(message: BushMessage | BushSlashMessage, command: BushCommand): Promise<boolean> { if (!message.author || !message.guild) return false; if (client.isOwner(message.author) || /* client.isSuperUser(message.author) || */ client.user!.id === message.author.id) return false; - if ((await message.guild.getSetting('bypassChannelBlacklist'))?.includes(message.author.id)) return false; - if ((await message.guild.getSetting('blacklistedChannels'))?.includes(message.channel!.id)) { + if ( + (await message.guild.getSetting('bypassChannelBlacklist'))?.includes(message.author.id) && + !command.bypassChannelBlacklist + ) { + return false; + } + if ( + (await message.guild.getSetting('blacklistedChannels'))?.includes(message.channel!.id) && + !command.bypassChannelBlacklist + ) { return true; } return false; diff --git a/src/lib/extensions/discord-akairo/BushCommand.ts b/src/lib/extensions/discord-akairo/BushCommand.ts index 1c8ea5b..073221d 100644 --- a/src/lib/extensions/discord-akairo/BushCommand.ts +++ b/src/lib/extensions/discord-akairo/BushCommand.ts @@ -1,5 +1,5 @@ import { ArgumentOptions, ArgumentPromptOptions, ArgumentTypeCaster, Command, CommandOptions } from 'discord-akairo'; -import { Snowflake } from 'discord.js'; +import { PermissionResolvable, Snowflake } from 'discord.js'; import { BushMessage } from '../discord.js/BushMessage'; import { BushClient } from './BushClient'; import { BushCommandHandler } from './BushCommandHandler'; @@ -136,7 +136,9 @@ export interface CustomBushArgumentOptions extends BaseBushArgumentOptions { customType?: ArgumentTypeCaster | (string | string[])[] | RegExp | string | null; } -export interface BushCommandOptions extends CommandOptions { +export type BushMissingPermissionSupplier = (message: BushMessage | BushSlashMessage) => Promise<any> | any; + +export interface BushCommandOptions extends Omit<CommandOptions, 'userPermissions' | 'clientPermissions'> { hidden?: boolean; restrictedChannels?: Snowflake[]; restrictedGuilds?: Snowflake[]; @@ -148,6 +150,9 @@ export interface BushCommandOptions extends CommandOptions { args?: BushArgumentOptions[] & CustomBushArgumentOptions[]; category: string; pseudo?: boolean; + bypassChannelBlacklist?: boolean; + clientPermissions?: PermissionResolvable | PermissionResolvable[] | BushMissingPermissionSupplier; + userPermissions?: PermissionResolvable | PermissionResolvable[] | BushMissingPermissionSupplier; } export class BushCommand extends Command { @@ -155,13 +160,14 @@ export class BushCommand extends Command { public declare handler: BushCommandHandler; + /** The command's options */ public options: BushCommandOptions; /** The channels the command is limited to run in. */ - public restrictedChannels: Snowflake[]; + public restrictedChannels: Snowflake[] | undefined; /** The guilds the command is limited to run in. */ - public restrictedGuilds: Snowflake[]; + public restrictedGuilds: Snowflake[] | undefined; /** Whether the command is hidden from the help command. */ public hidden: boolean; @@ -169,6 +175,9 @@ export class BushCommand extends Command { /** A fake command, completely hidden from the help command. */ public pseudo: boolean; + /** Allow this command to be run in channels that are blacklisted. */ + public bypassChannelBlacklist: boolean; + public constructor(id: string, options: BushCommandOptions) { if (options.args && typeof options.args !== 'function') { options.args.forEach((_, index: number) => { @@ -179,12 +188,14 @@ export class BushCommand extends Command { } }); } - super(id, options); + // incompatible options + super(id, options as any); this.options = options; - this.hidden = options.hidden ?? false; - this.restrictedChannels = options.restrictedChannels!; - this.restrictedGuilds = options.restrictedGuilds!; - this.pseudo = options.pseudo!; + this.hidden = Boolean(options.hidden); + this.restrictedChannels = options.restrictedChannels; + this.restrictedGuilds = options.restrictedGuilds; + this.pseudo = Boolean(options.pseudo); + this.bypassChannelBlacklist = Boolean(options.bypassChannelBlacklist); } public override exec(message: BushMessage, args: any): any; diff --git a/src/lib/extensions/discord-akairo/BushCommandHandler.ts b/src/lib/extensions/discord-akairo/BushCommandHandler.ts index f8dcd93..8ab47d8 100644 --- a/src/lib/extensions/discord-akairo/BushCommandHandler.ts +++ b/src/lib/extensions/discord-akairo/BushCommandHandler.ts @@ -9,17 +9,30 @@ export type BushCommandHandlerOptions = CommandHandlerOptions; export interface BushCommandHandlerEvents extends CommandHandlerEvents { commandBlocked: [message: BushMessage, command: BushCommand, reason: string]; - + commandBreakout: [message: BushMessage, command: BushCommand, breakMessage: BushMessage]; + commandCancelled: [message: BushMessage, command: BushCommand, retryMessage?: BushMessage]; + commandFinished: [message: BushMessage, command: BushCommand, args: any, returnValue: any]; + commandInvalid: [message: BushMessage, command: BushCommand]; + commandLocked: [message: BushMessage, command: BushCommand]; + commandStarted: [message: BushMessage, command: BushCommand, args: any]; + cooldown: [message: BushMessage | BushSlashMessage, command: BushCommand, remaining: number]; + error: [error: Error, message: BushMessage, command?: BushCommand]; + inPrompt: [message: BushMessage]; + load: [command: BushCommand, isReload: boolean]; + messageBlocked: [message: BushMessage | BushSlashMessage, reason: string]; + messageInvalid: [message: BushMessage]; missingPermissions: [message: BushMessage, command: BushCommand, type: 'client' | 'user', missing: Array<PermissionString>]; - + remove: [command: BushCommand]; slashBlocked: [message: BushSlashMessage, command: BushCommand, reason: string]; - + slashError: [error: Error, message: BushSlashMessage, command: BushCommand]; + slashFinished: [message: BushSlashMessage, command: BushCommand, args: any, returnValue: any]; slashMissingPermissions: [ message: BushSlashMessage, command: BushCommand, type: 'client' | 'user', missing: Array<PermissionString> ]; + slashStarted: [message: BushSlashMessage, command: BushCommand, args: any]; } export class BushCommandHandler extends CommandHandler { diff --git a/src/lib/extensions/discord.js/BushClientEvents.d.ts b/src/lib/extensions/discord.js/BushClientEvents.d.ts index eb36153..2c9de89 100644 --- a/src/lib/extensions/discord.js/BushClientEvents.d.ts +++ b/src/lib/extensions/discord.js/BushClientEvents.d.ts @@ -233,7 +233,12 @@ export interface BushClientEvents extends ClientEvents { caseID: string, dmSuccess: boolean ]; - bushLevelUp: []; + bushLevelUpdate: [ + member: BushGuildMember, + oldLevel: number, + newLevel: number, + currentXp: number + ]; } type Setting = diff --git a/src/lib/models/Guild.ts b/src/lib/models/Guild.ts index f59bed1..1897068 100644 --- a/src/lib/models/Guild.ts +++ b/src/lib/models/Guild.ts @@ -64,6 +64,18 @@ export const guildSettingsObj = { description: 'Custom phrases to be detected by automod.', type: 'custom', configurable: false + }, + noXpChannels: { + name: 'No Xp Channels', + description: 'Channels where users will not earn xp for leveling.', + type: 'channel-array', + configurable: true + }, + levelRoles: { + name: 'Level Roles', + description: 'What roles get given at certain levels.', + type: 'custom', + configurable: false } }; export type GuildSettings = keyof typeof guildSettingsObj; @@ -144,11 +156,13 @@ export interface GuildModel { punishmentEnding: string; disabledCommands: string[]; lockdownChannels: Snowflake[]; - autoModPhases: string[]; + autoModPhases: { [word: string]: 0 | 1 | 2 | 3 }; enabledFeatures: GuildFeatures[]; joinRoles: Snowflake[]; logChannels: LogChannelDB; bypassChannelBlacklist: Snowflake[]; + noXpChannels: Snowflake[]; + levelRoles: { [level: number]: Snowflake }; } export interface GuildModelCreationAttributes { @@ -162,11 +176,13 @@ export interface GuildModelCreationAttributes { punishmentEnding?: string; disabledCommands?: string[]; lockdownChannels?: Snowflake[]; - autoModPhases?: string[]; + autoModPhases?: { [word: string]: 0 | 1 | 2 | 3 }; enabledFeatures?: GuildFeatures[]; joinRoles?: Snowflake[]; logChannels?: LogChannelDB; bypassChannelBlacklist?: Snowflake[]; + noXpChannels?: Snowflake[]; + levelRoles?: { [level: number]: Snowflake }; } export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> implements GuildModel { @@ -273,10 +289,10 @@ export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> i /** * Custom automod phases */ - public get autoModPhases(): string[] { + public get autoModPhases(): { [word: string]: 0 | 1 | 2 | 3 } { throw new Error(NEVER_USED); } - public set autoModPhases(_: string[]) { + public set autoModPhases(_: { [word: string]: 0 | 1 | 2 | 3 }) { throw new Error(NEVER_USED); } @@ -320,6 +336,20 @@ export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> i throw new Error(NEVER_USED); } + public get noXpChannels(): Snowflake[] { + throw new Error(NEVER_USED); + } + public set noXpChannels(_: Snowflake[]) { + throw new Error(NEVER_USED); + } + + public get levelRoles(): { [level: number]: Snowflake } { + throw new Error(NEVER_USED); + } + public set levelRoles(_: { [level: number]: Snowflake }) { + throw new Error(NEVER_USED); + } + public static initModel(sequelize: Sequelize, client: BushClient): void { Guild.init( { @@ -349,7 +379,17 @@ export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> i }, disabledCommands: jsonArrayInit('disabledCommands'), lockdownChannels: jsonArrayInit('lockdownChannels'), - autoModPhases: jsonArrayInit('autoModPhases'), + autoModPhases: { + type: DataTypes.TEXT, + get: function (): { [level: number]: Snowflake } { + return jsonParseGet.call(this, 'autoModPhases'); + }, + set: function (val: { [level: number]: Snowflake }) { + return jsonParseSet.call(this, 'autoModPhases', val); + }, + allowNull: false, + defaultValue: '{}' + }, enabledFeatures: jsonArrayInit('enabledFeatures'), joinRoles: jsonArrayInit('joinRoles'), logChannels: { @@ -363,7 +403,19 @@ export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> i allowNull: false, defaultValue: '{}' }, - bypassChannelBlacklist: jsonArrayInit('bypassChannelBlacklist') + bypassChannelBlacklist: jsonArrayInit('bypassChannelBlacklist'), + noXpChannels: jsonArrayInit('noXpChannels'), + levelRoles: { + type: DataTypes.TEXT, + get: function (): { [level: number]: Snowflake } { + return jsonParseGet.call(this, 'levelRoles'); + }, + set: function (val: { [level: number]: Snowflake }) { + return jsonParseSet.call(this, 'levelRoles', val); + }, + allowNull: false, + defaultValue: '{}' + } }, { sequelize: sequelize } ); diff --git a/src/listeners/commands/commandBlocked.ts b/src/listeners/commands/commandBlocked.ts index 3be9d1f..8329c83 100644 --- a/src/listeners/commands/commandBlocked.ts +++ b/src/listeners/commands/commandBlocked.ts @@ -82,7 +82,7 @@ export default class CommandBlockedListener extends BushListener { if (!command) break; const channels = command.restrictedChannels; const names: string[] = []; - channels.forEach((c) => { + channels!.forEach((c) => { names.push(`<#${c}>`); }); const pretty = util.oxford(names, 'and'); @@ -95,7 +95,7 @@ export default class CommandBlockedListener extends BushListener { if (!command) break; const guilds = command.restrictedGuilds; const names: string[] = []; - guilds.forEach((g) => { + guilds!.forEach((g) => { names.push(`\`${client.guilds.cache.get(g)?.name}\``); }); const pretty = util.oxford(names, 'and'); diff --git a/src/listeners/custom/bushLevelUpdate.ts b/src/listeners/custom/bushLevelUpdate.ts new file mode 100644 index 0000000..0b7ebfa --- /dev/null +++ b/src/listeners/custom/bushLevelUpdate.ts @@ -0,0 +1,17 @@ +import { BushListener } from '../../lib'; +import { BushClientEvents } from '../../lib/extensions/discord.js/BushClientEvents'; + +export default class BushLevelUpdateListener extends BushListener { + public constructor() { + super('bushLevelUpdate', { + emitter: 'client', + event: 'bushLevelUpdate', + category: 'custom' + }); + } + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + public override async exec(...[member, oldLevel, newLevel, currentXp]: BushClientEvents['bushLevelUpdate']) { + // + } +} diff --git a/src/listeners/message/automodCreate.ts b/src/listeners/message/automodCreate.ts index b708e30..c3c89ff 100644 --- a/src/listeners/message/automodCreate.ts +++ b/src/listeners/message/automodCreate.ts @@ -1,10 +1,10 @@ import { BushListener, BushMessage } from '@lib'; // @ts-expect-error: ts doesn't recognize json5 -import _badLinks from '@root/lib/badlinks'; // Stolen from https://github.com/nacrt/SkyblockClient-REPO/blob/main/files/scamlinks.json +import _badLinks from '@root/lib/badlinks'; // partially uses https://github.com/nacrt/SkyblockClient-REPO/blob/main/files/scamlinks.json // @ts-expect-error: ts doesn't recognize json5 import _badLinksSecret from '@root/lib/badlinks-secret'; // shhhh // @ts-expect-error: ts doesn't recognize json5 -import badWords from '@root/lib/badwords'; +import _badWords from '@root/lib/badwords'; import { MessageEmbed } from 'discord.js'; import { BushClientEvents } from '../../lib/extensions/discord.js/BushClientEvents'; @@ -25,19 +25,20 @@ export default class AutomodMessageCreateListener extends BushListener { if (message.channel.type === 'DM' || !message.guild) return; if (!(await message.guild.hasFeature('automod'))) return; - /* await message.guild.getSetting('autoModPhases'); */ + const customAutomodPhrases = (await message.guild.getSetting('autoModPhases')) ?? {}; - const badLinks: { [key: string]: number } = {}; + const badLinks: { [key: string]: 0 | 1 | 2 | 3 } = {}; let temp = _badLinks; if (_badLinksSecret) temp = temp.concat(_badLinksSecret); temp.forEach((link: string) => { badLinks[link] = 3; }); + const badWords: { [key: string]: 0 | 1 | 2 | 3 } = _badWords; - const wordMap = { ...badWords, ...badLinks }; + const wordMap = { ...badWords, ...badLinks, ...customAutomodPhrases }; const wordKeys = Object.keys(wordMap); - const offences: { [key: string]: number } = {}; + const offences: { [key: string]: 0 | 1 | 2 | 3 } = {}; const cleanMessageContent = message.content?.toLowerCase().replace(/ /g, ''); wordKeys.forEach((word) => { diff --git a/src/listeners/message/level.ts b/src/listeners/message/level.ts index aff8190..16f616f 100644 --- a/src/listeners/message/level.ts +++ b/src/listeners/message/level.ts @@ -3,7 +3,6 @@ import { MessageType } from 'discord.js'; export default class LevelListener extends BushListener { #levelCooldowns: Set<string> = new Set(); - #blacklistedChannels = ['702456294874808330']; public constructor() { super('level', { emitter: 'commandHandler', @@ -14,7 +13,8 @@ export default class LevelListener extends BushListener { public override async exec(...[message]: BushCommandHandlerEvents['messageInvalid']): Promise<void> { if (message.author.bot || !message.author || !message.guild) return; if (this.#levelCooldowns.has(`${message.guild.id}-${message.author.id}`)) return; - if (this.#blacklistedChannels.includes(message.channel.id)) return; + + if ((await message.guild.getSetting('noXpChannels')).includes(message.channel.id)) return; const allowedMessageTypes: MessageType[] = ['DEFAULT', 'REPLY']; // this is so ts will yell at me when discord.js makes some unnecessary breaking change if (!allowedMessageTypes.includes(message.type)) return; //checks for join messages, slash commands, booster messages etc const [user] = await Level.findOrBuild({ @@ -36,7 +36,7 @@ export default class LevelListener extends BushListener { return false; }); const newLevel = Level.convertXpToLevel(user.xp); - if (previousLevel < newLevel) client.emit('bushLevelUp'); + if (previousLevel !== newLevel) client.emit('bushLevelUpdate', message.member!, previousLevel, newLevel, user.xp); if (success) void client.logger.verbose(`level`, `Gave <<${xpToGive}>> XP to <<${message.author.tag}>> in <<${message.guild}>>.`); this.#levelCooldowns.add(`${message.guild.id}-${message.author.id}`); @@ -328,9 +328,9 @@ __metadata: linkType: hard "@types/lodash@npm:^4.14.173": - version: 4.14.173 - resolution: "@types/lodash@npm:4.14.173" - checksum: 9e97ef5816299e5470db1cb32a93e981af60f74f18a35d045ed4caf224a065df96bfae6e444ec96aa392fc01258592b965d840ae042eef77ef719a578c7daef8 + version: 4.14.175 + resolution: "@types/lodash@npm:4.14.175" + checksum: 50721f33faa542f1b9f62f2ba769ed353c6036711e92bd89ce569f2ed247e38fb2a2899f6fd46466b1690fea7ae0239471e6a6093c54e8f2b0613e43e8eac19c languageName: node linkType: hard @@ -356,16 +356,16 @@ __metadata: linkType: hard "@types/node@npm:*, @types/node@npm:^16.9.2": - version: 16.9.2 - resolution: "@types/node@npm:16.9.2" - checksum: 204aa883bc93a267f43804af8872e538935369ab905d5ca702d2c17a213339f8df974bb95d21e2e714e8f83f669b185d8526f7c4b5d16adbdb5d96d4f2e75fa9 + version: 16.10.2 + resolution: "@types/node@npm:16.10.2" + checksum: 83c1c3c68e7500103908c3f16094e458879c840a719c15b6ea577f81fe1f24a1b3473bb6c8e8091fe79a82543ca7639c6b1088fcf80292ec091d1d1c9504a87e languageName: node linkType: hard "@types/numeral@npm:^2.0.1": - version: 2.0.1 - resolution: "@types/numeral@npm:2.0.1" - checksum: 58bf8b780d991adf10cab66bb71dfee1bea623a3e0f40d991ef69557cf637be6762e2637879430b1169db7374f7787f95181edc3e959b190fae10965d128fb0d + version: 2.0.2 + resolution: "@types/numeral@npm:2.0.2" + checksum: d8b778ef5d1b20cb5919fb2cf41108b324ccfaeccb0238caaf54bd9d4bffbbd57d7b860844f05831fb356a5dc0115b477891531325180a670076036ee1b4a8ca languageName: node linkType: hard @@ -426,13 +426,14 @@ __metadata: linkType: hard "@typescript-eslint/eslint-plugin@npm:^4.31.1": - version: 4.31.1 - resolution: "@typescript-eslint/eslint-plugin@npm:4.31.1" + version: 4.32.0 + resolution: "@typescript-eslint/eslint-plugin@npm:4.32.0" dependencies: - "@typescript-eslint/experimental-utils": 4.31.1 - "@typescript-eslint/scope-manager": 4.31.1 + "@typescript-eslint/experimental-utils": 4.32.0 + "@typescript-eslint/scope-manager": 4.32.0 debug: ^4.3.1 functional-red-black-tree: ^1.0.1 + ignore: ^5.1.8 regexpp: ^3.1.0 semver: ^7.3.5 tsutils: ^3.21.0 @@ -442,66 +443,66 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 90bed374dcdb5497a829f6bb02aa2a88dfb74683b0385b433e29a34b03d4b0f2992cd953cee20426c35c2695fb75845824860a77aca12481e9a1f823c4158bf8 + checksum: f1e856f1f500ac7a06097536d0a5392f33f4a9f0750ffac90c30e40852524579715624ffa791b6fb601320d1d53135b4321b00d0554f6aea12fe55b65ccedd7b languageName: node linkType: hard -"@typescript-eslint/experimental-utils@npm:4.31.1": - version: 4.31.1 - resolution: "@typescript-eslint/experimental-utils@npm:4.31.1" +"@typescript-eslint/experimental-utils@npm:4.32.0": + version: 4.32.0 + resolution: "@typescript-eslint/experimental-utils@npm:4.32.0" dependencies: "@types/json-schema": ^7.0.7 - "@typescript-eslint/scope-manager": 4.31.1 - "@typescript-eslint/types": 4.31.1 - "@typescript-eslint/typescript-estree": 4.31.1 + "@typescript-eslint/scope-manager": 4.32.0 + "@typescript-eslint/types": 4.32.0 + "@typescript-eslint/typescript-estree": 4.32.0 eslint-scope: ^5.1.1 eslint-utils: ^3.0.0 peerDependencies: eslint: "*" - checksum: 0767a1a554b78e3a81df28a40d213b0ca8d16e2360e04a377d99fceec4cf6af132953076fe6ed5a07708e6115091d18744a6b4904878e029bb22278e84193f59 + checksum: bad0072df9f7f7804a3bd9aeccfe6a0b117e47ad7f58d091674a276c84171be2c525c977c304d39c6d0cd31706a2d9a4f797466a505dda7985535cd3ad9b5830 languageName: node linkType: hard "@typescript-eslint/parser@npm:^4.31.1": - version: 4.31.1 - resolution: "@typescript-eslint/parser@npm:4.31.1" + version: 4.32.0 + resolution: "@typescript-eslint/parser@npm:4.32.0" dependencies: - "@typescript-eslint/scope-manager": 4.31.1 - "@typescript-eslint/types": 4.31.1 - "@typescript-eslint/typescript-estree": 4.31.1 + "@typescript-eslint/scope-manager": 4.32.0 + "@typescript-eslint/types": 4.32.0 + "@typescript-eslint/typescript-estree": 4.32.0 debug: ^4.3.1 peerDependencies: eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 peerDependenciesMeta: typescript: optional: true - checksum: e4e312ec1ef1666fe3ed9cd565f85cc5e11d0a5ae4dff529fc8f212cc758f46ec8ebd388194a57f73ea3250e0ec9040fef8bee32d922d88153c04870683773fa + checksum: dd6a30fb04e56a13b53298c7d20cb3954cc6f220c599ba907b5029c2d36230a1d9850c8392d47a3b4c2760a39af5f6ff502a2eaa984a44f93142c83ac231d52d languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:4.31.1": - version: 4.31.1 - resolution: "@typescript-eslint/scope-manager@npm:4.31.1" +"@typescript-eslint/scope-manager@npm:4.32.0": + version: 4.32.0 + resolution: "@typescript-eslint/scope-manager@npm:4.32.0" dependencies: - "@typescript-eslint/types": 4.31.1 - "@typescript-eslint/visitor-keys": 4.31.1 - checksum: 386442e7713df96cf32565e0f3caff173a9206630f385c1cfa09f11d8b4479a9f51572a4b795e4b68b2740bacebd1bb3a3de5a69bee564bc28dbce4b035ed3fb + "@typescript-eslint/types": 4.32.0 + "@typescript-eslint/visitor-keys": 4.32.0 + checksum: 03510d080dee19588a09f41226c93fb67eafe132c2305da4dbcfaf3ccb333a6d1736f7b897d83c85545cb88f532c81849182b1c55cb7ca7ad9148aa5d4671ad2 languageName: node linkType: hard -"@typescript-eslint/types@npm:4.31.1": - version: 4.31.1 - resolution: "@typescript-eslint/types@npm:4.31.1" - checksum: 08b5cf0d02fbf946a4b10e93279e3253287e4826ee744e7d3f38d7da241aaa6fce2743e448f9cdf36d93c20259e17248e50b9fffdff59e1c878289acca0c2d65 +"@typescript-eslint/types@npm:4.32.0": + version: 4.32.0 + resolution: "@typescript-eslint/types@npm:4.32.0" + checksum: e93ce12ee3ee0fa1ac6f6e51f9aec8c4b7b603296dad2d5cb11790710de12fd7bf88fca0f8220e51f18e696aba8764e26ff960fa0cc1aef50055ee1e1e72c207 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:4.31.1": - version: 4.31.1 - resolution: "@typescript-eslint/typescript-estree@npm:4.31.1" +"@typescript-eslint/typescript-estree@npm:4.32.0": + version: 4.32.0 + resolution: "@typescript-eslint/typescript-estree@npm:4.32.0" dependencies: - "@typescript-eslint/types": 4.31.1 - "@typescript-eslint/visitor-keys": 4.31.1 + "@typescript-eslint/types": 4.32.0 + "@typescript-eslint/visitor-keys": 4.32.0 debug: ^4.3.1 globby: ^11.0.3 is-glob: ^4.0.1 @@ -510,17 +511,17 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 1780223f52fde98fcfef4e7d9a59fc811232f608800e6a69b73789aad34ddf43fc9d4041707baa88b25cf88c223a7f2a749cf084dc45d89de44a803b29e19eb3 + checksum: 4525789cd27f4af333c9e2c221511b4ce8c50bd520b5c73958885b718f38d5c7349678286db8dc26de2ca61463651925d37e833456497e493c357acc3ea24b03 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:4.31.1": - version: 4.31.1 - resolution: "@typescript-eslint/visitor-keys@npm:4.31.1" +"@typescript-eslint/visitor-keys@npm:4.32.0": + version: 4.32.0 + resolution: "@typescript-eslint/visitor-keys@npm:4.32.0" dependencies: - "@typescript-eslint/types": 4.31.1 + "@typescript-eslint/types": 4.32.0 eslint-visitor-keys: ^2.0.0 - checksum: 14a86bf96a41a81feba32f5acbb72539345a33f250b2f17968dc7b9f4ae9eca00209a11dd208b9c6305f5a841a9f809713027c0ed969465e2d62a042d116bdc9 + checksum: 233bf479b6373bae2e61976ed1f2d0fb5c365203984e1233024a2677da0958fb3b19753b67047e8c9a9f4cec7603d1027d73b1302fef0d49c5e92be012d3d92e languageName: node linkType: hard @@ -624,7 +625,7 @@ __metadata: languageName: node linkType: hard -"ansi-regex@npm:^5.0.0": +"ansi-regex@npm:^5.0.1": version: 5.0.1 resolution: "ansi-regex@npm:5.0.1" checksum: 2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b @@ -1221,11 +1222,11 @@ discord-akairo@NotEnoughUpdates/discord-akairo: linkType: hard "esbuild@npm:^0.12.28": - version: 0.12.28 - resolution: "esbuild@npm:0.12.28" + version: 0.12.29 + resolution: "esbuild@npm:0.12.29" bin: esbuild: bin/esbuild - checksum: 9127dc048aad41a59d736460b9ea3cf5e367a7e5a650b2b465e066ee291e3c5e9fa5ad4b56cd4dea76cde9a1dee25a0e9e94f558b24170fc124eb0778e043eae + checksum: 06a6e84eff02899b45c7d4441199f7bbc824a9f5a2d0332bfe9873963751213c71bcb03b8db96babbc45ef31c140580ff64317ee7600983fc88b84c2d9788bbf languageName: node linkType: hard @@ -1572,8 +1573,8 @@ discord-akairo@NotEnoughUpdates/discord-akairo: linkType: hard "glob@npm:^7.1.3, glob@npm:^7.1.4": - version: 7.1.7 - resolution: "glob@npm:7.1.7" + version: 7.2.0 + resolution: "glob@npm:7.2.0" dependencies: fs.realpath: ^1.0.0 inflight: ^1.0.4 @@ -1581,7 +1582,7 @@ discord-akairo@NotEnoughUpdates/discord-akairo: minimatch: ^3.0.4 once: ^1.3.0 path-is-absolute: ^1.0.0 - checksum: b61f48973bbdcf5159997b0874a2165db572b368b931135832599875919c237fc05c12984e38fe828e69aa8a921eb0e8a4997266211c517c9cfaae8a93988bb8 + checksum: 78a8ea942331f08ed2e055cb5b9e40fe6f46f579d7fd3d694f3412fe5db23223d29b7fee1575440202e9a7ff9a72ab106a39fee39934c7bedafe5e5f8ae20134 languageName: node linkType: hard @@ -1725,7 +1726,7 @@ discord-akairo@NotEnoughUpdates/discord-akairo: languageName: node linkType: hard -"ignore@npm:^5.1.4": +"ignore@npm:^5.1.4, ignore@npm:^5.1.8": version: 5.1.8 resolution: "ignore@npm:5.1.8" checksum: 967abadb61e2cb0e5c5e8c4e1686ab926f91bc1a4680d994b91947d3c65d04c3ae126dcdf67f08e0feeb8ff8407d453e641aeeddcc47a3a3cca359f283cf6121 @@ -1825,11 +1826,11 @@ discord-akairo@NotEnoughUpdates/discord-akairo: linkType: hard "is-glob@npm:^4.0.0, is-glob@npm:^4.0.1": - version: 4.0.1 - resolution: "is-glob@npm:4.0.1" + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" dependencies: is-extglob: ^2.1.1 - checksum: 84627cad11b4e745f5db5a163f32c47b711585a5ff6e14f8f8d026db87f4cdd3e2c95f6fa1f94ad22e469f36d819ae2814f03f9c668b164422ac3354a94672d3 + checksum: d381c1319fcb69d341cc6e6c7cd588e17cd94722d9a32dbd60660b993c4fb7d0f19438674e68dfec686d09b7c73139c9166b47597f846af387450224a8101ab4 languageName: node linkType: hard @@ -2036,8 +2037,8 @@ discord-akairo@NotEnoughUpdates/discord-akairo: linkType: hard "mathjs@npm:^9.4.5": - version: 9.4.5 - resolution: "mathjs@npm:9.4.5" + version: 9.5.0 + resolution: "mathjs@npm:9.5.0" dependencies: "@babel/runtime": ^7.15.4 complex.js: ^2.0.15 @@ -2050,7 +2051,7 @@ discord-akairo@NotEnoughUpdates/discord-akairo: typed-function: ^2.0.0 bin: mathjs: bin/cli.js - checksum: ce29106d5317e864e798ab303ba1ade04ea6c6f3e08c64aed8f3e99e6ad5d5c4012d14ddda953d6735c13d9bcdae7f19301ecf25932a1430d14e6f1d7d481e31 + checksum: 11ff735c5a000885f2aff09404a5fce586ccd0f04f77395495bbaff534ae900bb56fa2cedb847aac3648cdba90f009decf9b498e2a30b0131347757e13d4d4ed languageName: node linkType: hard @@ -2250,11 +2251,11 @@ discord-akairo@NotEnoughUpdates/discord-akairo: linkType: hard "nanoid@npm:^3.1.25": - version: 3.1.25 - resolution: "nanoid@npm:3.1.25" + version: 3.1.28 + resolution: "nanoid@npm:3.1.28" bin: nanoid: bin/nanoid.cjs - checksum: e2353828c7d8fde65265e9c981380102e2021f292038a93fd27288bad390339833286e8cbc7531abe1cb2c6b317e55f38b895dcb775151637bb487388558e0ff + checksum: ae2fa9f3ce7a690ec62fc2fdf92345f023b20db760024f767c25ad392bde6414dc0b44a8e66dc1209426f36e4771e63b09ad2b49d8f1b04063b37e21b46af8d0 languageName: node linkType: hard @@ -2266,9 +2267,11 @@ discord-akairo@NotEnoughUpdates/discord-akairo: linkType: hard "node-fetch@npm:^2.6.1": - version: 2.6.2 - resolution: "node-fetch@npm:2.6.2" - checksum: de367eae1dfbc0e12283c1cf92256ea7fba7eac8655e2e51ebb217727162396fc6cf24689ef9fc6accf075e3991e2ffaa061f7cfaa958215329649b2297ff06d + version: 2.6.5 + resolution: "node-fetch@npm:2.6.5" + dependencies: + whatwg-url: ^5.0.0 + checksum: 4e83db450718e70762882f00d96f647a7f2f3170035225934ddd5450cb1d91ef339ceb180d3687bcb0a6ed78c3fa5636ce8d3e44ec81ab59e0224ebf8965f65f languageName: node linkType: hard @@ -2890,9 +2893,9 @@ discord-akairo@NotEnoughUpdates/discord-akairo: linkType: hard "signal-exit@npm:^3.0.0": - version: 3.0.4 - resolution: "signal-exit@npm:3.0.4" - checksum: e72633b05df8d65035a0b31718b1a587f55b25953a8e7b959f6c3a963cc0abcb70a0d78a7e0792bc104c874525efdc619e823095d382a775641e3867b1b68c54 + version: 3.0.5 + resolution: "signal-exit@npm:3.0.5" + checksum: a1d3d0d63f581bd298b30ed8f6de21b73a0fe5a0c0f123b2e8ed7168bbff8f4c1a45e681de12a1966a89bb725d8eb727816be1c436e136951f31953e4a201587 languageName: node linkType: hard @@ -3030,14 +3033,14 @@ discord-akairo@NotEnoughUpdates/discord-akairo: languageName: node linkType: hard -"string-width@npm:^4.2.0": - version: 4.2.2 - resolution: "string-width@npm:4.2.2" +"string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" dependencies: emoji-regex: ^8.0.0 is-fullwidth-code-point: ^3.0.0 - strip-ansi: ^6.0.0 - checksum: 343e089b0e66e0f72aab4ad1d9b6f2c9cc5255844b0c83fd9b53f2a3b3fd0421bdd6cb05be96a73117eb012db0887a6c1d64ca95aaa50c518e48980483fea0ab + strip-ansi: ^6.0.1 + checksum: e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb languageName: node linkType: hard @@ -3077,12 +3080,12 @@ discord-akairo@NotEnoughUpdates/discord-akairo: languageName: node linkType: hard -"strip-ansi@npm:^6.0.0": - version: 6.0.0 - resolution: "strip-ansi@npm:6.0.0" +"strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" dependencies: - ansi-regex: ^5.0.0 - checksum: 04c3239ede44c4d195b0e66c0ad58b932f08bec7d05290416d361ff908ad282ecdaf5d9731e322c84f151d427436bde01f05b7422c3ec26dd927586736b0e5d0 + ansi-regex: ^5.0.1 + checksum: f3cd25890aef3ba6e1a74e20896c21a46f482e93df4a06567cebf2b57edabb15133f1f94e57434e0a958d61186087b1008e89c94875d019910a213181a14fc8c languageName: node linkType: hard @@ -3112,16 +3115,16 @@ discord-akairo@NotEnoughUpdates/discord-akairo: linkType: hard "table@npm:^6.0.9": - version: 6.7.1 - resolution: "table@npm:6.7.1" + version: 6.7.2 + resolution: "table@npm:6.7.2" dependencies: ajv: ^8.0.1 lodash.clonedeep: ^4.5.0 lodash.truncate: ^4.4.2 slice-ansi: ^4.0.0 - string-width: ^4.2.0 - strip-ansi: ^6.0.0 - checksum: 053b61fa4e8f8396c65ff7a95da90e85620370932652d501ff7a0a3ed7317f1cc549702bd2abf2bd9ed01e20757b73a8b57374f8a8a2ac02fbe0550276263fb6 + string-width: ^4.2.3 + strip-ansi: ^6.0.1 + checksum: d61f91d64b9be56ac66edd2a8c0f10fcc59995313f37198cb87de73a6b441a05ad36f4a567bd8736da35bc4a2f8f4049b0e4ff1d4356c0a7c2b91af48b8bf8b2 languageName: node linkType: hard @@ -3183,6 +3186,13 @@ discord-akairo@NotEnoughUpdates/discord-akairo: languageName: node linkType: hard +"tr46@npm:~0.0.3": + version: 0.0.3 + resolution: "tr46@npm:0.0.3" + checksum: 726321c5eaf41b5002e17ffbd1fb7245999a073e8979085dacd47c4b4e8068ff5777142fc6726d6ca1fd2ff16921b48788b87225cbc57c72636f6efa8efbffe3 + languageName: node + linkType: hard + "ts-mixer@npm:^6.0.0": version: 6.0.0 resolution: "ts-mixer@npm:6.0.0" @@ -3336,6 +3346,23 @@ typescript@^4.4.3: languageName: node linkType: hard +"webidl-conversions@npm:^3.0.0": + version: 3.0.1 + resolution: "webidl-conversions@npm:3.0.1" + checksum: c92a0a6ab95314bde9c32e1d0a6dfac83b578f8fa5f21e675bc2706ed6981bc26b7eb7e6a1fab158e5ce4adf9caa4a0aee49a52505d4d13c7be545f15021b17c + languageName: node + linkType: hard + +"whatwg-url@npm:^5.0.0": + version: 5.0.0 + resolution: "whatwg-url@npm:5.0.0" + dependencies: + tr46: ~0.0.3 + webidl-conversions: ^3.0.0 + checksum: b8daed4ad3356cc4899048a15b2c143a9aed0dfae1f611ebd55073310c7b910f522ad75d727346ad64203d7e6c79ef25eafd465f4d12775ca44b90fa82ed9e2c + languageName: node + linkType: hard + "which@npm:^2.0.1, which@npm:^2.0.2": version: 2.0.2 resolution: "which@npm:2.0.2" |