Dante
Explore posts from serversDIAdiscord.js - Imagine an app
•Created by Dante on 8/15/2024 in #djs-questions
can't read the mentions of a webhook
I have a minor issue. So to give vote rewards, I have a webhook from top.gg that logs everytime a user votes. I usually get the userID of the user through the webhook but I just noticed if someone who is not a member of my support server votes the bot, somehow the mention of the user in the webhook disappears although in the message it is there.
I'm getting the user with this :-
User = message.mentions.users.first()
21 replies
DIAdiscord.js - Imagine an app
•Created by Dante on 6/26/2024 in #djs-questions
Optimizing Ram Usage
okay so i just launched a bot which is currently in about 50 servers but it is already taking up a LOT of ram, about 600MB. Is there anything i can do to optimize this? My bot is a gamebot with features like turn based battle, inventory, economy etc. It also has a questing system that basically uses an if-else ladder to send a response based on what part of quest the user is at. It uses a lot of componentslike buttons and select menus for many of it's commands but i always ensure to stop the collectors after use and im certain there is no memory leak. I also have a function running in background in my main script to give energy to all users every 20 minutes.
19 replies
DIAdiscord.js - Imagine an app
•Created by Dante on 6/25/2024 in #djs-questions
DiscordAPIerror: Missing Access
So this is the first time I got this error and researching a while I found out this is due to missing permissions. My bot has the viewmessages and sendmessages permissions but still this error has occurred. Can I know how to fix this? I think this is a server specific issue where the permissions were overwritten to revoke viewchannel? If it's something server related and not under the control of the bot how can I tackle this?
15 replies