diff --git a/meme.jpg b/meme.jpg deleted file mode 100644 index d4a6ab8..0000000 Binary files a/meme.jpg and /dev/null differ diff --git a/src/app.ts b/src/app.ts index afa9c6f..2e833b4 100644 --- a/src/app.ts +++ b/src/app.ts @@ -29,6 +29,23 @@ client.once(Events.ClientReady, async client => { }); }); +const REPLIES = [ + "https://media.discordapp.net/attachments/709446245516574860/1153875831857352784/gideobn_lala.gif", + "https://media.discordapp.net/attachments/1072009407497515059/1150969108008017960/brett.gif", + "https://images-ext-2.discordapp.net/external/nqpPlVXUTEYQzmBZuYAhWBNyCRaxTVQ_GT8cNjfQaCQ/https/media.tenor.com/GEuUa7wY5JwAAAPo/sad-speech-bubble.mp4", + "https://media.discordapp.net/attachments/709446245516574860/1150672443426484246/maletic.gif", + "https://images-ext-1.discordapp.net/external/zSnVZqNRKx3g9Rc4D1kc7Hl_p2Qs5uomscPH6p9lp2E/https/media.tenor.com/HrUh7_ReprYAAAPo/police-help-speech-bubble.mp4", + "https://media.tenor.com/ESD9F3r4uXIAAAPo/bubble-text-owl-text-bubble.mp4", + "https://media.discordapp.net/attachments/709446245516574860/1151728821150695464/fridge.gif?width=507&height=676" +] + +client.on(Events.MessageCreate, async message => { + if (Math.random() < 0.1) { + await message.reply({ files: [ REPLIES[Math.floor(Math.random() * REPLIES.length)] ]}); + return; + } +}) + client.on(Events.InteractionCreate, async interaction => { if (interaction.isChatInputCommand()) { const command = COMMANDS.find(command => command.data.name === interaction.commandName); diff --git a/src/lib/command.ts b/src/lib/command.ts index e6ee5e6..713206d 100644 --- a/src/lib/command.ts +++ b/src/lib/command.ts @@ -15,12 +15,10 @@ export const deploy = () => { (async () => { try { console.log(`Started refreshing ${COMMANDS.length} application (/) commands.`); - - console.log(COMMANDS.map(command => command.data.toJSON())) - // The put method is used to fully refresh all commands in the guild with the current set + // Routes.applicationGuildCommands(DEVELOPMENT.APPLICATION_ID, DEVELOPMENT.GUILD_ID) const data = await rest.put( - Routes.applicationGuildCommands(DEVELOPMENT.APPLICATION_ID, DEVELOPMENT.GUILD_ID), + Routes.applicationCommands(DEVELOPMENT.APPLICATION_ID), { body: COMMANDS.map(command => command.data) }, ) as any[];