📅  最后修改于: 2022-03-11 15:03:24.528000             🧑  作者: Mango
const Discord = require('discord.js');
const client = new Discord.Client();
const { Slash } = require('discord-slash-commands');
const slash = new Slash(client);
client.on("ready", () => {
console.log("Ready");
slash.command({
guildOnly: false, /*guildOnly : true Ù٠تبغاÙا بسÙر Ùر ÙاØد*/
/*guildID: "GUILD_ID", ÙÙÙا تØØ· اÙد٠اÙسÙرÙر*/
data: {
name: "ping", /*ÙÙا اسÙ
اÙاÙ
ر*/
description: "Show the bot latency", /*ÙÙا Ùص٠اÙاÙ
ر*/
type: 4,
content: `Pong! \`${client.ws.ping}ms\`` /*ÙÙÙا اÙÙ Ø±Ø§Ø ÙرسÙ٠اÙبÙت */
}
})
})
/*ÙازÙ
تستدع٠اÙبÙت Ù
٠رابط ز٠Ùدا
https://discord.com/api/oauth2/authorize?client_id=اÙد٠اÙبÙت ÙÙا&permissions=0&scope=bot%20applications.commands
*/
client.login("تÙÙÙ ÙÙا");
/*تأÙد تعط٠صÙاØÙات ÙÙبÙت عشا٠Ù
اتÙاج٠Ù
شاÙÙ */