“Hey, I hope you are doing well. I just wanted to say that over the past few months, our conversations have really meant a lot to me and I’ve developed feelings for you. I enjoy spending time with you and I love how you make me feel when I’m around you. I’m telling you all this because I care about you and I think you deserve to know the truth. So I just want you to know that my feelings for you are real and I want you to think about it as well.”
For some reason when I execute the code in the shell, some error pops up mentioning "Cannot read properties of undefined (reading 'setToken')" how can I fix this issue
This is a well paced, all rounded video, however I would like to mention that the lack of 4k really ruining the experience for me, nevertheless, I will hesitate from calling this video bad because of the pros I mentioned above. Looking forward to see more videos, but the next time with 4k. Thank you for your understanding.
Not sure if anyone will see this, but for some reason it keeps saying something alone the lines of REST isn't valid or smthin, I genuinely can't do anything because rest wont work. Any advice?
i keep getting to @4:30 where i run the "node name-of-file.js" and it tells me "TypeError: REST is not a constructor" yet this is what my code looks like const { REST, Routes } = require("discord.js"); //Info needed for slash commands const botID = "here i have my bot ID, ignore this part"; const serverID = "here i have my server ID, ignore this part"; const botToken = process.env.token; const rest = new REST().setToken(botToken); const slashRegister = async () => { try { await rest.put(Routes.applicationGuildCommands(botID, serverID), { body: [ { name: "ping", description: "just ping command, lol." } ] }); } catch (error) { console.log(error); } }; slashRegister(); thoughts?
@@ImagineGamingPlay ~/AttachedSwelteringLearning$ node slash-deploy.js node:internal/modules/cjs/loader:1146 throw err; ^ Error: Cannot find module 'discord.js' Require stack: - /home/runner/AttachedSwelteringLearning/slash-deploy.js at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15) at Module._load (node:internal/modules/cjs/loader:984:27) at Module.require (node:internal/modules/cjs/loader:1231:19) at require (node:internal/modules/helpers:179:18) at Object. (/home/runner/AttachedSwelteringLearning/slash-deploy.js:1:26) at Module._compile (node:internal/modules/cjs/loader:1369:14) at Module._extensions..js (node:internal/modules/cjs/loader:1427:10) at Module.load (node:internal/modules/cjs/loader:1206:32) at Module._load (node:internal/modules/cjs/loader:1022:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/runner/AttachedSwelteringLearning/slash-deploy.js' ] }( this is the error i get on the same step
im also getting the same problem, have you found a fix? edit: i think i fixed it, take off the "()" in const rest = new REST().setToken(botToken); so it should be const rest = new REST.setToken(botToken); but for some reason it doesnt show it on discord, i even made prefix command and nothing would print
@@artman3 im actually just now seeing his reply.. fuck me. i havent found a fix btw, but as he said to me check to see if you're using the latest discord.js version since that might be the root of our issues
@Zachary_24 Go to package.json, and there you'll see a line which goes something like "discord.js": version, from there you can see the version. (like 14.x.y is v14)
It says my token is not present when I tried to run the command in shell. How do I fix this? Edit: now it says discordapi error 401 unauthorized Edit 2: ok it says my token is invalid/unexpected when I type node slash-deploy.js
not sure if anyone will see this, but for some reason my slash command simply just doesn't appear. my bot is online, and it is in my server. but the slash command doesnt show
Hey I don't know what is happening but for require("discord.js") it says "File is a CommonJS module; it may be converted to an ES module." I am really confused
Hi! I really loved your tutorial but im getting an error on this line const rest = new REST().setToken(BotToken) When im trying to run it from the shell, its throwing this error, pls tell me how to resolve this const rest = new REST().setToken(BotToken) ^ TypeError: REST is not a constructor
@@ImagineGamingPlay nope it’s new and i stopped using replit cause they told me that it’s not that safe so don’t worry! thanks for answering if you want more info about replit i could dm you on discord
@@ImagineGamingPlay nahhhh bro you're literally our careless father in bot development you thaught as the most basic things and went for milk and we learnt everything advanced ourselves. Joining your servers feels like nostalgia. Sending code with token and using that one dog bot (chiku was the name ig) tag system to get code like "start" tag and other tags for commands' code. Started from copying others code from your server to teaching others bot development. I've come a long way (now it's boring but I wanna restart). Love from India buddy ❤️
I dont use these AI voices I don't trust them look up No Text to Speach and he will help you his a real person and isn't a AI voice that says get me to this like and I'll do a voice reveal
Can you explain how to fix this? ExpectedConstraintError > s.string.regex Invalid string format Expected: expected /^[\p{Ll}\p{Lm}\p{Lo}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u.test(expected) to be true Received: | 'ping'
here u go sir.
I feel bad for you..
fr feel bad that the creator didn't reply or pinged ur message
My bad
happy 18th bday dude! (i was watching the embed tutorial when you said your bday and i realised im watching on your 18th haha)
Thank you! Atleast someone remembers
Big W! Looking forward for the part 2 and upcoming future videos. Keep it up mate
Out of 100 tutorials I watched this is the only one that explains clearly!! You earned yourself a sub man!!
ooooraaa
Bros Comback 👀
Thank you for making this video! This was super helpful!
Haven't seen this name in a while... Welcome back IGP.
Yo, you are back on youtube :D
The legend finally came back, a big W fr
“Hey, I hope you are doing well. I just wanted to say that over the past few months, our conversations have really meant a lot to me and I’ve developed feelings for you. I enjoy spending time with you and I love how you make me feel when I’m around you. I’m telling you all this because I care about you and I think you deserve to know the truth. So I just want you to know that my feelings for you are real and I want you to think about it as well.”
Waiting for next part🎉
Holy shit bro came back
For some reason when I execute the code in the shell, some error pops up mentioning "Cannot read properties of undefined (reading 'setToken')" how can I fix this issue
fixed it or still?
This is a well paced, all rounded video, however I would like to mention that the lack of 4k really ruining the experience for me, nevertheless, I will hesitate from calling this video bad because of the pros I mentioned above. Looking forward to see more videos, but the next time with 4k.
Thank you for your understanding.
My mans backkkkkkk! Les goooo
Thanks, you made it looks easy
I made my own bot! Thank you!
Not sure if anyone will see this, but for some reason it keeps saying something alone the lines of REST isn't valid or smthin, I genuinely can't do anything because rest wont work. Any advice?
You need to be a little more specific about the error
@@ImagineGamingPlay REST is not a constructor is what shows up
Yooo bro came back
bro came alive
omgg bro tyy i need this a lot
i keep getting to @4:30 where i run the "node name-of-file.js" and it tells me "TypeError: REST is not a constructor" yet this is what my code looks like
const { REST, Routes } = require("discord.js");
//Info needed for slash commands
const botID = "here i have my bot ID, ignore this part";
const serverID = "here i have my server ID, ignore this part";
const botToken = process.env.token;
const rest = new REST().setToken(botToken);
const slashRegister = async () => {
try {
await rest.put(Routes.applicationGuildCommands(botID, serverID), {
body: [
{
name: "ping",
description: "just ping command, lol."
}
]
});
} catch (error) {
console.log(error);
}
};
slashRegister();
thoughts?
Sorry for ignoring, are you using the latest discord.js version? If you don't know how to check, do let me know.
@@ImagineGamingPlay ~/AttachedSwelteringLearning$ node slash-deploy.js
node:internal/modules/cjs/loader:1146
throw err;
^
Error: Cannot find module 'discord.js'
Require stack:
- /home/runner/AttachedSwelteringLearning/slash-deploy.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
at Module._load (node:internal/modules/cjs/loader:984:27)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:179:18)
at Object. (/home/runner/AttachedSwelteringLearning/slash-deploy.js:1:26)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/home/runner/AttachedSwelteringLearning/slash-deploy.js' ]
}(
this is the error i get on the same step
im also getting the same problem, have you found a fix?
edit:
i think i fixed it, take off the "()" in
const rest = new REST().setToken(botToken);
so it should be
const rest = new REST.setToken(botToken);
but for some reason it doesnt show it on discord, i even made prefix command and nothing would print
@@artman3 im actually just now seeing his reply.. fuck me. i havent found a fix btw, but as he said to me check to see if you're using the latest discord.js version since that might be the root of our issues
@@ImagineGamingPlay just now seeing your reply 😭 im not 100% sure if i am or not, ill get back to you on whether or not it fixes the issue.
GUYS HES BACK
when are you coming back
Very soon
@@ImagineGamingPlay W
He is back
Amazing tutorial
Thank you man
can u make a video with a slash command with embed having options?
It doesn’t show the command 4:34
Bro remembered his youtube password
Thank you a good video keep up
shell says that "TypeError: REST is not a constructor", what do i do to fix?
Sorry for ignoring, are you using the latest discord.js version? If you don't know how to check, do let me know.
@@ImagineGamingPlay how do you?
@Zachary_24 Go to package.json, and there you'll see a line which goes something like "discord.js": version, from there you can see the version. (like 14.x.y is v14)
@@ImagineGamingPlay mine is 1.0.0
@@MrGamerBoyYTOrg you're seeing the wrong line
It says my token is not present when I tried to run the command in shell. How do I fix this?
Edit: now it says discordapi error 401 unauthorized
Edit 2: ok it says my token is invalid/unexpected when I type node slash-deploy.js
have you fixed it yet
I'm having the same issue, any help would be appreciated
@terracottasucks it means your token is invalid in the security tab
BRO WHERE WERE YOU
ALMOST NINETEENTH BDAY!!!
Yeah about 2 months left!!
not sure if anyone will see this, but for some reason my slash command simply just doesn't appear. my bot is online, and it is in my server. but the slash command doesnt show
Have you tried refreshing your client?
Same issue
Eii, so I was wondering. Coul you please remake the first videos? The codes aren't working anymore
I might as well do that
Hey I don't know what is happening but for require("discord.js") it says "File is a CommonJS module; it may be converted to an ES module." I am really confused
It also says cannot find module
Your initial comment is just a warning. For your second issue, you don't have discord.js installed most likely
@@ImagineGamingPlay thanks but I have it installed
Keeps happening to me aswell, anyone know what to do?
@@MuddyIsCool i some how fixed it
could u make a video next on how to make reaction roles?
using ur bot ofc
i didnt hear you get rebooted man
slayyyy skay 💅
I keep getting an error called "REST is not a constructor at Object" does anyone know how to fix it?
how are you definine "REST"
Did someone press your start button?
Yes. I did
Can you make a tutorial of how to make your bot be seen on the bot directory?
Hey can I code a bot with you?
The king is back!
Yes sir!
what is the software you use to code?
replit
Hi! I really loved your tutorial but im getting an error on this line
const rest = new REST().setToken(BotToken)
When im trying to run it from the shell, its throwing this error, pls tell me how to resolve this
const rest = new REST().setToken(BotToken)
^
TypeError: REST is not a constructor
Are you using an older version of discord.js?
@ImagineGamingPlay idk how to update it then
@@nathanbenofficial522 Hop on to my Discord server. It's better there for helping
@@ImagineGamingPlay Thx ill join, but im using the latest version which is 14.63.3
so for me it says "REST is not a constructor" so maybe i need to update my discord.js version. how do i do that without fucking up the codes?
nvm i've done it but idk if my codes still work like before. It's saying "ReadableStream is not defined"
@@kodzukennnnn Your node.js is outdated. are you using an old repl project perhaps?
@@ImagineGamingPlay nope it’s new and i stopped using replit cause they told me that it’s not that safe so don’t worry! thanks for answering
if you want more info about replit i could dm you on discord
Which discord.js should we use?
v14
Igp revived discord bot help
7:40
bro who got his reboot card 💀
imagineeee
Post more i need you
Roger that
how to download discord.js v14 on replit. It only shows v14.14.1
that's still v14
How do I get to the coding part?
Watch my first video
W
IT SAYS INSTALL REPLITS NODE TOOLS
Who tf revived you
Found my reboot card
@@ImagineGamingPlay nahhhh bro you're literally our careless father in bot development you thaught as the most basic things and went for milk and we learnt everything advanced ourselves. Joining your servers feels like nostalgia. Sending code with token and using that one dog bot (chiku was the name ig) tag system to get code like "start" tag and other tags for commands' code.
Started from copying others code from your server to teaching others bot development. I've come a long way (now it's boring but I wanna restart).
Love from India buddy ❤️
it says Rest is not a Constructor how the hell do we fix that??
I'd need to see your code for that
@@ImagineGamingPlay So it no longer does that but it wont do a command still after running into no errors.
BRO 3:38 TELL ME WHAT TO DO LIKE UR JUST GOIN BAM BAM QUICK apart from that good work sorry
Calm down
@@ImagineGamingPlay i got anger issues sorry
I cant use spaces or Capitals in my Command name anyone help me?
You cant use them, for example you cant do “/Ping Me” but you can do “/ping-me”
@@stilryttv I have seen multiple commands use spaces though
@@Kaiser_Playz might be like special coding or something
@@Kaiser_Playz Those are called sub commands
not working
Yo why taking so long for a video create more videos
Can you explain how to code our bots like without checking tutorials os it possible ?
How to make, that the bot loggs into an Fortnite account?
Bro took a whole lifetime to post
idk why but this is bugging my code
Fixed?
❤❤
Hi
YOU ALIVENED FROM THE DEAD WTF
PASTE BIN>>>
But
Nvm
I am fast as fk boiis
Yowtf
Igp, can i please get unbanned on your server? I had been banned a long time ago just because of joking.
speed
👋👋❤❤
❤❤
First comment. Likeeee
firstt
goofy ah voice
how to fix
error message
ReferenceError: ReadableStream is not defined
at Object. (/home/runner/bot/node_modules/undici/lib/web/fetch/response.js:530:3)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at Module.load (node:internal/modules/cjs/loader:1076:32)
at Function.Module._load (node:internal/modules/cjs/loader:911:12)
at Module.require (node:internal/modules/cjs/loader:1100:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object. (/home/runner/bot/node_modules/undici/lib/web/fetch/index.js:11:5)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
my code
const { REST, Routes } = require("discord.js")
//info
const botID = "1270926735382413343"
const serverID = "1270933837068898305"
const botToken = process.env.token
const rest = new REST().setToken(botToken)
const slashRegister = async () => {
try {
await rest.put(Routes.applicationGuildCommands(botID, serverID), {
body: [
{
name: "ping",
description: "Replies with pong!"
}
]
})
} catch (error) {
console.log(error)
}
}
slashRegister();
z
I dont use these AI voices I don't trust them look up No Text to Speach and he will help you his a real person and isn't a AI voice that says get me to this like and I'll do a voice reveal
What?
Can you explain how to fix this?
ExpectedConstraintError > s.string.regex
Invalid string format
Expected: expected /^[\p{Ll}\p{Lm}\p{Lo}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u.test(expected) to be true
Received:
| 'ping'
Have you fixed it or still need help?
Yooo bro came back