push0
push0
Explore posts from servers
DIAdiscord.js - Imagine a boo! 👻
Created by push0 on 3/7/2024 in #djs-questions
DiscordAPIError[10008]: Unknown Message
} /root/bots/Synth/node_modules/@discordjs/rest/dist/index.js:640 throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData); ^ DiscordAPIError[10008]: Unknown Message at handleErrors (/root/bots/Synth/node_modules/@discordjs/rest/dist/index.js:640:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async SequentialHandler.runRequest (/root/bots/Synth/node_modules/@discordjs/rest/dist/index.js:1021:23) at async SequentialHandler.queueRequest (/root/bots/Synth/node_modules/@discordjs/rest/dist/index.js:862:14) at async REST.request (/root/bots/Synth/node_modules/@discordjs/rest/dist/index.js:1387:22) at async MessageManager.delete (/root/bots/Synth/node_modules/discord.js/src/managers/MessageManager.js:255:5) at async Message.delete (/root/bots/Synth/node_modules/discord.js/src/structures/Message.js:816:5) { requestBody: { files: undefined, json: undefined }, rawError: { message: 'Unknown Message', code: 10008 }, code: 10008, status: 404, method: 'DELETE', url: 'https://discord.com/api/v10/channels/1176250354833313861/messages/1214873265689075772' } i dont touch my bot since decades and i dont remember how discordjs works, i would like to understand where the "url" is placed at so i can replace it cuz this one is outdated...
60 replies
SIASapphire - Imagine a framework
Created by push0 on 3/4/2024 in #discordjs-support
commands doesnt work
client.commands = new Collection(); const commandFiles = fs.readdirSync('/root/eye/Eye/Eye/commands/').filter(file => file.endsWith('.js')); for (const file of commandFiles) { const command = require(/root/eye/Eye/Eye/commands/${file}); client.commands.set(command.name, command); } client.on('messageCreate', message => { if (!message.content.startsWith(prefix) || message.author.bot) return; const args = message.content.slice(prefix.length).trim().split(/ +/); const commandName = args.shift().toLowerCase(); if (!client.commands.has(commandName)) return; const command = client.commands.get(commandName); try { command.execute(message, args); } catch (error) { console.error(error); message.reply('There was an error trying to execute that command!'); } }); client.login(token); i did this for register my commands folder and make use every .js on that exactly folder where all the commands for the server are there, but it doesnt work...why?
21 replies
DIAdiscord.js - Imagine a boo! 👻
Created by push0 on 3/4/2024 in #djs-questions
commands dont appear/work
const fs = require('fs'); const { Client, Collection, GatewayIntentBits, EmbedBuilder, ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle, ButtonBuilder, ButtonStyle } = require('discord.js'); const { token } = require('./config.json'); var risultato = ""; const risultati = new Map(); const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildEmojisAndStickers, GatewayIntentBits.GuildPresences, GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.GuildInvites, GatewayIntentBits.GuildMessageTyping, GatewayIntentBits.GuildWebhooks, GatewayIntentBits.GuildIntegrations, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.GuildModeration], partials: ['CHANNEL', 'GUILD_MEMBER', 'GUILD_SCHEDULED_EVENT', 'MESSAGE', 'REACTION', 'USER', 'GUILD_MESSAGE'], }); i attached every command that i use on my index.js, why its not working?
4 replies