From 52fd12c6ced4235e10825ab1d4b4e9cb6c19e565 Mon Sep 17 00:00:00 2001 From: Niels de Bruijn Date: Wed, 4 Oct 2023 15:30:59 +0200 Subject: [PATCH 1/2] feat: allow memes in support-ops --- src/commands/memes/addon.ts | 4 ++-- src/commands/memes/boratorium.ts | 4 ++-- src/commands/memes/boris.ts | 4 ++-- src/commands/memes/bruheg.ts | 4 ++-- src/commands/memes/coffee.ts | 4 ++-- src/commands/memes/cowsay.ts | 4 ++-- src/commands/memes/crak.ts | 4 ++-- src/commands/memes/default.ts | 4 ++-- src/commands/memes/fms.ts | 4 ++-- src/commands/memes/fridge.ts | 4 ++-- src/commands/memes/guard.ts | 4 ++-- src/commands/memes/juan.ts | 4 ++-- src/commands/memes/mico.ts | 4 ++-- src/commands/memes/nut.ts | 4 ++-- src/commands/memes/oim.ts | 4 ++-- src/commands/memes/otter.ts | 4 ++-- src/commands/memes/p3d.ts | 4 ++-- src/commands/memes/poggers.ts | 4 ++-- src/commands/memes/pov.ts | 4 ++-- src/commands/memes/ptu.ts | 4 ++-- src/commands/memes/pw.ts | 4 ++-- src/commands/memes/shame.ts | 4 ++-- src/commands/memes/shomas.ts | 4 ++-- src/commands/memes/xp.ts | 4 ++-- src/constants.ts | 4 ++++ 25 files changed, 52 insertions(+), 48 deletions(-) diff --git a/src/commands/memes/addon.ts b/src/commands/memes/addon.ts index 3109b130..873a8a6c 100644 --- a/src/commands/memes/addon.ts +++ b/src/commands/memes/addon.ts @@ -1,6 +1,6 @@ import { CommandDefinition } from '../../lib/command'; import { makeEmbed } from '../../lib/embed'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; const ADDON_URL = `${imageBaseUrl}/memes/addon.png`; @@ -9,7 +9,7 @@ export const addon: CommandDefinition = { description: 'addon not mod meme', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => { diff --git a/src/commands/memes/boratorium.ts b/src/commands/memes/boratorium.ts index 963f7bc6..cb51ced1 100644 --- a/src/commands/memes/boratorium.ts +++ b/src/commands/memes/boratorium.ts @@ -1,6 +1,6 @@ import { CommandDefinition } from '../../lib/command'; import { makeEmbed } from '../../lib/embed'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { Channels, ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; const BORATORIUM_URL = `${imageBaseUrl}/memes/boratorium.png`; @@ -9,7 +9,7 @@ export const boratorium: CommandDefinition = { description: 'B O R A T', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS, Channels.SOUND], + channels: ChannelGroups.LiberalChannels.concat(Channels.SOUND), verboseErrors: true, }, executor: (msg) => { diff --git a/src/commands/memes/boris.ts b/src/commands/memes/boris.ts index 95decece..9f02caa1 100644 --- a/src/commands/memes/boris.ts +++ b/src/commands/memes/boris.ts @@ -1,6 +1,6 @@ import { CommandDefinition } from '../../lib/command'; import { makeEmbed } from '../../lib/embed'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { Channels, ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; const BORIS_URL = `${imageBaseUrl}/memes/boris.gif`; @@ -9,7 +9,7 @@ export const boris: CommandDefinition = { description: 'boris soudn', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS, Channels.SOUND], + channels: ChannelGroups.LiberalChannels.concat(Channels.SOUND), verboseErrors: true, }, executor: (msg) => { diff --git a/src/commands/memes/bruheg.ts b/src/commands/memes/bruheg.ts index 5e6ad1c5..77051f45 100644 --- a/src/commands/memes/bruheg.ts +++ b/src/commands/memes/bruheg.ts @@ -1,6 +1,6 @@ import { CommandDefinition } from '../../lib/command'; import { makeEmbed } from '../../lib/embed'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; const BRUHEG_URL = `${imageBaseUrl}/memes/bruheg.png`; @@ -9,7 +9,7 @@ export const bruheg: CommandDefinition = { description: 'bruheg momen', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => { diff --git a/src/commands/memes/coffee.ts b/src/commands/memes/coffee.ts index b4481af1..1fe480a4 100644 --- a/src/commands/memes/coffee.ts +++ b/src/commands/memes/coffee.ts @@ -1,5 +1,5 @@ import { CommandDefinition } from '../../lib/command'; -import { Channels, CommandCategory } from '../../constants'; +import { ChannelGroups, CommandCategory } from '../../constants'; const COFFEE_URL = 'https://www.youtube.com/watch?v=QPfIeVnkZ4Q'; @@ -8,7 +8,7 @@ export const coffee: CommandDefinition = { description: 'Would you like some coffee?', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => msg.channel.send(COFFEE_URL), diff --git a/src/commands/memes/cowsay.ts b/src/commands/memes/cowsay.ts index e2342fad..d95fef82 100644 --- a/src/commands/memes/cowsay.ts +++ b/src/commands/memes/cowsay.ts @@ -1,14 +1,14 @@ import Filter from 'bad-words'; import { say } from 'cowsay'; import { CommandDefinition } from '../../lib/command'; -import { Channels, CommandCategory } from '../../constants'; +import { ChannelGroups, CommandCategory } from '../../constants'; export const cowsay: CommandDefinition = { name: ['cowsay', 'cs'], description: 'Emulates the famous UNIX program `cowsay`.', category: CommandCategory.MEMES, requirements: { - channels: [Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => { diff --git a/src/commands/memes/crak.ts b/src/commands/memes/crak.ts index 93effba0..47f3ac12 100644 --- a/src/commands/memes/crak.ts +++ b/src/commands/memes/crak.ts @@ -1,6 +1,6 @@ import { CommandDefinition } from '../../lib/command'; import { makeEmbed } from '../../lib/embed'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; const CRAK_URL = `${imageBaseUrl}/memes/crak.png`; @@ -9,7 +9,7 @@ export const crak: CommandDefinition = { description: 'What\'s your sim version?', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => { diff --git a/src/commands/memes/default.ts b/src/commands/memes/default.ts index d9ca395d..566fd602 100644 --- a/src/commands/memes/default.ts +++ b/src/commands/memes/default.ts @@ -1,5 +1,5 @@ import { CommandDefinition } from '../../lib/command'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; import { makeEmbed } from '../../lib/embed'; const DEFAULT_URL = `${imageBaseUrl}/memes/default.gif`; @@ -9,7 +9,7 @@ export const defaultmeme: CommandDefinition = { description: 'O_o', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => { diff --git a/src/commands/memes/fms.ts b/src/commands/memes/fms.ts index 65a01e7f..f309d01d 100644 --- a/src/commands/memes/fms.ts +++ b/src/commands/memes/fms.ts @@ -1,6 +1,6 @@ import { CommandDefinition } from '../../lib/command'; import { makeEmbed } from '../../lib/embed'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; const FMS_URL = `${imageBaseUrl}/memes/fms.png`; @@ -9,7 +9,7 @@ export const fms: CommandDefinition = { description: 'That\'s how the real FMS draws it', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => { diff --git a/src/commands/memes/fridge.ts b/src/commands/memes/fridge.ts index 11ea2c0b..c9551ebd 100644 --- a/src/commands/memes/fridge.ts +++ b/src/commands/memes/fridge.ts @@ -1,6 +1,6 @@ import { CommandDefinition } from '../../lib/command'; import { makeEmbed } from '../../lib/embed'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; const FRIDGE_URL = `${imageBaseUrl}/memes/fridge.png`; @@ -9,7 +9,7 @@ export const fridge: CommandDefinition = { description: 'fridge', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => { diff --git a/src/commands/memes/guard.ts b/src/commands/memes/guard.ts index 2e723a00..0f245278 100644 --- a/src/commands/memes/guard.ts +++ b/src/commands/memes/guard.ts @@ -1,5 +1,5 @@ import { CommandDefinition } from '../../lib/command'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; const GUARD_URL = `${imageBaseUrl}/memes/guard.gif`; @@ -8,7 +8,7 @@ export const guard: CommandDefinition = { description: 'MEOW', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => msg.channel.send(GUARD_URL), diff --git a/src/commands/memes/juan.ts b/src/commands/memes/juan.ts index 4ab47e23..c778227d 100644 --- a/src/commands/memes/juan.ts +++ b/src/commands/memes/juan.ts @@ -1,5 +1,5 @@ import { CommandDefinition } from '../../lib/command'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; import { makeEmbed } from '../../lib/embed'; const JAUN_URL = `${imageBaseUrl}/memes/juan.png`; @@ -9,7 +9,7 @@ export const juan: CommandDefinition = { description: 'just... Jaun', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => { diff --git a/src/commands/memes/mico.ts b/src/commands/memes/mico.ts index 124bf1ce..006c2464 100644 --- a/src/commands/memes/mico.ts +++ b/src/commands/memes/mico.ts @@ -1,5 +1,5 @@ import { CommandDefinition } from '../../lib/command'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { Channels, ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; const MICO_URL = `${imageBaseUrl}/memes/mico.png`; @@ -8,7 +8,7 @@ export const mico: CommandDefinition = { description: 'mico!', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS, Channels.SOUND], + channels: ChannelGroups.LiberalChannels.concat(Channels.SOUND), verboseErrors: true, }, executor: (msg) => msg.channel.send(MICO_URL), diff --git a/src/commands/memes/nut.ts b/src/commands/memes/nut.ts index 69cbf886..b8b63c34 100644 --- a/src/commands/memes/nut.ts +++ b/src/commands/memes/nut.ts @@ -1,6 +1,6 @@ import { CommandDefinition } from '../../lib/command'; import { makeEmbed } from '../../lib/embed'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; const NUT_URLS = [ `${imageBaseUrl}/memes/nut.png`, @@ -28,7 +28,7 @@ export const nut: CommandDefinition = { description: 'nut', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => { diff --git a/src/commands/memes/oim.ts b/src/commands/memes/oim.ts index 4d847bba..72eaf7ac 100644 --- a/src/commands/memes/oim.ts +++ b/src/commands/memes/oim.ts @@ -1,5 +1,5 @@ import { CommandDefinition } from '../../lib/command'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; const OIM_URL = `${imageBaseUrl}/memes/oim.gif`; @@ -8,7 +8,7 @@ export const oim: CommandDefinition = { category: CommandCategory.MEMES, description: 'oim', requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => msg.channel.send(OIM_URL), diff --git a/src/commands/memes/otter.ts b/src/commands/memes/otter.ts index 46e7434f..c7190c21 100644 --- a/src/commands/memes/otter.ts +++ b/src/commands/memes/otter.ts @@ -1,12 +1,12 @@ import { CommandDefinition } from '../../lib/command'; -import { Channels, CommandCategory } from '../../constants'; +import { ChannelGroups, CommandCategory } from '../../constants'; export const otter: CommandDefinition = { name: 'otter', description: 'Well, it\'s an otter', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => msg.channel.send('<:otter:905529385292029972>'), diff --git a/src/commands/memes/p3d.ts b/src/commands/memes/p3d.ts index 13f46f8d..861bba4c 100644 --- a/src/commands/memes/p3d.ts +++ b/src/commands/memes/p3d.ts @@ -1,5 +1,5 @@ import { CommandDefinition } from '../../lib/command'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; const P3D_URL = `${imageBaseUrl}/memes/p3d.png`; @@ -8,7 +8,7 @@ export const p3d: CommandDefinition = { description: 'No!', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => msg.channel.send(P3D_URL), diff --git a/src/commands/memes/poggers.ts b/src/commands/memes/poggers.ts index 38bb572d..3625d98c 100644 --- a/src/commands/memes/poggers.ts +++ b/src/commands/memes/poggers.ts @@ -1,5 +1,5 @@ import { CommandDefinition } from '../../lib/command'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; const POGGERS_URL = `${imageBaseUrl}/memes/poggers.gif`; @@ -8,7 +8,7 @@ export const poggers: CommandDefinition = { description: 'POG', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => msg.channel.send(POGGERS_URL), diff --git a/src/commands/memes/pov.ts b/src/commands/memes/pov.ts index aa3e98dc..147d846a 100644 --- a/src/commands/memes/pov.ts +++ b/src/commands/memes/pov.ts @@ -1,5 +1,5 @@ import { CommandDefinition } from '../../lib/command'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; import { makeEmbed } from '../../lib/embed'; const POV_URL = `${imageBaseUrl}/memes/pov_downscaled.gif`; @@ -9,7 +9,7 @@ export const pov: CommandDefinition = { description: 'Oof', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => { diff --git a/src/commands/memes/ptu.ts b/src/commands/memes/ptu.ts index c5b8a82d..0f448675 100644 --- a/src/commands/memes/ptu.ts +++ b/src/commands/memes/ptu.ts @@ -1,5 +1,5 @@ import { CommandDefinition } from '../../lib/command'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; import { makeEmbed } from '../../lib/embed'; const PTU_URL = `${imageBaseUrl}/memes/ptu.jpg`; @@ -9,7 +9,7 @@ export const ptu: CommandDefinition = { description: 'Bark', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => { diff --git a/src/commands/memes/pw.ts b/src/commands/memes/pw.ts index 8e9c7ecd..8a67608c 100644 --- a/src/commands/memes/pw.ts +++ b/src/commands/memes/pw.ts @@ -1,5 +1,5 @@ import { CommandDefinition } from '../../lib/command'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; import { makeEmbed } from '../../lib/embed'; const PW_URL = `${imageBaseUrl}/memes/pw.png`; @@ -9,7 +9,7 @@ export const pw: CommandDefinition = { description: 'Whale noises', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => { diff --git a/src/commands/memes/shame.ts b/src/commands/memes/shame.ts index 034c1df4..0adce75a 100644 --- a/src/commands/memes/shame.ts +++ b/src/commands/memes/shame.ts @@ -1,5 +1,5 @@ import { CommandDefinition } from '../../lib/command'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; const SHAME_URL = `${imageBaseUrl}/memes/shame.gif`; @@ -8,7 +8,7 @@ export const shame: CommandDefinition = { description: 'Shame, shame, shame', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => msg.channel.send(SHAME_URL), diff --git a/src/commands/memes/shomas.ts b/src/commands/memes/shomas.ts index df091965..497c078e 100644 --- a/src/commands/memes/shomas.ts +++ b/src/commands/memes/shomas.ts @@ -1,6 +1,6 @@ import { CommandDefinition } from '../../lib/command'; import { makeEmbed } from '../../lib/embed'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; const SHOMAS_URL = `${imageBaseUrl}/memes/shomas.png`; @@ -9,7 +9,7 @@ export const shomas: CommandDefinition = { description: 'oldest pilot', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => { diff --git a/src/commands/memes/xp.ts b/src/commands/memes/xp.ts index 6d4154db..d885b16c 100644 --- a/src/commands/memes/xp.ts +++ b/src/commands/memes/xp.ts @@ -1,5 +1,5 @@ import { CommandDefinition } from '../../lib/command'; -import { Channels, CommandCategory, imageBaseUrl } from '../../constants'; +import { ChannelGroups, CommandCategory, imageBaseUrl } from '../../constants'; const XP_URL = `${imageBaseUrl}/memes/xp.gif`; @@ -8,7 +8,7 @@ export const xp: CommandDefinition = { description: 'XPlane', category: CommandCategory.MEMES, requirements: { - channels: [Channels.CHAT, Channels.BOT_COMMANDS], + channels: ChannelGroups.LiberalChannels, verboseErrors: true, }, executor: (msg) => msg.channel.send(XP_URL), diff --git a/src/constants.ts b/src/constants.ts index 38c5bc18..239014cc 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -36,6 +36,10 @@ export enum Channels { SOUND = '748761999747579944', } +export const ChannelGroups = { + LiberalChannels: [Channels.CHAT, Channels.BOT_COMMANDS, Channels.SUPPORT_OPS, ] +} + export enum Threads { BIRTHDAY_THREAD = '930923893206679573', COUNT_THREAD = '877049017102659654', From 53a3f311f481634d8d50a4bd28b0840ce7a2b223 Mon Sep 17 00:00:00 2001 From: Sleinmaster <79196358+Sleinmaster@users.noreply.github.com> Date: Mon, 9 Oct 2023 09:41:03 +0200 Subject: [PATCH 2/2] add changelog entry --- .github/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 4054ec8a..04291670 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -1,5 +1,9 @@ ## Changelog +Update _ October 2023 + +- feat: ebable memes in support-ops (09/10/2023) + Update _ August 2023 - feat: enhancing user delete log with reference if a reply is deleted, and with embed and attachment data (27/08/2023)