Sincerely, alxx ᴬᴳ
Sincerely, alxx ᴬᴳ
DIdiscord.js - Imagine ❄
Created by Sincerely, alxx ᴬᴳ on 11/9/2024 in #djs-questions
select menu
My interaction handler isnt working, giving the roles works but when I click the remove roles option to well obviously remove the roles it just says there was an error updating my roles and sends this into the console:
DiscordAPIError[50035]: Invalid Form Body
role_id[NUMBER_TYPE_COERCE]: Value "all" is not snowflake.
at handleErrors (C:\Users\alexe\AGU Bot\node_modules\@discordjs\rest\dist\index.js:727:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (C:\Users\alexe\AGU Bot\node_modules\@discordjs\rest\dist\index.js:1128:23)
at async SequentialHandler.queueRequest (C:\Users\alexe\AGU Bot\node_modules\@discordjs\rest\dist\index.js:959:14)
at async _REST.request (C:\Users\alexe\AGU Bot\node_modules\@discordjs\rest\dist\index.js:1272:22)
at async GuildMemberRoleManager.add (C:\Users\alexe\AGU Bot\node_modules\discord.js\src\managers\GuildMemberRoleManager.js:131:7)
at async Client.<anonymous> (C:\Users\alexe\AGU Bot\src\roles.js:558:21) {
requestBody: { files: undefined, json: undefined },
rawError: {
message: 'Invalid Form Body',
code: 50035,
errors: { role_id: [Object] }
},
code: 50035,
status: 400,
method: 'PUT',
url: 'https://discord.com/api/v10/guilds/1256302762157932655/members/1016447282176077925/roles/all'
}
DiscordAPIError[50035]: Invalid Form Body
role_id[NUMBER_TYPE_COERCE]: Value "all" is not snowflake.
at handleErrors (C:\Users\alexe\AGU Bot\node_modules\@discordjs\rest\dist\index.js:727:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (C:\Users\alexe\AGU Bot\node_modules\@discordjs\rest\dist\index.js:1128:23)
at async SequentialHandler.queueRequest (C:\Users\alexe\AGU Bot\node_modules\@discordjs\rest\dist\index.js:959:14)
at async _REST.request (C:\Users\alexe\AGU Bot\node_modules\@discordjs\rest\dist\index.js:1272:22)
at async GuildMemberRoleManager.add (C:\Users\alexe\AGU Bot\node_modules\discord.js\src\managers\GuildMemberRoleManager.js:131:7)
at async Client.<anonymous> (C:\Users\alexe\AGU Bot\src\roles.js:558:21) {
requestBody: { files: undefined, json: undefined },
rawError: {
message: 'Invalid Form Body',
code: 50035,
errors: { role_id: [Object] }
},
code: 50035,
status: 400,
method: 'PUT',
url: 'https://discord.com/api/v10/guilds/1256302762157932655/members/1016447282176077925/roles/all'
}
8 replies
DIdiscord.js - Imagine ❄
Created by Sincerely, alxx ᴬᴳ on 11/9/2024 in #djs-questions
Bot crashing after string gives role
My bot crashes when a user tries to select a role from my string menu options. It gives the roles then crashes, if they choose remove roles it just crashes. Anything would be appreciated:
24 replies
DIdiscord.js - Imagine ❄
Created by Sincerely, alxx ᴬᴳ on 11/3/2024 in #djs-questions
Slash commands not being created
I have multiple slash commands that wont be create for some reason, and I have no Idea how to fix it, heres my code that sets it up:
const { Client, Events, GatewayIntentBits, ActivityType, SlashCommandBuilder } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildPresences, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.MessageContent] });
client.setMaxListeners(20);

const { setupRules } = require('./rules');
const { setupAutoResponders } = require('./autoresponders');
const { setupRoles } = require('./roles');
const { setupWelcome } = require('./welcome');
const { setupGoodbye } = require('./leave');
const { setupBoost } = require('./boost');
const { setupTickets } = require('./tickets');
const { setupAffiliates } = require('./affiliates');
const { setupStarBoard } = require('./starboard');
const { setupClownBoard } = require('./clownboard')
const { setupEmbeds } = require('./embeds')
const { setupLevels } = require('./levelup')
const { setupColors } = require('./colors')
// Specify the role ID that users must have to use the commands
const requiredRoleID = '1302436968633864242'; // Replace with your actual role ID

client.on(Events.GuildMemberAdd, member => {
setupWelcome(member);
});

client.on(Events.GuildMemberRemove, member => {
setupGoodbye(member);
});

client.on(Events.ClientReady, (x) => {
console.log(`${x.user.tag} is ready!`);
client.user.setPresence({
activities: [{ name: `.gg/agu`, type: ActivityType.Listening }],
status: 'online',
});
});
const { Client, Events, GatewayIntentBits, ActivityType, SlashCommandBuilder } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildPresences, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.MessageContent] });
client.setMaxListeners(20);

const { setupRules } = require('./rules');
const { setupAutoResponders } = require('./autoresponders');
const { setupRoles } = require('./roles');
const { setupWelcome } = require('./welcome');
const { setupGoodbye } = require('./leave');
const { setupBoost } = require('./boost');
const { setupTickets } = require('./tickets');
const { setupAffiliates } = require('./affiliates');
const { setupStarBoard } = require('./starboard');
const { setupClownBoard } = require('./clownboard')
const { setupEmbeds } = require('./embeds')
const { setupLevels } = require('./levelup')
const { setupColors } = require('./colors')
// Specify the role ID that users must have to use the commands
const requiredRoleID = '1302436968633864242'; // Replace with your actual role ID

client.on(Events.GuildMemberAdd, member => {
setupWelcome(member);
});

client.on(Events.GuildMemberRemove, member => {
setupGoodbye(member);
});

client.on(Events.ClientReady, (x) => {
console.log(`${x.user.tag} is ready!`);
client.user.setPresence({
activities: [{ name: `.gg/agu`, type: ActivityType.Listening }],
status: 'online',
});
});
44 replies
DIdiscord.js - Imagine ❄
Created by Sincerely, alxx ᴬᴳ on 10/20/2024 in #djs-questions
Make a select menu builder for certain roles?
I am kinda new to coding and confused on how I can make a select menu for certain roles. I can get the menu sent but don't know how to make a certain interaction add a certain role.
13 replies