Closed benjaminl4917 closed 1 year ago
In replying to original PR summary... I think there is almost definitely a way to know the server name just because the bot is also in the server. If so, we don't need to look for the person's server but rather the bot itself where it was added. Might need to look into this a little.
In replying to original PR summary... I think there is almost definitely a way to know the server name just because the bot is also in the server. If so, we don't need to look for the person's server but rather the bot itself where it was added. Might need to look into this a little.
There is a way to get all the server names that the bot is in. But I don't know how to identify which one I need ifykwim.
This PR might be fine for an initial merge since the functionality of tracking time exists but we definitely need to spawn some tickets out of this. In no particular order, please make these tickets and assign them either to yourselves to discuss who should take over.
@benjaminl4917 since this is your ticket, please make these things into tickets and write a description explaining the need and what we want to be done. Also discuss with the team who wants to work on what and what the plan is for this feature moving forward. since you worked on this feature, you'll own this particular topic.
Can I get some suggestions with what the best way is to initialize/grab the correct MongoDB collection(which contains the dictionary with already saved user-tracked data" corresponding to its server name. Currently, I have made it so that if the bot is added to a new server, a new collection is created under the database Rasenbot with the name(ex: "Rasenbot Testing Server"). And if the collection is already under the database then I grab the data/document from there. Right now I have it so that I'm able to get the correct server's name once someone starts an activity and from there grab the server's name through the discord.Member. I don't know if thats acceptable for now but I think there must be a better way. The commented-out on_ready function was an attempt to grab the server name on_ready but I believe it doesn't work as intended. Idk maybe I'm trolling and I don't know how to get the server name another way. Also, I believe that we shouldn't be connecting to the MongoDB collection directly from the displayinfo.py but that is up to discussion.