Bot command listing on profile

const { REST } = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v10');

module.exports = async (client) => {
client.logs.info('Started refreshing application (/) commands.');

const commands = [];
for (const [_, command] of client.commands) {
try {
commands.push(command.data.toJSON());
let commandName = command.data.name;
} catch (error) {
client.logs.error(`[REGISTER] Failed to register ${command.data.name}: ${error}`);
}
}

const rest = new REST({ version: '10' }).setToken(client.config.TOKEN);

try {
await rest.put(
Routes.applicationCommands(client.config.APP_ID),
{ body: commands },
);

client.logs.info('Successfully reloaded application (/) commands.');
} catch (error) {
client.logs.error(error);
}
};
const { REST } = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v10');

module.exports = async (client) => {
client.logs.info('Started refreshing application (/) commands.');

const commands = [];
for (const [_, command] of client.commands) {
try {
commands.push(command.data.toJSON());
let commandName = command.data.name;
} catch (error) {
client.logs.error(`[REGISTER] Failed to register ${command.data.name}: ${error}`);
}
}

const rest = new REST({ version: '10' }).setToken(client.config.TOKEN);

try {
await rest.put(
Routes.applicationCommands(client.config.APP_ID),
{ body: commands },
);

client.logs.info('Successfully reloaded application (/) commands.');
} catch (error) {
client.logs.error(error);
}
};
this is my command register, how would i go about registering select global commands ex:
No description
14 Replies
d.js toolkit
d.js toolkit4mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
ShadyMoon
ShadyMoonOP4mo ago
root@host:~/linkup/bot# node -v v20.0.0 root@host:~/linkup/bot# npm list discord.js bot@1.0.0 /root/linkup/bot └── discord.js@14.16.3
Syjalo
Syjalo4mo ago
That's the thing Discord adds for verified bots automatically
ShadyMoon
ShadyMoonOP4mo ago
theres not select commands i can add
Syjalo
Syjalo4mo ago
No, but you have mention commands /tag </name:id>
ShadyMoon
ShadyMoonOP4mo ago
is there any application or something to fill out, or do you just kinda have to wait
Syjalo
Syjalo4mo ago
You have to wait
ShadyMoon
ShadyMoonOP4mo ago
damn how so
Zerls
Zerls4mo ago
more popular commands are more likely to be shown
ShadyMoon
ShadyMoonOP4mo ago
is there any requirements for it to show? ex: 100+ servers damn that sucks
Syjalo
Syjalo4mo ago
Be a verified bot, I don't know about others
ShadyMoon
ShadyMoonOP4mo ago
you should be able to register it
ShadyMoon
ShadyMoonOP4mo ago
No description
ShadyMoon
ShadyMoonOP4mo ago
my bot is verified ik alr then

Did you find this page helpful?