AtlantaBot | dashboard used by more than 130k users | Bot library
kandi X-RAY | AtlantaBot Summary
kandi X-RAY | AtlantaBot Summary
Another powerful Discord Bot with a web-dashboard used by more than 130k users!
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Plot class for plot elements
- This is a wrapper for the modal set of mask and the modal setters .
- Creates a new slider .
- Draws the series lines of a series .
- Draw the grid
- Turns regexp into a list of possible regex patterns
- Creates a new range .
- Modifies the mask and adds it to the mask set .
- Process raw data .
- Run an animation .
AtlantaBot Key Features
AtlantaBot Examples and Code Snippets
Community Discussions
Trending Discussions on AtlantaBot
QUESTION
Edit: The owner of the bot has changed to code so now it is server based levels/money instead of global based.
So recently I've been practicing coding on a bot I found online just to start learning Javascript and this discord bot uses a global point system instead of a server based system. It uses the code below to find the users ID but I want to make it so that it creates a user profile according to what server they are talking in, instead of a global one. So when a user join another server their data doesnt carry over to other servers. How could I change this code to create it so when the user ID is called and created it creates it according to servers instead of global.
Bot I'm using: https://github.com/Androz2091/AtlantaBot/tree/stable
...ANSWER
Answered 2019-Aug-31 at 10:41The answer to your question is more complicated and requires more of the code than what you provided. I could not immediately find the bot you are basing your code on based on the snippet you provided, so I'll have to be generic. Once you read this, update your question and we can work on it together!
The core problem behind what you are doing is that a User
object on discord's API is not tied to a server in particular. It is the user itself, not a server-user profile. As such, you'll most likely have to go through all the bits and pieces that call your function to change this relationship. In particular, when dealing with messages (which I suspect is where your question is stemming from), the creator of your bot's original code used the author
property when he should have used a combination of author
and member
.
the member
property on a Message
has multiple useful fields for you in this case:
user
, which loops back toUser
(your current object)guild
, which looks back to yourGuild
(your server, if you wish)
You can go two ways with this:
- If you are storing the
author.id
as a variable-length text field you can safely concatenateuser.id
andguild.id
, and use that as a key - If you want to do it cleanly, store both together and use that as a composite key
I hope I was clear enough on this one. Again, if you'd like to share more of the code I can help you further on this; sadly, as all I have is the getter function you provided, I can't really provide much more for now.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install AtlantaBot
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page