const axios = require('axios'); const Discord = require('discord.js'); const client = new Discord.Client(); client.on('ready', () => { console.log(`Logged in as ${client.user.tag}!`); }); client.on('message', async (msg) => { if (msg.content === "!goodboye") { try { const res = await axios.get('http://shibe.online/api/shibes'); await msg.channel.send(undefined, { file: res.data[0] }); } catch (e) { console.error(e); } } }); client.login(process.env.DISCORD_TOKEN);