mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-18 22:05:30 +02:00
feat(arabot): add fun cringe command
Adds a new feature that introduces a fun and cringe-worthy command.
This commit is contained in:
parent
4b999f0a5c
commit
39d0043937
@ -29,3 +29,4 @@ a user, it will display that user's rank instead.
|
|||||||
- `/poke`
|
- `/poke`
|
||||||
- `/sad`
|
- `/sad`
|
||||||
- `/shrug`
|
- `/shrug`
|
||||||
|
- `/cringe`
|
64
src/commands/fun/cringe.ts
Normal file
64
src/commands/fun/cringe.ts
Normal file
@ -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 <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
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 });
|
||||||
|
}
|
||||||
|
}
|
@ -9,7 +9,7 @@ export const Hugs = [
|
|||||||
'https://c.tenor.com/16n9S22q870AAAAC/cute-boy.gif',
|
'https://c.tenor.com/16n9S22q870AAAAC/cute-boy.gif',
|
||||||
'https://c.tenor.com/cdk8SjH32okAAAAC/dog-pig.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://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 = [
|
export const Kill = [
|
||||||
@ -18,7 +18,7 @@ export const Kill = [
|
|||||||
'https://c.tenor.com/OzKRQVQWOxgAAAAC/penguin-push.gif',
|
'https://c.tenor.com/OzKRQVQWOxgAAAAC/penguin-push.gif',
|
||||||
'https://c.tenor.com/P3ISPtq4tyMAAAAC/horse-animals.gif',
|
'https://c.tenor.com/P3ISPtq4tyMAAAAC/horse-animals.gif',
|
||||||
'https://c.tenor.com/6BtYZBaOTjsAAAAC/kangaroos-fun.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/8TfmfQv5lqgAAAAC/doggo-killing-cat.gif',
|
||||||
'https://c.tenor.com/N1eC5_O9KiAAAAAd/justketh-goose-attack.gif',
|
'https://c.tenor.com/N1eC5_O9KiAAAAAd/justketh-goose-attack.gif',
|
||||||
'https://c.tenor.com/lSGhAaUU2iQAAAAC/honk-honk-am-goose-cute.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/dcxOO-080OcAAAAd/discord-moderators.gif',
|
||||||
'https://c.tenor.com/-cUS-fPIEBsAAAAd/5second-slow-mode-1984.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',
|
||||||
|
];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user