// Example using axios:const axios = require('axios')(async () => {const url = 'https://no-api-key.com/api/v1/animals/dog'try {const response = await axios.get(url);const data = response.dataconsole.log(data)} catch (e) {return console.log(e)}})();// Example with plain ole fetch:(async () => {const url = 'https://no-api-key.com/api/v1/animals/dog'try {const response = await fetch(url)const data = await response.json()console.log(data)} catch (e) {return console.log(e)}})();
trash route : https://api.no-api-key.com/api/v1/trash
const { MessageEmbed } = require('discord.js')module.exports = {name: "trump",category: "extra",run: async (client, message, args) => {try {const text = args.join(' ')const url = `https://api.no-api-key.com/api/v2/trump?message=`const encoded = url + encodeURIComponent(text);console.log(url)const embed = new MessageEmbed().setImage(encoded)await message.channel.send(embed)} catch (e) {console.log(e)}}}
Have suggestions? Join discord link on home page, or email me. Click on the routes, to see required paramters. Thanks for using!