Robelo06
Robelo06
DIAdiscord.js - Imagine an app
Created by Robelo06 on 8/14/2024 in #djs-questions
Slash Command registration in files and in deploy-commands: double declaration
Hello, I asked for help a lot of times here and every times I sent my code, the member who was assisting me asked me "Why do you declare commands twice? in the deploy-commands.js file and in the command file" My only answer was because it was listed in the guide and if i declare it only one it doesnt work If someone can, help me to declare commands only once
5 replies
DIAdiscord.js - Imagine an app
Created by Robelo06 on 4/14/2024 in #djs-questions
Unknown Issue with some Commands
No description
45 replies
DIAdiscord.js - Imagine an app
Created by Robelo06 on 3/4/2024 in #djs-questions
DM an User Catch Issue
No description
8 replies
DIAdiscord.js - Imagine an app
Created by Robelo06 on 2/12/2024 in #djs-questions
Issue with Select Menu
Hello, I'm new with select menus, I tried them today but the bot isn't responding to them. The console does not get an error and it should return an error if it fails Code: https://sourceb.in/U5zQWScCWS Select menu part starts in like 166 and no, I'm not using a channel collector, it's a message collector
10 replies
DIAdiscord.js - Imagine an app
Created by Robelo06 on 9/27/2023 in #djs-questions
Issue with getting Message author
Error:
TypeError: Cannot read properties of undefined (reading 'fetch')
at Object.execute (/home/container/src/commands/report.js:16:17)
at async Client.<anonymous> (/home/container/index.js:61:3)
TypeError: Cannot read properties of undefined (reading 'fetch')
at Object.execute (/home/container/src/commands/report.js:16:17)
at async Client.<anonymous> (/home/container/index.js:61:3)
Code: https://sourceb.in/cIZnGcjK6A
28 replies
DIAdiscord.js - Imagine an app
Created by Robelo06 on 9/2/2023 in #djs-questions
GuildCreate and GuildDelete iconURL when null
Hello, I'm trying to make my bot log which servers it joined/left with name, icon and id but it creates an error and doesn't post the embed when the server doesn't have an iconURL guild.iconURL returns:
iconURL(options = {}) {
return this.icon && this.client.rest.cdn.icon(this.id, this.icon, options);
}
iconURL(options = {}) {
return this.icon && this.client.rest.cdn.icon(this.id, this.icon, options);
}
Anyone how how to handle this case and make the bot post the embed without the iconurl when the server doesn't have an icon?
14 replies
DIAdiscord.js - Imagine an app
Created by Robelo06 on 8/30/2023 in #djs-questions
Error: Expected token to be set for this request, but none was present
No description
14 replies
DIAdiscord.js - Imagine an app
Created by Robelo06 on 8/15/2023 in #djs-questions
Panel command doesn't create the channel
My panel command creates the panel but doesn't allow anyone to open a ticket when clicking on the button The console gives no error and it does ot create the channel code: https://sourceb.in/wriudpL9HD
55 replies
DIAdiscord.js - Imagine an app
Created by Robelo06 on 3/25/2023 in #djs-questions
New in discord.js
Hello everyone, I'm new in discord.js and i'm trying to make my first bot with slash commands. In the Welcome page (discord.js website) I found a code that worked but not totally. The BOT got the {/} commands badge but I can't use the /ping role with that bot because I can't see it in the list. How can I fix it? Thanks in advance 🙂 CODE:
const { REST, Routes } = require('discord.js');
//
const commands = [
{
name: 'ping',
description: 'Replies with Pong!',
},
];

const rest = new REST({ version: '10' }).setToken("TOKEN");
//
(async () => {
try {
console.log('Started refreshing application (/) commands.');

await rest.put(Routes.applicationCommands("1089104043437195294"), { body: commands });

console.log('Successfully reloaded application (/) commands.');
} catch (error) {
console.error(error);
}
})();
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds] });

client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
//
client.on('interactionCreate', async interaction => {
if (!interaction.isChatInputCommand()) return;

if (interaction.commandName === 'ping') {
await interaction.reply('Pong!');
}
});
//
client.login("TOKEN");
const { REST, Routes } = require('discord.js');
//
const commands = [
{
name: 'ping',
description: 'Replies with Pong!',
},
];

const rest = new REST({ version: '10' }).setToken("TOKEN");
//
(async () => {
try {
console.log('Started refreshing application (/) commands.');

await rest.put(Routes.applicationCommands("1089104043437195294"), { body: commands });

console.log('Successfully reloaded application (/) commands.');
} catch (error) {
console.error(error);
}
})();
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds] });

client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
//
client.on('interactionCreate', async interaction => {
if (!interaction.isChatInputCommand()) return;

if (interaction.commandName === 'ping') {
await interaction.reply('Pong!');
}
});
//
client.login("TOKEN");
10 replies