Discord-Bot/src/commands/images/fox.js
2023-05-02 13:47:10 +02:00

19 lines
No EOL
466 B
JavaScript

const Discord = require('discord.js');
const fetch = require("node-fetch");
module.exports = async (client, interaction, args) => {
fetch(
`https://some-random-api.com/img/fox`
)
.then((res) => res.json()).catch({})
.then(async (json) => {
client.embed({
title: `🦊・Random Fox`,
image: json.link,
type: 'editreply'
}, interaction)
}).catch({})
}