Skip to content

Commit

Permalink
I'm not really sure what changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Struck713 committed Sep 26, 2023
1 parent b9414af commit 2d8aa7c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
Binary file removed meme.jpg
Binary file not shown.
17 changes: 17 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 2 additions & 4 deletions src/lib/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];

Expand Down

0 comments on commit 2d8aa7c

Please sign in to comment.