discord.js slash commands
bot.api.applications(bot.user.id).commands.post({
data: {
name: "commandname",
description: "Command Description",
},
});
discord.js slash commands
bot.api.applications(bot.user.id).commands.post({
data: {
name: "commandname",
description: "Command Description",
},
});
discord.js slash commend
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("توكن هنا");
/*تأكد تعطي صلاحيات للبوت عشان ماتواجه مشاكل */
discord.js slash commend
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("توكن هنا");
/*تأكد تعطي صلاحيات للبوت عشان ماتواجه مشاكل */
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us