const { Client, MessageAttachment } = require('discord.js');
const { get } = require('axios').default;
const client = new Client();
exports.run = async (client, message, args) => {
const resim = await get('https://api.avokadogames.com/discord/ataturk');
if(!resim || !resim.data || !resim.data.mesaj) return console.log("Bir hata oluştu.");
//const attachment = new MessageAttachment("https://api.avokadogames.com/discord/ataturk/ataturk_1.jpg");
message.channel.send(resim.data.mesaj);
//console.log(resim.data.mesaj);
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ['mka','ataturk'],
permLevel: 0
};
exports.help = {
name: "atatürk",
description: "Rastgele Atatürk fotoğrafları atar!",
usage: "atatürk"
};
Hastebin: https://www.toptal.com/developers/hastebin/dotewihoxe.jsnpm install axios