Migrate play command to slash command

This commit is contained in:
Max Isom 2021-12-12 20:22:21 -05:00
parent fa4ba0bb9a
commit dcb1351791
No known key found for this signature in database
GPG key ID: 25C9B1A7F6798880
9 changed files with 153 additions and 172 deletions

View file

@ -72,12 +72,15 @@
} }
}, },
"dependencies": { "dependencies": {
"@discordjs/builders": "^0.9.0",
"@discordjs/opus": "^0.7.0", "@discordjs/opus": "^0.7.0",
"@discordjs/rest": "^0.1.0-canary.0",
"@discordjs/voice": "^0.7.5", "@discordjs/voice": "^0.7.5",
"@types/libsodium-wrappers": "^0.7.9", "@types/libsodium-wrappers": "^0.7.9",
"array-shuffle": "^3.0.0", "array-shuffle": "^3.0.0",
"debug": "^4.3.1", "debug": "^4.3.1",
"delay": "^5.0.0", "delay": "^5.0.0",
"discord-api-types": "^0.25.2",
"discord.js": "^13.3.0", "discord.js": "^13.3.0",
"dotenv": "^8.5.1", "dotenv": "^8.5.1",
"fluent-ffmpeg": "^2.1.2", "fluent-ffmpeg": "^2.1.2",

View file

@ -1,113 +1,91 @@
import {Client, Message, Collection} from 'discord.js'; import {Client, Collection, User} from 'discord.js';
import {inject, injectable} from 'inversify'; import {inject, injectable} from 'inversify';
import {TYPES} from './types.js'; import {TYPES} from './types.js';
import {Settings, Shortcut} from './models/index.js';
import container from './inversify.config.js'; import container from './inversify.config.js';
import Command from './commands/index.js'; import Command from './commands/index.js';
import debug from './utils/debug.js'; import debug from './utils/debug.js';
import NaturalLanguage from './services/natural-language-commands.js';
import handleGuildCreate from './events/guild-create.js'; import handleGuildCreate from './events/guild-create.js';
import handleVoiceStateUpdate from './events/voice-state-update.js'; import handleVoiceStateUpdate from './events/voice-state-update.js';
import errorMsg from './utils/error-msg.js'; import errorMsg from './utils/error-msg.js';
import {isUserInVoice} from './utils/channels.js'; import {isUserInVoice} from './utils/channels.js';
import Config from './services/config.js'; import Config from './services/config.js';
import {generateDependencyReport} from '@discordjs/voice'; import {generateDependencyReport} from '@discordjs/voice';
import {REST} from '@discordjs/rest';
import {Routes} from 'discord-api-types/v9';
@injectable() @injectable()
export default class { export default class {
private readonly client: Client; private readonly client: Client;
private readonly naturalLanguage: NaturalLanguage;
private readonly token: string; private readonly token: string;
private readonly commands!: Collection<string, Command>; private readonly commands!: Collection<string, Command>;
constructor(@inject(TYPES.Client) client: Client, @inject(TYPES.Services.NaturalLanguage) naturalLanguage: NaturalLanguage, @inject(TYPES.Config) config: Config) { constructor(@inject(TYPES.Client) client: Client, @inject(TYPES.Config) config: Config) {
this.client = client; this.client = client;
this.naturalLanguage = naturalLanguage;
this.token = config.DISCORD_TOKEN; this.token = config.DISCORD_TOKEN;
this.commands = new Collection(); this.commands = new Collection();
} }
public async listen(): Promise<string> { public async listen(): Promise<void> {
// Load in commands // Load in commands
container.getAll<Command>(TYPES.Command).forEach(command => { container.getAll<Command>(TYPES.Command).forEach(command => {
const commandNames = [command.name, ...command.aliases]; // TODO: remove !
if (command.slashCommand?.name) {
commandNames.forEach(commandName => this.commands.set(commandName, command)); this.commands.set(command.slashCommand.name, command);
}
}); });
this.client.on('messageCreate', async (msg: Message) => { // Register event handlers
// Get guild settings this.client.on('interactionCreate', async interaction => {
if (!msg.guild) { if (!interaction.isCommand()) {
return; return;
} }
const settings = await Settings.findByPk(msg.guild.id); const command = this.commands.get(interaction.commandName);
if (!settings) { if (!command) {
// Got into a bad state, send owner welcome message
this.client.emit('guildCreate', msg.guild);
return; return;
} }
const {prefix, channel} = settings; if (!interaction.guild) {
await interaction.reply(errorMsg('you can\'t use this bot in a DM'));
if (!msg.content.startsWith(prefix) && !msg.author.bot && msg.channel.id === channel && await this.naturalLanguage.execute(msg)) {
// Natural language command handled message
return;
}
if (!msg.content.startsWith(prefix) || msg.author.bot || msg.channel.id !== channel) {
return;
}
let args = msg.content.slice(prefix.length).split(/ +/);
const command = args.shift()!.toLowerCase();
// Get possible shortcut
const shortcut = await Shortcut.findOne({where: {guildId: msg.guild.id, shortcut: command}});
let handler: Command;
if (this.commands.has(command)) {
handler = this.commands.get(command)!;
} else if (shortcut) {
const possibleHandler = this.commands.get(shortcut.command.split(' ')[0]);
if (possibleHandler) {
handler = possibleHandler;
args = shortcut.command.split(/ +/).slice(1);
} else {
return;
}
} else {
return; return;
} }
try { try {
if (handler.requiresVC && !isUserInVoice(msg.guild, msg.author)) { if (command.requiresVC && !isUserInVoice(interaction.guild, interaction.member.user as User)) {
await msg.channel.send(errorMsg('gotta be in a voice channel')); await interaction.reply({content: errorMsg('gotta be in a voice channel'), ephemeral: true});
return; return;
} }
await handler.execute(msg, args); if (command.executeFromInteraction) {
await command.executeFromInteraction(interaction);
}
} catch (error: unknown) { } catch (error: unknown) {
debug(error); debug(error);
await msg.channel.send(errorMsg((error as Error).message.toLowerCase())); await interaction.reply({content: errorMsg(error as Error), ephemeral: true});
} }
}); });
this.client.on('ready', async () => { this.client.once('ready', async () => {
debug(generateDependencyReport()); debug(generateDependencyReport());
console.log(`Ready! Invite the bot with https://discordapp.com/oauth2/authorize?client_id=${this.client.user?.id ?? ''}&scope=bot&permissions=36752448`); console.log(`Ready! Invite the bot with https://discordapp.com/oauth2/authorize?client_id=${this.client.user?.id ?? ''}&scope=bot&permissions=2184236096`);
}); });
this.client.on('error', console.error); this.client.on('error', console.error);
this.client.on('debug', debug); this.client.on('debug', debug);
// Register event handlers
this.client.on('guildCreate', handleGuildCreate); this.client.on('guildCreate', handleGuildCreate);
this.client.on('voiceStateUpdate', handleVoiceStateUpdate); this.client.on('voiceStateUpdate', handleVoiceStateUpdate);
return this.client.login(this.token); // Update commands
await this.client.login(this.token);
const rest = new REST({version: '9'}).setToken(this.token);
await rest.put(
Routes.applicationGuildCommands(this.client.user!.id, this.client.guilds.cache.first()!.id),
// TODO: remove
{body: this.commands.map(command => command.slashCommand ? command.slashCommand.toJSON() : null)},
);
} }
} }

