Comments (2)
reason is beacuse of the intents:
Maintaining a stateful application can be difficult when it comes to the amount of data you're expected to process, especially at scale. Gateway Intents are a system to help you lower that computational burden.
Some intents are defined as "Privileged" due to the sensitive nature of the data. Those intents are:
GUILD_PRESENCES
GUILD_MEMBERS
Once your bot reaches 100 or more servers, Privileged Intents require Verification and whitelisting.
My bot uses those intents! How do I fix this?
First you need to go to your bot page on the discord developer portal and click on 'bot', below your token enable these two features https://i.imgur.com/WfBLtXY.png.
once you have done that now you have to implement the intents into your bot! you can do this by simply going to your index.js file and where you defined client/bot add the partials like this:
new Discord.Client({ ws: { intents: ['GUILDS', 'GUILD_MESSAGES', 'GUILD_MEMBERS', 'GUILD_PRESENCES'] } });
now you just have to commit and you are done!
from discord-xp.
You either enable GUILD_MEMBERS
intent, or use latest version v1.1.7
and pass the fetchUsers
argument as third argument to computeLeaderboard
function (but its slower & does not require gateway intents). Please do note that this new version contains braking changes to the existing code, check latest changelog and examples for more information on how to update.
from discord-xp.
Related Issues (20)
- Manual override of db gets reset
- I need help
- Error with computeLeaderboard HOT 1
- Failed to append xp HOT 1
- Is there a way to fetch current xp? HOT 1
- Calculator doesn't work HOT 1
- When a user types a message, the bot creates duplicates of the user and guild in the db HOT 2
- 0's on leaderboard not showing HOT 2
- Cant delete user or guild HOT 7
- .setURL() not working
- TypeError: canno read properties of undefined(reading 'xpFor') HOT 2
- No-XP Channel HOT 1
- [Bug] Throw errors instead of logging to console in appendXp() / subtractXp() HOT 2
- Update mongoose to stable version HOT 3
- No matching version discord-xp@^1.1.17 HOT 1
- e.id is undefined. HOT 1
- Bad typings HOT 1
- Update NPM Package. HOT 1
- This is weird in the schema HOT 1
- canvacord example is outdated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discord-xp.