got error idk what’s wrong with my code

Here this what i meant
Solution:
As for solution to the original question: Discordjs changed the intent variable case. Either use GatewayIntentBit enum or specify intents in UpperCamelCase...
Jump to solution
57 Replies
Bonnia
BonniaOP5mo ago
Sorry for bad quality
MRDGH2821
MRDGH28215mo ago
At the bottom there is Problems section, which you can use for potential fixes. That will also tell more information for us to debug
UndiedGFX
UndiedGFX5mo ago
what exactly does the error say?
Bonnia
BonniaOP5mo ago
The intents and partials
MRDGH2821
MRDGH28215mo ago
Send a screenshot of that
UndiedGFX
UndiedGFX5mo ago
would you mind copy pasting that error here
MRDGH2821
MRDGH28215mo ago
much better suggestion
Bonnia
BonniaOP5mo ago
They are the simliar thing like the tutorial I’m watching that’s my code wait!
UndiedGFX
UndiedGFX5mo ago
1) we dont know if the tutorial is running the latest versions so please copy paste your error stack
Spinel
Spinel5mo ago
Tag suggestion for @Yukibonnia When asking for help, make sure to provide as much detail as possible. What have you tried so far? Do you have stack traces that you can show us? What are you trying to achieve? Try to answer these questions and others, so we do not have to ask for them afterwards.
❯ For a good guide on how to ask questions, see the instructions that StackOverflow gives. You should try to always follow these guidelines. ❯ For an excellent video that shows how not to ask technical questions, watch this YouTube video by LiveOverflow. ❯ Asking technical questions (Clarkson)How to ask questions the smart way (Raymond)
Bonnia
BonniaOP5mo ago
intents: [“GUILDS”, “GUILD_MESSAGES]” “DIRECT_MESSAGES”, “GUILD MEMBERS”]
UndiedGFX
UndiedGFX5mo ago
that is not the error sir also you are using apple's quotes instead of " that may be problematic
Bonnia
BonniaOP5mo ago
Wait I’ll try take a screenshot shot
UndiedGFX
UndiedGFX5mo ago
@Yukibonnia
Bonnia
BonniaOP5mo ago
No description
Bonnia
BonniaOP5mo ago
here
UndiedGFX
UndiedGFX5mo ago
use " " instead of apple's quotes
Bonnia
BonniaOP5mo ago
I’m use code space wait…. Really?
UndiedGFX
UndiedGFX5mo ago
yes @MRDGH2821 also did djs rename intents to be smaller case?
Bonnia
BonniaOP5mo ago
But they are the " Look at the picture! But there’s stupid bug I see it When I close it the errors gone wtf is this bug
MRDGH2821
MRDGH28215mo ago
@Yukibonnia
No description
Bonnia
BonniaOP5mo ago
Wait
UndiedGFX
UndiedGFX5mo ago
.
MRDGH2821
MRDGH28215mo ago
GitHub
Perpetual-Mechanical-Array-Bot/src/index.ts at 8780e19eaea7fcb6c6db...
Discord Bot for Traveler Mains Server. Contribute to MRDGH2821/Perpetual-Mechanical-Array-Bot development by creating an account on GitHub.
UndiedGFX
UndiedGFX5mo ago
i use the enum but idk about string
d.js docs
d.js docs5mo ago
- Websocket intents limit events and decrease memory usage: learn more - See what intents you need here
MRDGH2821
MRDGH28215mo ago
ignore this This can help @Yukibonnia
Bonnia
BonniaOP5mo ago
Bruh
No description
UndiedGFX
UndiedGFX5mo ago
told you, replace GUILDS with Guilds; GUILD_MESSAGES with GuildMessages like that your tutorial is outdated
MRDGH2821
MRDGH28215mo ago
That's it You have your answer.
Bonnia
BonniaOP5mo ago
So is not can be caps?
UndiedGFX
UndiedGFX5mo ago
and ffs remove the partials line they changed it in latest djs, your tutorial is outdated
Bonnia
BonniaOP5mo ago
Yup if was 2 years ago lol
UndiedGFX
UndiedGFX5mo ago
@Yukibonnia if you could copy paste your code to here, i could help you edit it quicker i cannot edit a screenshot you know
Spinel
Spinel5mo ago
Before you make a Discord Bot, you should have a good understanding of JavaScript. This means you should have a basic understanding of the following topics: - Read and understand docs - Debug code - Syntax - NodeJS module system If you aren't sure that your understanding of JavaScript is truly good enough to make a bot, you should try to continue learning first. Here are good resources to learn both Javascript and NodeJS: - Codecademy: https://www.codecademy.com/learn/javascript - Udemy: https://www.udemy.com/javascript-essentials/ - Eloquent JavaScript, free book: http://eloquentjavascript.net/ - You-Dont-Know-JS: https://github.com/getify/You-Dont-Know-JS - JavaScript Garden: https://bonsaiden.github.io/JavaScript-Garden/ - JavaScript reference/docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference - Nodeschool: https://nodeschool.io/ - Pluralsight: https://www.codeschool.com/courses/real-time-web-with-node-js Before you ask a question, you should ask these yourself: 1. Is this question related to JavaScript, or the library I am using? - If it is the library you are using, go to the proper server. You would get better answers there. 2. Have I tried to google and/or check StackOverflow? - Double-check that you can't find anywhere that can lead you to a solution online. 3. Have I tried to look on MDN or the library documentation? - You should always check documentation to make sure you aren't missing any details. 4. Does my question make enough sense so that people can understand it, and do they understand what I am trying to accomplish? - If no, revise your question. Give as much detail as possible. Include any error or code output that can help us help you. 5. Am I aware of what I am doing, and not just mindlessly copying and pasting? - If you are just copying and pasting code from a guide, you are not going to be able to solve anything. Make sure you understand the code you are writing.
MRDGH2821
MRDGH28215mo ago
On a side note this is #discordjs-support question
MRDGH2821
MRDGH28215mo ago
Also @Yukibonnia instead of a video, start with this official djs guide: https://discordjs.guide/#before-you-begin Then add the features & stuff you wanted to. And finally start with Sapphire framework
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
Bonnia
BonniaOP5mo ago
GitHub
GitHub - Bonniaas/MokaBot: Bot by sapphire/framework
Bot by sapphire/framework. Contribute to Bonniaas/MokaBot development by creating an account on GitHub.
MRDGH2821
MRDGH28215mo ago
Is this your first time making a discord bot?
Bonnia
BonniaOP5mo ago
Nope But is my first time try typescript Im was use python before lol
MRDGH2821
MRDGH28215mo ago
Is this your first time making a discord bot using Javascript/typescript?
Bonnia
BonniaOP5mo ago
But they were stupid so i goes to try typescript You can say i didn’t code anything like 6 months so much since I started like 8 months ago So it didn’t go well with my stupid dead passion
MRDGH2821
MRDGH28215mo ago
Then I suggest you start with this. This will build your understanding after which you can comfortably use Sapphire framework
Bonnia
BonniaOP5mo ago
Even I’m always gets like busy with anything instead of codes Yeah but I’ll keep with typescript instead of JavaScript
MRDGH2821
MRDGH28215mo ago
No problem, Discordjs guide will point out wherever there is something typescript specific. You will just need to deal with type system in Typescript, else Javascript knowledge can be used in Typescript & vice versa
Bonnia
BonniaOP5mo ago
Don’t worry Trust me I’ll just Try first typescript only so won’t be any error lol
Solution
MRDGH2821
MRDGH28215mo ago
As for solution to the original question: Discordjs changed the intent variable case. Either use GatewayIntentBit enum or specify intents in UpperCamelCase
Bonnia
BonniaOP5mo ago
Just only i need is just do some small things So in future I’ll make bots That larger
MRDGH2821
MRDGH28215mo ago
No description
Bonnia
BonniaOP5mo ago
Im on iPad For god’sake
MRDGH2821
MRDGH28215mo ago
Long press message, same options will come
UndiedGFX
UndiedGFX5mo ago
you're doing a mistake get adapted to javascript first and then move to typescript
Bonnia
BonniaOP5mo ago
And what’s this mistake?
UndiedGFX
UndiedGFX5mo ago
typescript is complex for beginners @Boomeravna mark as solution
Favna
Favna5mo ago
Everyone can do that btw
MRDGH2821
MRDGH28215mo ago
No description
Favna
Favna5mo ago
Oh Makes sense actually
Want results from more Discord servers?
Add your server