View file

@ -1,66 +0,0 @@
import {Message, Util} from 'discord.js';
import {injectable} from 'inversify';
import Command from '.';
import {TYPES} from '../types.js';
import {Settings} from '../models/index.js';
import container from '../inversify.config.js';
@injectable()
export default class implements Command {
public name = 'help';
public aliases = ['h'];
public examples = [
['help', 'you don\'t need a description'],
];
private commands: Command[] = [];
public async execute(msg: Message, _: string []): Promise<void> {
if (this.commands.length === 0) {
// Lazy load to avoid circular dependencies
this.commands = container.getAll<Command>(TYPES.Command);
}
const settings = await Settings.findOne({where: {guildId: msg.guild!.id}});
if (!settings) {
return;
}
const {prefix} = settings;
const res = Util.splitMessage(this.commands.sort((a, b) => a.name.localeCompare(b.name)).reduce((content, command) => {
const aliases = command.aliases.reduce((str, alias, i) => {
str += alias;
if (i !== command.aliases.length - 1) {
str += ', ';
}
return str;
}, '');
if (aliases === '') {
content += `**${command.name}**:\n`;
} else {
content += `**${command.name}** (${aliases}):\n`;
}
command.examples.forEach(example => {
content += `- \`${prefix}${example[0]}\`: ${example[1]}\n`;
});
content += '\n';
return content;
}, ''));
for (const r of res) {
// eslint-disable-next-line no-await-in-loop
await msg.author.send(r);
}
await msg.react('🇩');
await msg.react('🇲');
}
}

