Discord.js 所以我';我正在尝试制作一个discord机器人,它可以发送js格式的随机图片,但我不知道如何发送

Discord.js 所以我';我正在尝试制作一个discord机器人,它可以发送js格式的随机图片,但我不知道如何发送,discord.js,Discord.js,如果(命令=='example'){ client.commands.get('example').execute(消息,参数) module.exports={ name: 'example', description: "this is a test command", execute(message, args, Discord){ message.channel.send('https://i.redd.it/6nkyme7ayi631.jpg'); }

如果(命令=='example'){

client.commands.get('example').execute(消息,参数)

module.exports={

name: 'example',

description: "this is a test command",

execute(message, args, Discord){
    message.channel.send('https://i.redd.it/6nkyme7ayi631.jpg');
}

}

创建一个图像URL数组,然后从数组中随机选取一个要发送的项目

//使用数字的示例
数字=[1,2,3,4,5,6,7,8,9]
//模块、出口等
const randomNumber=numbers[Math.floor(Math.random()*numbers.length)]
//发送随机数/url
//我使用console.log()来避免错误

console.log(randomNumber)
什么是js格式?uhhh idk tbh java脚本?tysm!!(fillingggg inn spaccdee))@karrot如果这是可行的,那么请接受它,因为它是正确的,所以人们知道这个问题已经解决了,但我仍然试图找出我在代码中的位置,因为我stoopid@karrot我已经编辑了我的答案,告诉你把它放在哪里。你需要根据自己的需要(变量名等)更改它
name: 'example',

description: "this is a test command",

execute(message, args, Discord){
    message.channel.send('https://i.redd.it/6nkyme7ayi631.jpg');
}