From 95d6093ae6fcf526c1133ff8345e8d6c699145ea Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 14 Oct 2023 15:02:41 +0000 Subject: [PATCH 1/3] fix(deps): update dependency bullmq to v4.12.4 --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8743a52..7135d72 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1217,9 +1217,9 @@ } }, "node_modules/bullmq": { - "version": "4.12.3", - "resolved": "https://registry.npmjs.org/bullmq/-/bullmq-4.12.3.tgz", - "integrity": "sha512-4uPp4NQTALFF+eFK7g8VJM+rt0aiduQdzBomgiEO1OK4OE+TdgC6cjGXooKI/asuB8iDhSZ+pSnGYy5Xyr6qRA==", + "version": "4.12.4", + "resolved": "https://registry.npmjs.org/bullmq/-/bullmq-4.12.4.tgz", + "integrity": "sha512-t+vMfvc2gVZUZWXd0jMh3vr5K83ZEfwwaiLW2HlL+W76ktWzOpwDqkWHmLwu98xylpPI1YcZ2WoGcqG6RsnKiA==", "dependencies": { "cron-parser": "^4.6.0", "glob": "^8.0.3", @@ -4656,9 +4656,9 @@ } }, "bullmq": { - "version": "4.12.3", - "resolved": "https://registry.npmjs.org/bullmq/-/bullmq-4.12.3.tgz", - "integrity": "sha512-4uPp4NQTALFF+eFK7g8VJM+rt0aiduQdzBomgiEO1OK4OE+TdgC6cjGXooKI/asuB8iDhSZ+pSnGYy5Xyr6qRA==", + "version": "4.12.4", + "resolved": "https://registry.npmjs.org/bullmq/-/bullmq-4.12.4.tgz", + "integrity": "sha512-t+vMfvc2gVZUZWXd0jMh3vr5K83ZEfwwaiLW2HlL+W76ktWzOpwDqkWHmLwu98xylpPI1YcZ2WoGcqG6RsnKiA==", "requires": { "cron-parser": "^4.6.0", "glob": "^8.0.3", From 4b999f0a5ce0510dbd2e6073d5bf07663c330b78 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 14 Oct 2023 15:02:55 +0000 Subject: [PATCH 2/3] fix(deps): update dependency redis to v4.6.10 --- package-lock.json | 76 +++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7135d72..f41668b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -405,9 +405,9 @@ } }, "node_modules/@redis/client": { - "version": "1.5.8", - "resolved": "https://registry.npmjs.org/@redis/client/-/client-1.5.8.tgz", - "integrity": "sha512-xzElwHIO6rBAqzPeVnCzgvrnBEcFL1P0w8P65VNLRkdVW8rOE58f52hdj0BDgmsdOm4f1EoXPZtH4Fh7M/qUpw==", + "version": "1.5.11", + "resolved": "https://registry.npmjs.org/@redis/client/-/client-1.5.11.tgz", + "integrity": "sha512-cV7yHcOAtNQ5x/yQl7Yw1xf53kO0FNDTdDU6bFIMbW6ljB7U7ns0YRM+QIkpoqTAt6zK5k9Fq0QWlUbLcq9AvA==", "dependencies": { "cluster-key-slot": "1.1.2", "generic-pool": "3.9.0", @@ -426,25 +426,25 @@ } }, "node_modules/@redis/json": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@redis/json/-/json-1.0.4.tgz", - "integrity": "sha512-LUZE2Gdrhg0Rx7AN+cZkb1e6HjoSKaeeW8rYnt89Tly13GBI5eP4CwDVr+MY8BAYfCg4/N15OUrtLoona9uSgw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@redis/json/-/json-1.0.6.tgz", + "integrity": "sha512-rcZO3bfQbm2zPRpqo82XbW8zg4G/w4W3tI7X8Mqleq9goQjAGLL7q/1n1ZX4dXEAmORVZ4s1+uKLaUOg7LrUhw==", "peerDependencies": { "@redis/client": "^1.0.0" } }, "node_modules/@redis/search": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@redis/search/-/search-1.1.3.tgz", - "integrity": "sha512-4Dg1JjvCevdiCBTZqjhKkGoC5/BcB7k9j99kdMnaXFXg8x4eyOIVg9487CMv7/BUVkFLZCaIh8ead9mU15DNng==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@redis/search/-/search-1.1.5.tgz", + "integrity": "sha512-hPP8w7GfGsbtYEJdn4n7nXa6xt6hVZnnDktKW4ArMaFQ/m/aR7eFvsLQmG/mn1Upq99btPJk+F27IQ2dYpCoUg==", "peerDependencies": { "@redis/client": "^1.0.0" } }, "node_modules/@redis/time-series": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-1.0.4.tgz", - "integrity": "sha512-ThUIgo2U/g7cCuZavucQTQzA9g9JbDDY2f64u3AbAoz/8vE2lt2U37LamDUVChhaDA3IRT9R6VvJwqnUfTJzng==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-1.0.5.tgz", + "integrity": "sha512-IFjIgTusQym2B5IZJG3XKr5llka7ey84fw/NOYqESP5WUfQs9zz1ww/9+qoz4ka/S6KcGBodzlCeZ5UImKbscg==", "peerDependencies": { "@redis/client": "^1.0.0" } @@ -3141,16 +3141,16 @@ ] }, "node_modules/redis": { - "version": "4.6.7", - "resolved": "https://registry.npmjs.org/redis/-/redis-4.6.7.tgz", - "integrity": "sha512-KrkuNJNpCwRm5vFJh0tteMxW8SaUzkm5fBH7eL5hd/D0fAkzvapxbfGPP/r+4JAXdQuX7nebsBkBqA2RHB7Usw==", + "version": "4.6.10", + "resolved": "https://registry.npmjs.org/redis/-/redis-4.6.10.tgz", + "integrity": "sha512-mmbyhuKgDiJ5TWUhiKhBssz+mjsuSI/lSZNPI9QvZOYzWvYGejtb+W3RlDDf8LD6Bdl5/mZeG8O1feUGhXTxEg==", "dependencies": { "@redis/bloom": "1.2.0", - "@redis/client": "1.5.8", + "@redis/client": "1.5.11", "@redis/graph": "1.1.0", - "@redis/json": "1.0.4", - "@redis/search": "1.1.3", - "@redis/time-series": "1.0.4" + "@redis/json": "1.0.6", + "@redis/search": "1.1.5", + "@redis/time-series": "1.0.5" } }, "node_modules/redis-errors": { @@ -4098,9 +4098,9 @@ "requires": {} }, "@redis/client": { - "version": "1.5.8", - "resolved": "https://registry.npmjs.org/@redis/client/-/client-1.5.8.tgz", - "integrity": "sha512-xzElwHIO6rBAqzPeVnCzgvrnBEcFL1P0w8P65VNLRkdVW8rOE58f52hdj0BDgmsdOm4f1EoXPZtH4Fh7M/qUpw==", + "version": "1.5.11", + "resolved": "https://registry.npmjs.org/@redis/client/-/client-1.5.11.tgz", + "integrity": "sha512-cV7yHcOAtNQ5x/yQl7Yw1xf53kO0FNDTdDU6bFIMbW6ljB7U7ns0YRM+QIkpoqTAt6zK5k9Fq0QWlUbLcq9AvA==", "requires": { "cluster-key-slot": "1.1.2", "generic-pool": "3.9.0", @@ -4114,21 +4114,21 @@ "requires": {} }, "@redis/json": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@redis/json/-/json-1.0.4.tgz", - "integrity": "sha512-LUZE2Gdrhg0Rx7AN+cZkb1e6HjoSKaeeW8rYnt89Tly13GBI5eP4CwDVr+MY8BAYfCg4/N15OUrtLoona9uSgw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@redis/json/-/json-1.0.6.tgz", + "integrity": "sha512-rcZO3bfQbm2zPRpqo82XbW8zg4G/w4W3tI7X8Mqleq9goQjAGLL7q/1n1ZX4dXEAmORVZ4s1+uKLaUOg7LrUhw==", "requires": {} }, "@redis/search": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@redis/search/-/search-1.1.3.tgz", - "integrity": "sha512-4Dg1JjvCevdiCBTZqjhKkGoC5/BcB7k9j99kdMnaXFXg8x4eyOIVg9487CMv7/BUVkFLZCaIh8ead9mU15DNng==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@redis/search/-/search-1.1.5.tgz", + "integrity": "sha512-hPP8w7GfGsbtYEJdn4n7nXa6xt6hVZnnDktKW4ArMaFQ/m/aR7eFvsLQmG/mn1Upq99btPJk+F27IQ2dYpCoUg==", "requires": {} }, "@redis/time-series": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-1.0.4.tgz", - "integrity": "sha512-ThUIgo2U/g7cCuZavucQTQzA9g9JbDDY2f64u3AbAoz/8vE2lt2U37LamDUVChhaDA3IRT9R6VvJwqnUfTJzng==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-1.0.5.tgz", + "integrity": "sha512-IFjIgTusQym2B5IZJG3XKr5llka7ey84fw/NOYqESP5WUfQs9zz1ww/9+qoz4ka/S6KcGBodzlCeZ5UImKbscg==", "requires": {} }, "@sapphire/async-queue": { @@ -6076,16 +6076,16 @@ "dev": true }, "redis": { - "version": "4.6.7", - "resolved": "https://registry.npmjs.org/redis/-/redis-4.6.7.tgz", - "integrity": "sha512-KrkuNJNpCwRm5vFJh0tteMxW8SaUzkm5fBH7eL5hd/D0fAkzvapxbfGPP/r+4JAXdQuX7nebsBkBqA2RHB7Usw==", + "version": "4.6.10", + "resolved": "https://registry.npmjs.org/redis/-/redis-4.6.10.tgz", + "integrity": "sha512-mmbyhuKgDiJ5TWUhiKhBssz+mjsuSI/lSZNPI9QvZOYzWvYGejtb+W3RlDDf8LD6Bdl5/mZeG8O1feUGhXTxEg==", "requires": { "@redis/bloom": "1.2.0", - "@redis/client": "1.5.8", + "@redis/client": "1.5.11", "@redis/graph": "1.1.0", - "@redis/json": "1.0.4", - "@redis/search": "1.1.3", - "@redis/time-series": "1.0.4" + "@redis/json": "1.0.6", + "@redis/search": "1.1.5", + "@redis/time-series": "1.0.5" } }, "redis-errors": { From 39d00439373010256ed1a98cceb3bba7a26c3928 Mon Sep 17 00:00:00 2001 From: Stefanie Merceron Date: Sat, 28 Oct 2023 02:08:44 -0400 Subject: [PATCH 3/3] feat(arabot): add fun cringe command Adds a new feature that introduces a fun and cringe-worthy command. --- docs/commands/GENERAL.md | 1 + src/commands/fun/cringe.ts | 64 ++++++++++++++++++++++++++++++++++++++ src/utils/gifs.ts | 17 ++++++++-- tsconfig.json | 2 +- 4 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 src/commands/fun/cringe.ts diff --git a/docs/commands/GENERAL.md b/docs/commands/GENERAL.md index b5a4ad9..eb1a1cc 100644 --- a/docs/commands/GENERAL.md +++ b/docs/commands/GENERAL.md @@ -29,3 +29,4 @@ a user, it will display that user's rank instead. - `/poke` - `/sad` - `/shrug` +- `/cringe` \ No newline at end of file diff --git a/src/commands/fun/cringe.ts b/src/commands/fun/cringe.ts new file mode 100644 index 0000000..aae26dc --- /dev/null +++ b/src/commands/fun/cringe.ts @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +/* + Animal Rights Advocates Discord Bot + Copyright (C) 2023 Anthony Berg, Stefanie Merceron + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + +import { Command, RegisterBehavior } from '@sapphire/framework'; +import { EmbedBuilder } from 'discord.js'; +import { Cringe } from '#utils/gifs'; +import { addFunLog, countTotal } from '#utils/database/fun'; + +export class CringeCommand extends Command { + public constructor(context: Command.Context, options: Command.Options) { + super(context, { + ...options, + name: 'cringe', + description: 'Express your cringe', + }); + } + + // Registers that this is a slash command + public override registerApplicationCommands(registry: Command.Registry) { + registry.registerChatInputCommand( + (builder) => builder.setName(this.name).setDescription(this.description), + { + behaviorWhenNotIdentical: RegisterBehavior.Overwrite, + } + ); + } + + // Command run + public async chatInputRun(interaction: Command.ChatInputCommandInteraction) { + // Get the user + // TODO exception handling + const { user } = interaction; + + await addFunLog(user.id, 'cringe'); + const count = await countTotal(user.id, 'cringe'); + + // Creates the embed for the cringe reaction + const randomCringe = Cringe[Math.floor(Math.random() * Cringe.length)]; + const cringeEmbed = new EmbedBuilder() + .setColor('#001148') + .setTitle(`${user.username} feels immense cringe...`) + .setImage(randomCringe) + .setFooter({ text: `${user.username}'s cringe count: ${count}` }); + + // Send the embed + await interaction.reply({ embeds: [cringeEmbed], fetchReply: true }); + } +} diff --git a/src/utils/gifs.ts b/src/utils/gifs.ts index ca8c7a5..0694bb4 100644 --- a/src/utils/gifs.ts +++ b/src/utils/gifs.ts @@ -9,7 +9,7 @@ export const Hugs = [ 'https://c.tenor.com/16n9S22q870AAAAC/cute-boy.gif', 'https://c.tenor.com/cdk8SjH32okAAAAC/dog-pig.gif', 'https://c.tenor.com/9mLPT5v1ah8AAAAd/how-to-introduce-your-cat-to-a-bunny-cat.gif', - 'https://media.tenor.com/QnzyFMrXfr0AAAAC/bear-bruh.gif', // Thanks to Jonquil (277429709711605761) <3 + 'https://c.tenor.com/QnzyFMrXfr0AAAAC/bear-bruh.gif', // Thanks to Jonquil (277429709711605761) <3 ]; export const Kill = [ @@ -18,7 +18,7 @@ export const Kill = [ 'https://c.tenor.com/OzKRQVQWOxgAAAAC/penguin-push.gif', 'https://c.tenor.com/P3ISPtq4tyMAAAAC/horse-animals.gif', 'https://c.tenor.com/6BtYZBaOTjsAAAAC/kangaroos-fun.gif', - 'https://media.tenor.com/ntRZRkjP_2MAAAAC/kitten-cat.gif', + 'https://c.tenor.com/ntRZRkjP_2MAAAAC/kitten-cat.gif', 'https://c.tenor.com/8TfmfQv5lqgAAAAC/doggo-killing-cat.gif', 'https://c.tenor.com/N1eC5_O9KiAAAAAd/justketh-goose-attack.gif', 'https://c.tenor.com/lSGhAaUU2iQAAAAC/honk-honk-am-goose-cute.gif', @@ -68,3 +68,16 @@ export const N1984 = [ 'https://c.tenor.com/dcxOO-080OcAAAAd/discord-moderators.gif', 'https://c.tenor.com/-cUS-fPIEBsAAAAd/5second-slow-mode-1984.gif', ]; + +export const Cringe = [ + 'https://c.tenor.com/bgR1joaDW6AAAAAd/modcheck-discord.gif', + 'https://c.tenor.com/cF6QU65nSpoAAAAd/cringe.gif', + 'https://c.tenor.com/6COELe56B8IAAAAC/confused-turn-around.gif', + 'https://c.tenor.com/tEEjB0RnxyAAAAAC/puppet-awkward.gif', + 'https://c.tenor.com/VNlo9wZpYvsAAAAd/bruh.gif', + 'https://c.tenor.com/BuS697n_PjMAAAAC/squidward-squidward-tentacles.gif', + 'https://c.tenor.com/_BiwWBWhYucAAAAd/what-huh.gif', + 'https://c.tenor.com/Zm4UTU5fw2UAAAAd/bruh.gif', + 'https://c.tenor.com/d7Xd91nKnDUAAAAC/my-eyes-ugly.gif', + 'https://c.tenor.com/bzpFHIbvpJMAAAAd/cat-bruh.gif', +]; diff --git a/tsconfig.json b/tsconfig.json index 4525233..b5a1dec 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -104,4 +104,4 @@ // "skipLibCheck": true /* Skip type checking all .d.ts files. */ }, "include": ["src"] -} +} \ No newline at end of file