mirror of
https://github.com/ION606/selmerBot.git
synced 2026-06-05 23:06:14 +00:00
Transitioned all Misc, audio, Selmer Specific, admin, anime/manga, and inventory commands to Slash Command format. The RSS and reactionrole commands are still broken and all game commands are still in message format due to compications
This commit is contained in:
@@ -5,7 +5,8 @@ const { randomHexColor } = require('../admin/colorgen.js');
|
||||
module.exports = {
|
||||
name: 'meme',
|
||||
description: 'Selmer Bot will post a random meme from reddit',
|
||||
async execute(message, args, Discord, Client, bot) {
|
||||
async execute(interaction, Discord, Client, bot) {
|
||||
interaction.deferReply();
|
||||
memes.random().then(meme => {
|
||||
|
||||
const newEmbed = new Discord.MessageEmbed()
|
||||
@@ -15,7 +16,7 @@ module.exports = {
|
||||
.setDescription(`category: ${meme.category}`)
|
||||
.setImage(meme.image);
|
||||
|
||||
message.channel.send({ embeds: [newEmbed] });
|
||||
interaction.editReply({ embeds: [newEmbed] });
|
||||
}).catch(async err => {
|
||||
console.log(err);
|
||||
//Try a different way
|
||||
@@ -23,7 +24,7 @@ module.exports = {
|
||||
const response = await fetch('https://some-random-api.ml/meme');
|
||||
const data = await response.json().catch(err => {
|
||||
console.log(err);
|
||||
return message.reply("_Uh oh, something's gone wrong!_");
|
||||
return interaction.reply("_Uh oh, something's gone wrong!_");
|
||||
});
|
||||
|
||||
const newEmbed = new Discord.MessageEmbed()
|
||||
@@ -33,7 +34,7 @@ module.exports = {
|
||||
.setDescription(`category: ${data.category}`)
|
||||
.setImage(data.image);
|
||||
|
||||
message.channel.send({ embeds: [newEmbed] });
|
||||
interaction.editReply({ embeds: [newEmbed] });
|
||||
});
|
||||
}
|
||||
}, options: []
|
||||
}
|
||||
Reference in New Issue
Block a user