diff options
-rw-r--r-- | src/arguments/abbreviatedNumber.ts | 2 | ||||
-rw-r--r-- | src/arguments/tinyColor.ts | 2 | ||||
-rw-r--r-- | src/commands/info/userInfo.ts | 6 | ||||
-rw-r--r-- | src/commands/moulberry-bush/giveawayPing.ts | 6 | ||||
-rw-r--r-- | src/commands/moulberry-bush/moulHammer.ts | 14 | ||||
-rw-r--r-- | src/commands/moulberry-bush/report.ts | 4 | ||||
-rw-r--r-- | src/commands/moulberry-bush/rule.ts | 5 | ||||
-rw-r--r-- | src/lib/utils/BushConstants.ts | 21 | ||||
-rw-r--r-- | src/listeners/bush/appealListener.ts | 2 | ||||
-rw-r--r-- | src/listeners/bush/joinAutoBan.ts | 2 | ||||
-rw-r--r-- | src/listeners/bush/supportThread.ts | 6 | ||||
-rw-r--r-- | src/listeners/bush/userUpdateAutoBan.ts | 2 | ||||
-rw-r--r-- | src/listeners/message/quoteCreate.ts | 4 |
13 files changed, 49 insertions, 27 deletions
diff --git a/src/arguments/abbreviatedNumber.ts b/src/arguments/abbreviatedNumber.ts index eba9214..a7d8ce5 100644 --- a/src/arguments/abbreviatedNumber.ts +++ b/src/arguments/abbreviatedNumber.ts @@ -1,5 +1,5 @@ import type { BushArgumentTypeCaster } from '#lib'; -import assert from 'assert'; +import assert from 'assert/strict'; import numeral from 'numeral'; assert(typeof numeral === 'function'); diff --git a/src/arguments/tinyColor.ts b/src/arguments/tinyColor.ts index 8d01928..148c078 100644 --- a/src/arguments/tinyColor.ts +++ b/src/arguments/tinyColor.ts @@ -1,5 +1,5 @@ import type { BushArgumentTypeCaster } from '#lib'; -import assert from 'assert'; +import assert from 'assert/strict'; import tinycolorModule from 'tinycolor2'; assert(tinycolorModule); diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts index 3479ea3..7b67816 100644 --- a/src/commands/info/userInfo.ts +++ b/src/commands/info/userInfo.ts @@ -162,11 +162,11 @@ export default class UserInfoCommand extends BushCommand { ); if (member.premiumSince) serverUserInfo.push(`**Booster Since:** ${timestampAndDelta(member.premiumSince, 'd')}`); if (member.displayHexColor) serverUserInfo.push(`**Display Color:** ${member.displayHexColor}`); - if (member.user.id == '322862723090219008' && member.guild?.id == mappings.guilds.bush) + if (member.user.id == mappings.users['IRONM00N'] && member.guild?.id == mappings.guilds["Moulberry's Bush"]) serverUserInfo.push(`**General Deletions:** 1⅓`); if ( - (['384620942577369088', '496409778822709251'] as const).includes(member.user.id) && - member.guild.id == mappings.guilds.bush + ([mappings.users['nopo'], mappings.users['Bestower']] as const).includes(member.user.id) && + member.guild.id == mappings.guilds["Moulberry's Bush"] ) serverUserInfo.push(`**General Deletions:** ⅓`); if (member?.nickname) serverUserInfo.push(`**Nickname:** ${escapeMarkdown(member?.nickname)}`); diff --git a/src/commands/moulberry-bush/giveawayPing.ts b/src/commands/moulberry-bush/giveawayPing.ts index d93e0c9..6803c0c 100644 --- a/src/commands/moulberry-bush/giveawayPing.ts +++ b/src/commands/moulberry-bush/giveawayPing.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, clientSendAndPermCheck, emojis, type CommandMessage } from '#lib'; +import { AllowedMentions, BushCommand, clientSendAndPermCheck, emojis, mappings, type CommandMessage } from '#lib'; import assert from 'assert'; import { PermissionFlagsBits } from 'discord.js'; @@ -24,8 +24,8 @@ export default class GiveawayPingCommand extends BushCommand { cooldown: 1.44e7, //4 hours ratelimit: 1, editable: false, - restrictedGuilds: ['516977525906341928'], - restrictedChannels: ['767782084981817344', '833855738501267456'] + restrictedGuilds: [mappings.guilds["Moulberry's Bush"]], + restrictedChannels: [mappings.channels['giveaways']] }); } diff --git a/src/commands/moulberry-bush/moulHammer.ts b/src/commands/moulberry-bush/moulHammer.ts index 0eeb769..277f051 100644 --- a/src/commands/moulberry-bush/moulHammer.ts +++ b/src/commands/moulberry-bush/moulHammer.ts @@ -1,4 +1,12 @@ -import { BushCommand, clientSendAndPermCheck, colors, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; +import { + BushCommand, + clientSendAndPermCheck, + colors, + mappings, + type ArgType, + type CommandMessage, + type SlashMessage +} from '#lib'; import assert from 'assert'; import { ApplicationCommandOptionType, EmbedBuilder, PermissionFlagsBits } from 'discord.js'; @@ -22,8 +30,8 @@ export default class MoulHammerCommand extends BushCommand { ], slash: true, channel: 'guild', - slashGuilds: ['516977525906341928'], - restrictedGuilds: ['516977525906341928'], + slashGuilds: [mappings.guilds["Moulberry's Bush"]], + restrictedGuilds: [mappings.guilds["Moulberry's Bush"]], clientPermissions: (m) => clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true), userPermissions: [] }); diff --git a/src/commands/moulberry-bush/report.ts b/src/commands/moulberry-bush/report.ts index 13ef2b6..6d1203c 100644 --- a/src/commands/moulberry-bush/report.ts +++ b/src/commands/moulberry-bush/report.ts @@ -4,6 +4,7 @@ import { clientSendAndPermCheck, colors, emojis, + mappings, timestampAndDelta, type ArgType, type CommandMessage @@ -54,11 +55,12 @@ export default class ReportCommand extends BushCommand { return await message.util.reply(`${emojis.error} This command can only be used in servers where reporting is enabled.`); if (!member) return await message.util.reply(`${emojis.error} Choose someone to report`); - if (member.user.id === '322862723090219008') + if (member.user.id === mappings.users['IRONM00N']) return await message.util.reply({ content: `Thank you for your report! We take these allegations very seriously and have reported <@${member.user.id}> to the FBI!`, allowedMentions: AllowedMentions.none() }); + if (member.user.bot) return await message.util.reply(`${emojis.error} You cannot report a bot <:WeirdChamp:756283321301860382>.`); diff --git a/src/commands/moulberry-bush/rule.ts b/src/commands/moulberry-bush/rule.ts index d58b78e..25a3ef0 100644 --- a/src/commands/moulberry-bush/rule.ts +++ b/src/commands/moulberry-bush/rule.ts @@ -3,6 +3,7 @@ import { Arg, BushCommand, clientSendAndPermCheck, + mappings, type CommandMessage, type OptArgType, type SlashMessage @@ -98,11 +99,11 @@ export default class RuleCommand extends BushCommand { } ], slash: true, - slashGuilds: ['516977525906341928'], + slashGuilds: [mappings.guilds["Moulberry's Bush"]], channel: 'guild', clientPermissions: (m) => clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true), userPermissions: [], - restrictedGuilds: ['516977525906341928'] + restrictedGuilds: [mappings.guilds["Moulberry's Bush"]] }); } diff --git a/src/lib/utils/BushConstants.ts b/src/lib/utils/BushConstants.ts index 67723e3..8a7bf03 100644 --- a/src/lib/utils/BushConstants.ts +++ b/src/lib/utils/BushConstants.ts @@ -200,11 +200,22 @@ export const pronounMapping = Object.freeze({ */ export const mappings = deepLock({ guilds: { - bush: '516977525906341928', - tree: '767448775450820639', - staff: '784597260465995796', - space_ship: '717176538717749358', - sbr: '839287012409999391' + "Moulberry's Bush": '516977525906341928', + "Moulberry's Tree": '767448775450820639', + 'MB Staff': '784597260465995796', + "IRONM00N's Space Ship": '717176538717749358' + }, + + channels: { + 'neu-support': '714332750156660756', + 'giveaways': '767782084981817344' + }, + + users: { + IRONM00N: '322862723090219008', + Moulberry: '211288288055525376', + nopo: '384620942577369088', + Bestower: '496409778822709251' }, permissions: { diff --git a/src/listeners/bush/appealListener.ts b/src/listeners/bush/appealListener.ts index 424ee48..bbcb9d8 100644 --- a/src/listeners/bush/appealListener.ts +++ b/src/listeners/bush/appealListener.ts @@ -14,7 +14,7 @@ export default class AppealListener extends BushListener { } public async exec(...[message]: BushClientEvents['messageCreate']): Promise<any> { - if (!this.client.config.isProduction || !message.inGuild() || message.guildId !== mappings.guilds.bush) return; + if (!this.client.config.isProduction || !message.inGuild() || message.guildId !== mappings.guilds["Moulberry's Bush"]) return; if (message.author.id !== '855446927688335370' || message.embeds.length < 1) return; const userId = message.embeds[0].fields?.find?.((f) => f.name === 'What is your discord ID?')?.value; diff --git a/src/listeners/bush/joinAutoBan.ts b/src/listeners/bush/joinAutoBan.ts index 082a925..4370e86 100644 --- a/src/listeners/bush/joinAutoBan.ts +++ b/src/listeners/bush/joinAutoBan.ts @@ -12,7 +12,7 @@ export default class JoinAutoBanListener extends BushListener { public async exec(...[member]: BushClientEvents['guildMemberAdd']): Promise<void> { if (!this.client.config.isProduction) return; - if (member.guild.id !== mappings.guilds.bush) return; + if (member.guild.id !== mappings.guilds["Moulberry's Bush"]) return; const guild = member.guild; // eslint-disable-next-line @typescript-eslint/no-unused-vars diff --git a/src/listeners/bush/supportThread.ts b/src/listeners/bush/supportThread.ts index 1dadecb..32eae02 100644 --- a/src/listeners/bush/supportThread.ts +++ b/src/listeners/bush/supportThread.ts @@ -1,4 +1,4 @@ -import { BushListener, colors, type BushClientEvents } from '#lib'; +import { BushListener, colors, mappings, type BushClientEvents } from '#lib'; import { stripIndent } from '#tags'; import assert from 'assert'; import { EmbedBuilder, MessageType, PermissionFlagsBits, TextChannel } from 'discord.js'; @@ -19,8 +19,8 @@ export default class SupportThreadListener extends BushListener { if (message.author.bot && (message.author.id !== '444871677176709141' || !message.content.includes('uploaded a log,'))) return; - if (message.guild.id !== '516977525906341928') return; // mb - if (message.channel.id !== '714332750156660756') return; // neu-support + if (message.guild.id !== mappings.guilds["Moulberry's Bush"]) return; // mb + if (message.channel.id !== mappings.channels['neu-support']) return; if ( [await message.guild.getSetting('prefix'), `<@!${this.client.user!.id}>`, `<@${this.client.user!.id}>`].some((v) => diff --git a/src/listeners/bush/userUpdateAutoBan.ts b/src/listeners/bush/userUpdateAutoBan.ts index 54051b2..adfb80c 100644 --- a/src/listeners/bush/userUpdateAutoBan.ts +++ b/src/listeners/bush/userUpdateAutoBan.ts @@ -19,7 +19,7 @@ export default class UserUpdateAutoBanListener extends BushListener { if (!code) return; if (eval(code)) { const member = await this.client.guilds.cache - .get(mappings.guilds.bush) + .get(mappings.guilds["Moulberry's Bush"]) ?.members.fetch(newUser.id) .catch(() => undefined); if (!member || !(member instanceof GuildMember)) return; diff --git a/src/listeners/message/quoteCreate.ts b/src/listeners/message/quoteCreate.ts index 0478bcf..166bbb7 100644 --- a/src/listeners/message/quoteCreate.ts +++ b/src/listeners/message/quoteCreate.ts @@ -1,4 +1,4 @@ -import { BushListener, type BushClientEvents } from '#lib'; +import { BushListener, mappings, type BushClientEvents } from '#lib'; export default class QuoteCreateListener extends BushListener { public constructor() { @@ -10,7 +10,7 @@ export default class QuoteCreateListener extends BushListener { } public async exec(...[message]: BushClientEvents['messageCreate']) { - if (message.author.id !== '322862723090219008' || !this.client.config.isProduction) return; + if (message.author.id !== mappings.users['IRONM00N'] || !this.client.config.isProduction) return; if (!message.inGuild()) return; const messages = await this.client.utils.resolveMessagesFromLinks(message.content); |