View file

@ -1,9 +1,12 @@
import {Message} from 'discord.js'; import {SlashCommandBuilder} from '@discordjs/builders';
import {CommandInteraction} from 'discord.js';
export default interface Command { export default interface Command {
name: string; // TODO: remove
aliases: string[]; name?: string;
examples: string[][]; aliases?: string[];
examples?: string[][];
slashCommand?: Partial<SlashCommandBuilder> & Pick<SlashCommandBuilder, 'toJSON'>;
requiresVC?: boolean; requiresVC?: boolean;
execute: (msg: Message, args: string[]) => Promise<void>; executeFromInteraction?: (interaction: CommandInteraction) => Promise<void>;
} }

View file

@ -1,31 +1,27 @@
import {TextChannel, Message} from 'discord.js'; import {CommandInteraction, GuildMember} from 'discord.js';
import {URL} from 'url'; import {URL} from 'url';
import {Except} from 'type-fest'; import {Except} from 'type-fest';
import {TYPES} from '../types.js'; import {SlashCommandBuilder} from '@discordjs/builders';
import {inject, injectable} from 'inversify'; import {inject, injectable} from 'inversify';
import Command from '.';
import {TYPES} from '../types.js';
import {QueuedSong, STATUS} from '../services/player.js'; import {QueuedSong, STATUS} from '../services/player.js';
import PlayerManager from '../managers/player.js'; import PlayerManager from '../managers/player.js';
import {getMostPopularVoiceChannel, getMemberVoiceChannel} from '../utils/channels.js'; import {getMostPopularVoiceChannel, getMemberVoiceChannel} from '../utils/channels.js';
import LoadingMessage from '../utils/loading-message.js';
import errorMsg from '../utils/error-msg.js'; import errorMsg from '../utils/error-msg.js';
import Command from '.';
import GetSongs from '../services/get-songs.js'; import GetSongs from '../services/get-songs.js';
@injectable() @injectable()
export default class implements Command { export default class implements Command {
public name = 'play'; public readonly slashCommand = new SlashCommandBuilder()
public aliases = ['p']; .setName('play')
public examples = [ .setDescription('Play a song')
['play', 'resume paused playback'], .addStringOption(option => option
['play https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'plays a YouTube video'], .setName('query')
['play cool music', 'plays the first search result for "cool music" from YouTube'], .setDescription('YouTube URL, Spotify URL, or search query'))
['play https://www.youtube.com/watch?list=PLi9drqWffJ9FWBo7ZVOiaVy0UQQEm4IbP', 'adds the playlist to the queue'], .addBooleanOption(option => option
['play https://open.spotify.com/track/3ebXMykcMXOcLeJ9xZ17XH?si=tioqSuyMRBWxhThhAW51Ig', 'plays a song from Spotify'], .setName('immediate')
['play https://open.spotify.com/album/5dv1oLETxdsYOkS2Sic00z?si=bDa7PaloRx6bMIfKdnvYQw', 'adds all songs from album to the queue'], .setDescription('adds track to the front of the queue'));
['play https://open.spotify.com/playlist/37i9dQZF1DX94qaYRnkufr?si=r2fOVL_QQjGxFM5MWb84Xw', 'adds all songs from playlist to the queue'],
['play cool music immediate', 'adds the first search result for "cool music" to the front of the queue'],
['play cool music i', 'adds the first search result for "cool music" to the front of the queue'],
];
public requiresVC = true; public requiresVC = true;
@ -38,43 +34,43 @@ export default class implements Command {
} }
// eslint-disable-next-line complexity // eslint-disable-next-line complexity
public async execute(msg: Message, args: string[]): Promise<void> { public async executeFromInteraction(interaction: CommandInteraction): Promise<void> {
const [targetVoiceChannel] = getMemberVoiceChannel(msg.member!) ?? getMostPopularVoiceChannel(msg.guild!); const [targetVoiceChannel] = getMemberVoiceChannel(interaction.member as GuildMember) ?? getMostPopularVoiceChannel(interaction.guild!);
const res = new LoadingMessage(msg.channel as TextChannel);
await res.start();
const player = this.playerManager.get(msg.guild!.id);
const player = this.playerManager.get(interaction.guild!.id);
const wasPlayingSong = player.getCurrent() !== null; const wasPlayingSong = player.getCurrent() !== null;
if (args.length === 0) { const query = interaction.options.getString('query');
if (!query) {
if (player.status === STATUS.PLAYING) { if (player.status === STATUS.PLAYING) {
await res.stop(errorMsg('already playing, give me a song name')); await interaction.reply({content: errorMsg('already playing, give me a song name'), ephemeral: true});
return; return;
} }
// Must be resuming play // Must be resuming play
if (!wasPlayingSong) { if (!wasPlayingSong) {
await res.stop(errorMsg('nothing to play')); await interaction.reply({content: errorMsg('nothing to play'), ephemeral: true});
return; return;
} }
await player.connect(targetVoiceChannel); await player.connect(targetVoiceChannel);
await player.play(); await player.play();
await res.stop('the stop-and-go light is now green'); await interaction.reply('the stop-and-go light is now green');
return; return;
} }
const addToFrontOfQueue = args[args.length - 1] === 'i' || args[args.length - 1] === 'immediate'; const addToFrontOfQueue = interaction.options.getBoolean('immediate');
const newSongs: Array<Except<QueuedSong, 'addedInChannelId'>> = []; const newSongs: Array<Except<QueuedSong, 'addedInChannelId'>> = [];
let extraMsg = ''; let extraMsg = '';
await interaction.deferReply();
// Test if it's a complete URL // Test if it's a complete URL
try { try {
const url = new URL(args[0]); const url = new URL(query);
const YOUTUBE_HOSTS = [ const YOUTUBE_HOSTS = [
'www.youtube.com', 'www.youtube.com',
@ -96,12 +92,12 @@ export default class implements Command {
if (song) { if (song) {
newSongs.push(song); newSongs.push(song);
} else { } else {
await res.stop(errorMsg('that doesn\'t exist')); await interaction.editReply(errorMsg('that doesn\'t exist'));
return; return;
} }
} }
} else if (url.protocol === 'spotify:' || url.host === 'open.spotify.com') { } else if (url.protocol === 'spotify:' || url.host === 'open.spotify.com') {
const [convertedSongs, nSongsNotFound, totalSongs] = await this.getSongs.spotifySource(args[0]); const [convertedSongs, nSongsNotFound, totalSongs] = await this.getSongs.spotifySource(query);
if (totalSongs > 50) { if (totalSongs > 50) {
extraMsg = 'a random sample of 50 songs was taken'; extraMsg = 'a random sample of 50 songs was taken';
@ -123,25 +119,23 @@ export default class implements Command {
} }
} catch (_: unknown) { } catch (_: unknown) {
// Not a URL, must search YouTube // Not a URL, must search YouTube
const query = addToFrontOfQueue ? args.slice(0, args.length - 1).join(' ') : args.join(' ');
const song = await this.getSongs.youtubeVideoSearch(query); const song = await this.getSongs.youtubeVideoSearch(query);
if (song) { if (song) {
newSongs.push(song); newSongs.push(song);
} else { } else {
await res.stop(errorMsg('that doesn\'t exist')); await interaction.editReply(errorMsg('that doesn\'t exist'));
return; return;
} }
} }
if (newSongs.length === 0) { if (newSongs.length === 0) {
await res.stop(errorMsg('no songs found')); await interaction.editReply(errorMsg('no songs found'));
return; return;
} }
newSongs.forEach(song => { newSongs.forEach(song => {
player.add({...song, addedInChannelId: msg.channel.id}, {immediate: addToFrontOfQueue}); player.add({...song, addedInChannelId: interaction.channel?.id}, {immediate: addToFrontOfQueue ?? false});
}); });
const firstSong = newSongs[0]; const firstSong = newSongs[0];
@ -173,9 +167,9 @@ export default class implements Command {
} }
if (newSongs.length === 1) { if (newSongs.length === 1) {
await res.stop(`u betcha, **${firstSong.title}** added to the${addToFrontOfQueue ? ' front of the' : ''} queue${extraMsg}`); await interaction.editReply(`u betcha, **${firstSong.title}** added to the${addToFrontOfQueue ? ' front of the' : ''} queue${extraMsg}`);
} else { } else {
await res.stop(`u betcha, **${firstSong.title}** and ${newSongs.length - 1} other songs were added to the queue${extraMsg}`); await interaction.editReply(`u betcha, **${firstSong.title}** and ${newSongs.length - 1} other songs were added to the queue${extraMsg}`);
} }
} }
} }

View file

@ -18,7 +18,6 @@ import Clear from './commands/clear.js';
import Config from './commands/config.js'; import Config from './commands/config.js';
import Disconnect from './commands/disconnect.js'; import Disconnect from './commands/disconnect.js';
import ForwardSeek from './commands/fseek.js'; import ForwardSeek from './commands/fseek.js';
import Help from './commands/help.js';
import Pause from './commands/pause.js'; import Pause from './commands/pause.js';
import Play from './commands/play.js'; import Play from './commands/play.js';
import QueueCommand from './commands/queue.js'; import QueueCommand from './commands/queue.js';
@ -59,7 +58,6 @@ container.bind<NaturalLanguage>(TYPES.Services.NaturalLanguage).to(NaturalLangua
Config, Config,
Disconnect, Disconnect,
ForwardSeek, ForwardSeek,
Help,
Pause, Pause,
Play, Play,
QueueCommand, QueueCommand,

View file

@ -21,7 +21,7 @@ export interface QueuedSong {
length: number; length: number;
playlist: QueuedPlaylist | null; playlist: QueuedPlaylist | null;
isLive: boolean; isLive: boolean;
addedInChannelId: Snowflake; addedInChannelId?: Snowflake;
} }
export enum STATUS { export enum STATUS {

View file

@ -1,6 +1,6 @@
{ {
"compilerOptions": { "compilerOptions": {
"lib": ["ES2019"], "lib": ["ES2019", "DOM"],
"target": "es2018", "target": "es2018",
"module": "ES2020", "module": "ES2020",
"moduleResolution": "node", "moduleResolution": "node",

View file

@ -53,6 +53,22 @@
ts-mixer "^6.0.0" ts-mixer "^6.0.0"
tslib "^2.3.1" tslib "^2.3.1"
"@discordjs/builders@^0.9.0":
version "0.9.0"
resolved "https://registry.yarnpkg.com/@discordjs/builders/-/builders-0.9.0.tgz#1ca17677e7c180d4f266191596e17e9633180417"
integrity sha512-XM/5yrTxMF0SDKza32YzGDQO1t+qEJTaF8Zvxu/UOjzoqzMPPGQBjC1VgZxz8/CBLygW5qI+UVygMa88z13G3g==
dependencies:
"@sindresorhus/is" "^4.2.0"
discord-api-types "^0.24.0"
ts-mixer "^6.0.0"
tslib "^2.3.1"
zod "^3.11.6"
"@discordjs/collection@^0.1.6":
version "0.1.6"
resolved "https://registry.yarnpkg.com/@discordjs/collection/-/collection-0.1.6.tgz#9e9a7637f4e4e0688fd8b2b5c63133c91607682c"
integrity sha512-utRNxnd9kSS2qhyivo9lMlt5qgAUasH2gb7BEOn6p0efFh24gjGomHzWKMAPn2hEReOPQZCJaRKoURwRotKucQ==
"@discordjs/collection@^0.3.2": "@discordjs/collection@^0.3.2":
version "0.3.2" version "0.3.2"
resolved "https://registry.yarnpkg.com/@discordjs/collection/-/collection-0.3.2.tgz#3c271dd8a93dad89b186d330e24dbceaab58424a" resolved "https://registry.yarnpkg.com/@discordjs/collection/-/collection-0.3.2.tgz#3c271dd8a93dad89b186d330e24dbceaab58424a"
@ -90,6 +106,20 @@
"@discordjs/node-pre-gyp" "^0.4.2" "@discordjs/node-pre-gyp" "^0.4.2"
node-addon-api "^4.2.0" node-addon-api "^4.2.0"
"@discordjs/rest@^0.1.0-canary.0":
version "0.1.0-canary.0"
resolved "https://registry.yarnpkg.com/@discordjs/rest/-/rest-0.1.0-canary.0.tgz#666f9a1a0c1f2f5a09a3a79f77aeddaeafbcbcc1"
integrity sha512-d+s//ISYVV+e0w/926wMEeO7vju+Pn11x1JM4tcmVMCHSDgpi6pnFCNAXF1TEdnDcy7xf9tq5cf2pQkb/7ySTQ==
dependencies:
"@discordjs/collection" "^0.1.6"
"@sapphire/async-queue" "^1.1.4"
"@sapphire/snowflake" "^1.3.5"
abort-controller "^3.0.0"
discord-api-types "^0.18.1"
form-data "^4.0.0"
node-fetch "^2.6.1"
tslib "^2.3.0"
"@discordjs/voice@^0.7.5": "@discordjs/voice@^0.7.5":
version "0.7.5" version "0.7.5"
resolved "https://registry.yarnpkg.com/@discordjs/voice/-/voice-0.7.5.tgz#c95bd4ecf73905f51990827df5209eb26472dbd5" resolved "https://registry.yarnpkg.com/@discordjs/voice/-/voice-0.7.5.tgz#c95bd4ecf73905f51990827df5209eb26472dbd5"
@ -152,11 +182,16 @@
"@nodelib/fs.scandir" "2.1.5" "@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0" fastq "^1.6.0"
"@sapphire/async-queue@^1.1.8": "@sapphire/async-queue@^1.1.4", "@sapphire/async-queue@^1.1.8":
version "1.1.9" version "1.1.9"
resolved "https://registry.yarnpkg.com/@sapphire/async-queue/-/async-queue-1.1.9.tgz#ce69611c8753c4affd905a7ef43061c7eb95c01b" resolved "https://registry.yarnpkg.com/@sapphire/async-queue/-/async-queue-1.1.9.tgz#ce69611c8753c4affd905a7ef43061c7eb95c01b"
integrity sha512-CbXaGwwlEMq+l1TRu01FJCvySJ1CEFKFclHT48nIfNeZXaAAmmwwy7scUKmYHPUa3GhoMp6Qr1B3eAJux6XgOQ== integrity sha512-CbXaGwwlEMq+l1TRu01FJCvySJ1CEFKFclHT48nIfNeZXaAAmmwwy7scUKmYHPUa3GhoMp6Qr1B3eAJux6XgOQ==
"@sapphire/snowflake@^1.3.5":
version "1.3.6"
resolved "https://registry.yarnpkg.com/@sapphire/snowflake/-/snowflake-1.3.6.tgz#166e8c5c08d01c861edd7e2edc80b5739741715f"
integrity sha512-QnzuLp+p9D7agynVub/zqlDVriDza9y3STArBhNiNBUgIX8+GL5FpQxstRfw1jDr5jkZUjcuKYAHxjIuXKdJAg==
"@sindresorhus/is@^0.14.0": "@sindresorhus/is@^0.14.0":
version "0.14.0" version "0.14.0"
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea"
@ -393,6 +428,13 @@ abbrev@1:
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
abort-controller@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392"
integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==
dependencies:
event-target-shim "^5.0.0"
acorn-jsx@^5.3.1: acorn-jsx@^5.3.1:
version "5.3.2" version "5.3.2"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937"
@ -997,11 +1039,21 @@ dir-glob@^3.0.1:
dependencies: dependencies:
path-type "^4.0.0" path-type "^4.0.0"
discord-api-types@^0.18.1:
version "0.18.1"
resolved "https://registry.yarnpkg.com/discord-api-types/-/discord-api-types-0.18.1.tgz#5d08ed1263236be9c21a22065d0e6b51f790f492"
integrity sha512-hNC38R9ZF4uaujaZQtQfm5CdQO58uhdkoHQAVvMfIL0LgOSZeW575W8H6upngQOuoxWd8tiRII3LLJm9zuQKYg==
discord-api-types@^0.24.0: discord-api-types@^0.24.0:
version "0.24.0" version "0.24.0"
resolved "https://registry.yarnpkg.com/discord-api-types/-/discord-api-types-0.24.0.tgz#9e429b8a1ddb4147134dfb3109093422de7ec549" resolved "https://registry.yarnpkg.com/discord-api-types/-/discord-api-types-0.24.0.tgz#9e429b8a1ddb4147134dfb3109093422de7ec549"
integrity sha512-X0uA2a92cRjowUEXpLZIHWl4jiX1NsUpDhcEOpa1/hpO1vkaokgZ8kkPtPih9hHth5UVQ3mHBu/PpB4qjyfJ4A== integrity sha512-X0uA2a92cRjowUEXpLZIHWl4jiX1NsUpDhcEOpa1/hpO1vkaokgZ8kkPtPih9hHth5UVQ3mHBu/PpB4qjyfJ4A==
discord-api-types@^0.25.2:
version "0.25.2"
resolved "https://registry.yarnpkg.com/discord-api-types/-/discord-api-types-0.25.2.tgz#e50ed152e6d48fe7963f5de1002ca6f2df57c61b"
integrity sha512-O243LXxb5gLLxubu5zgoppYQuolapGVWPw3ll0acN0+O8TnPUE2kFp9Bt3sTRYodw8xFIknOVxjSeyWYBpVcEQ==
discord.js@^13.3.0: discord.js@^13.3.0:
version "13.3.1" version "13.3.1"
resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-13.3.1.tgz#94fe05bc3ec0a3e4761e4f312a2a418c29721ab6" resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-13.3.1.tgz#94fe05bc3ec0a3e4761e4f312a2a418c29721ab6"
@ -1242,6 +1294,11 @@ esutils@^2.0.2:
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
event-target-shim@^5.0.0:
version "5.0.1"
resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789"
integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==
eventemitter3@^4.0.7: eventemitter3@^4.0.7:
version "4.0.7" version "4.0.7"
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
@ -1376,6 +1433,15 @@ form-data@^3.0.0:
combined-stream "^1.0.8" combined-stream "^1.0.8"
mime-types "^2.1.12" mime-types "^2.1.12"
form-data@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
mime-types "^2.1.12"
form-data@~2.3.2: form-data@~2.3.2:
version "2.3.3" version "2.3.3"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
@ -3246,7 +3312,7 @@ tslib@^1.8.1, tslib@^1.9.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
tslib@^2.3.1: tslib@^2.3.0, tslib@^2.3.1:
version "2.3.1" version "2.3.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==
@ -3567,3 +3633,8 @@ ytsr@^3.5.3:
integrity sha512-BEyIKbQULmk27hiVUQ1cBszAqP8roPBOQTWPZpBioKxjSZBeicfgF2qPIQoY7koodQwRuo1DmCFz3DyrXjADxg== integrity sha512-BEyIKbQULmk27hiVUQ1cBszAqP8roPBOQTWPZpBioKxjSZBeicfgF2qPIQoY7koodQwRuo1DmCFz3DyrXjADxg==
dependencies: dependencies:
miniget "^4.2.1" miniget "^4.2.1"
zod@^3.11.6:
version "3.11.6"
resolved "https://registry.yarnpkg.com/zod/-/zod-3.11.6.tgz#e43a5e0c213ae2e02aefe7cb2b1a6fa3d7f1f483"
integrity sha512-daZ80A81I3/9lIydI44motWe6n59kRBfNzTuS2bfzVh1nAXi667TOTWWtatxyG+fwgNUiagSj/CWZwRRbevJIg==