Комментарии:
Leave a comment if you need any help!
ОтветитьOkay so, I've tried to sent the test command for the bot, but not getting any luck. any help?
ОтветитьIm get this when I try start it
How do I fix it?
TypeError: Discord.client is not a constructor
at Object.<anonymous> (C:\Users\tlinz\Desktop\Sandy Shore Roleplay Moderator Bot\index.js:5:16)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47
I wrote node . but it send:
node : The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At line:1 char:1
+ node .
+ ~~~~
+ CategoryInfo : ObjectNotFound: (node:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
the bot is not online to me
Ответитьwhen i do "!test" It doesnt say anything help
Ответитьi cant seem to get the bot to say anything when i do !test.
My code is
const Discord = require(`discord.js`);
const prefix = '!';
const client = new Discord.Client({
allowedMentions: {
parse: [`users`, `roles`],
repliedUser: true,
},
intents: [
"Guilds",
"GuildMessages",
"GuildPresences",
"GuildMembers",
"GuildMessageReactions",
],
});
client.on("ready", () => {
console.log("bot is online!")
})
client.on('message', message => {
if (message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).split(/ +/);
const command = args.shift().toLowerCase();
//test command
if (command === 'test'){
message.channel.send('The bot is currently working 😀')
}
})
client.login("token")
i still got the bitfieldinvalid error after this:
const Discord = require('discord.js');
const prefix = '!';
const client = new Discord.Client({
allowedMentions: {
parse: [`users`, `roles`],
repliedUser: true,
},
intents: [
"Guilds",
"GuildMessages",
"GuildPresences",
"GuildMembers",
"GuildMessageReactions",
],
});
client.on("ready", () => {
console.log("Bot is online")
})
client.login("........")
help
"Error: Used disallowed intents"
PLEASE help 🙏
I checked my code over and over but my prefix commands still don't work. My bot says nothing when I type !test.
ОтветитьThe test command doesnt work, I copied everything you did and the bot is online.
Ответитьdid all the code with the newest Discord.js Guilds stuff and the bit connects but will not answer the !test command.
ОтветитьNote: "client.on('message'..." didn't work for me, but "client.on('messageCreate'..." did.
Ответитьsays 'MODULE_NOT_FOUND'
ОтветитьHello, actually my test command doesn't really work, can you advice what might be wrong?
Typed all code as on video, did node but bot doesn't see a command and doesn't reply, tysm for an answer
"Discord client is not a constructor"
Anyone know how to fix this?
Might u send new version of tutorial? I cant find it
ОтветитьNode : The term 'Node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Node .
+ ~~~~
+ CategoryInfo : ObjectNotFound: (Node:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Today I begin my journey of making my discord bot. After looking at multiple series this one seems to be the most helpful one. Thank you
ОтветитьNote: If it isn't working after changing the Intents (Marzuq Mortuzas' comment), add a new intent called "MessageContent" and then it will work.
ОтветитьThe bot does not send any messages in the chat! Why?
Ответитьyo when i run the code all it says is MODULE_NOT_FOUND
ОтветитьI keep getting this error : ReferenceError: Client is not defined
Ответить'BitFieldInvalid' :0
Ответитьim the best at coding here fuckrs
ОтветитьOn me their come no folders or anything in my folder after running the dms command I also downloaded node ja 64x bit for windows maybe help me :c
Ответитьyo it say npm not recognised
Ответитьcan i dm u on discord i need help with this
Ответитьhow do i do this on mac
ОтветитьKupio sam dva servera,jel mozs da mi pomognes oko server-statusa na discordu da mogu videti kako videti koje na serveru?
Ответитьee druze,nasao sam te :)
ОтветитьScam server
Ответитьiam heaving problem while using node . in terminal
Ответитьwill this work for Mac
ОтветитьTy ur a chad :)
Ответитьwhen I try the test command it doesn't work and no errors come up
ОтветитьI do all the steps for the test command but when I do it in discord it does not work
ОтветитьIf i close out of my visual studio code how do i open it back up
ОтветитьSo i tried to adapt this code so i could be learning while also coding, but i only changed some texts like the reply message and the prefix...
Althought this code is mostly aproved there are some intents discord has not allowed and i think that my bot is not replying because of that... it seems like the intens:
"GuildPresences", "GuildMembers" arent allowed and i was just curious to check if others have that problem too in 2023...i mean a lot changed and most of it is broken now :/
node . doesn't activate anything, can anyone help me? :(
Ответитьv13 or v14?
ОтветитьI said the test command but it wont respond
ОтветитьIs it possible for slash commands?
ОтветитьIt doesn't seem to reply when I try the test command, any fixes?
Ответитьnode : The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and tr
y again.
At line:1 char:1
+ node .
+ ~~~~
+ CategoryInfo : ObjectNotFound: (node:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Help me
I checked my code over and over but my prefix commands still don't work. My bot says nothing when I type !test.
ОтветитьAnyone got a solution for this??
C:\Users\gerben\Desktop\Test bot\node_modules\discord.js\src\client\Client.js:489
throw new DiscordjsTypeError(ErrorCodes.ClientMissingIntents);
^
TypeError [ClientMissingIntents]: Valid intents must be provided for the Client.
at Client._validateOptions (C:\Users\gerben\Desktop\Test bot\node_modules\discord.js\src\client\Client.js:489:13)
at new Client (C:\Users\gerben\Desktop\Test bot\node_modules\discord.js\src\client\Client.js:78:10)
at Object.<anonymous> (C:\Users\gerben\Desktop\Test bot\index.js:5:16)
at Module._compile (node:internal/modules/cjs/loader:1218:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
at Module.load (node:internal/modules/cjs/loader:1081:32)
at Module._load (node:internal/modules/cjs/loader:922:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
code: 'ClientMissingIntents'
i can get the bot online but its not running the test command
Ответитьwhenever i do !test it dont do anything
ОтветитьFor some reason, My bot doesn't respond to commands at all. I checked its perms and I wrote the code correctly, Its online yet its unresponsive. @MrJAwesome can you help me with this?
Ответить