mirror of https://github.com/kry008/Bot-2.0.git
29 lines
754 B
JavaScript
29 lines
754 B
JavaScript
|
function returnCat() {
|
||
|
return fetch('https://randomfox.ca/floof/')
|
||
|
.then(response => response.json())
|
||
|
.then(data => data.image);
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
name: 'fox',
|
||
|
description: 'Get a random fox picture',
|
||
|
help: 'Get a random fox picture',
|
||
|
options: [],
|
||
|
slash: true,
|
||
|
text: true,
|
||
|
admin: false,
|
||
|
requireKick: false,
|
||
|
requireBan: false,
|
||
|
canBeUsedInDm: true,
|
||
|
premium: false,
|
||
|
contexts: ['GUILD_TEXT', 'GUILD_VOICE', 'DM'],
|
||
|
integration_types: [0,1],
|
||
|
execute: async (message, args) => {
|
||
|
const cat = await returnCat();
|
||
|
message.channel.send(cat);
|
||
|
},
|
||
|
executeSlash: async interaction => {
|
||
|
const cat = await returnCat();
|
||
|
interaction.reply(cat);
|
||
|
},
|
||
|
};
|