YP501
YP501
DIAdiscord.js - Imagine an app
Created by Youssef on 8/21/2022 in #djs-questions
loading Slash Commands with REST dont works
and if you push that info object to an array for each command you have and use that array as the REST body it should work
35 replies
DIAdiscord.js - Imagine an app
Created by Youssef on 8/21/2022 in #djs-questions
loading Slash Commands with REST dont works
Example:
const info = new SlashCommandBuilder()
.setName('ping')
.setDescription('Check bot and API latency');
const info = new SlashCommandBuilder()
.setName('ping')
.setDescription('Check bot and API latency');
creates
{
options: [],
name: 'ping',
name_localizations: undefined,
description: 'Check bot and API latency',
description_localizations: undefined,
default_permission: undefined,
default_member_permissions: undefined,
dm_permission: undefined
}
{
options: [],
name: 'ping',
name_localizations: undefined,
description: 'Check bot and API latency',
description_localizations: undefined,
default_permission: undefined,
default_member_permissions: undefined,
dm_permission: undefined
}
35 replies
DIAdiscord.js - Imagine an app
Created by Youssef on 8/21/2022 in #djs-questions
loading Slash Commands with REST dont works
The command array you're supposed to pass in is an array consisting of the command info objects generated by the SlashCommandBuilder instead of the whole file which you're doing
35 replies
DIAdiscord.js - Imagine an app
Created by Youssef on 8/21/2022 in #djs-questions
loading Slash Commands with REST dont works
I think you're passing in the wrong command info array
35 replies