chess_legend
DIAdiscord.js - Imagine an app
•Created by chess_legend on 2/27/2024 in #djs-questions
token error
for this code i am not getting the slash commands to be registered
[nodemon] 3.1.0
[nodemon] to restart at any time, enter
rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting node index.js
✅ kaushi annoyer#4363 is online.
[nodemon] restarting due to changes...
[nodemon] starting node index.js
✅ kaushi annoyer#4363 is online.26 replies
DIAdiscord.js - Imagine an app
•Created by chess_legend on 2/27/2024 in #djs-questions
token error
also another question
26 replies
DIAdiscord.js - Imagine an app
•Created by chess_legend on 2/27/2024 in #djs-questions
token error
yes that worked thanks
26 replies
DIAdiscord.js - Imagine an app
•Created by chess_legend on 2/27/2024 in #djs-questions
token error
like this right?
require('dotenv').config();
console.log(process.env)
const { Client, IntentsBitField, Message } = require('discord.js');
const client = new Client({
intents: [
IntentsBitField.Flags.Guilds,
IntentsBitField.Flags.GuildMembers,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.MessageContent,
],
});
client.on('ready', (c) => {
console.log(
✅ ${c.user.tag} is online.
);
});
client.on("messageCreate",(message)=> {
if (message.content === "hello"){
message.reply("hey")
}
})
client.on('interactionCreate', (interaction) => {
if (!interaction.isChatInputCommand()) return;
if (interaction.commandName === 'hey') {
return interaction.reply('hey!');
}
if (interaction.commandName === 'ping') {
return interaction.reply('Pong!');
}
});
client.login(process.env.TOKEN);26 replies
DIAdiscord.js - Imagine an app
•Created by chess_legend on 2/27/2024 in #djs-questions
token error
i just got things like my computer name and aapdata and stuff i dont see the token
26 replies
DIAdiscord.js - Imagine an app
•Created by chess_legend on 2/27/2024 in #djs-questions
token error
26 replies
DIAdiscord.js - Imagine an app
•Created by chess_legend on 2/27/2024 in #djs-questions
token error
i did
26 replies
DIAdiscord.js - Imagine an app
•Created by chess_legend on 2/27/2024 in #djs-questions
token error
i did control save
26 replies
DIAdiscord.js - Imagine an app
•Created by chess_legend on 2/27/2024 in #djs-questions
token error
is it not detecting the change
26 replies
DIAdiscord.js - Imagine an app
•Created by chess_legend on 2/27/2024 in #djs-questions
token error
i did just now
26 replies
DIAdiscord.js - Imagine an app
•Created by chess_legend on 2/27/2024 in #djs-questions
token error
positive
26 replies
DIAdiscord.js - Imagine an app
•Created by chess_legend on 2/27/2024 in #djs-questions
token error
26 replies
DIAdiscord.js - Imagine an app
•Created by chess_legend on 2/27/2024 in #djs-questions
token error
26 replies
DIAdiscord.js - Imagine an app
•Created by chess_legend on 2/27/2024 in #djs-questions
token error
this is pacage.json
26 replies
DIAdiscord.js - Imagine an app
•Created by chess_legend on 2/27/2024 in #djs-questions
token error
26 replies
DIAdiscord.js - Imagine an app
•Created by chess_legend on 2/27/2024 in #djs-questions
token error
v20.11.1
26 replies
DIAdiscord.js - Imagine an app
•Created by chess_legend on 2/27/2024 in #djs-questions
token error
26 replies
DIAdiscord.js - Imagine an app
•Created by chess_legend on 2/27/2024 in #djs-questions
token error
Error [TokenInvalid]: An invalid token was provided.
at Client.login (C:\Users\aavig\python\discord-bot\node_modules\discord.js\src\client\Client.js:216:52)
at Object.<anonymous> (C:\Users\aavig\python\discord-bot\src\index.js:37:8)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49 {
code: 'TokenInvalid'
}
26 replies