Open EarthenSky opened 3 days ago
We need to stay beneath the rate limit of 50 requests per second (& 10k per 10 minutes), which should (hopefully) be pretty easy https://discord.com/developers/docs/topics/rate-limits#rate-limits
Specifically, this is just asking for the api to return data right? Any specific format you want that back in? Otherwise I'll default to JSON.
^^^ yo good question, @EarthenSky are you asking for this to be an API or functions to be used internally by the server?
Specifically, this is just asking for the api to return data right? Any specific format you want that back in? Otherwise I'll default to JSON.
^^^ yo good question, @EarthenSky are you asking for this to be an API or functions to be used internally by the server?
Internal use only. I'm seeing this as a module with no endpoints, then we'll eventually write a /admin_dashboard_info
endpoint (or something) that will use this module to get info or do stuff. We'll also want to use / extend this module for officer onboarding.
Seeing as this is a module, there should be functions which return python dicts & lists (essentially parsed json). Ex: def all_channels_in_category(category_name: str) -> list[str]
One possible issue I'm seeing is that I'm not 100% sure if we'll need the above functions (listed under requirements), as some other access pattern might work better. If you think that maybe there could be a better set of functions to access the data above (after you read into the discord API), please let us know & do so!
CSSS discord has several bots (called discord applications): Wall-e, eve, and csss-website. Wall-e is a whole project undergoing renovations, and with different goals than the website.
We'd like to query the csss discord server with things like "which people have which executive roles", or "who has access to which channels". We'll want to display this information to the dashboard so that executives can be notified if someone has permission that they shouldn't (ie. transitioned officer). Historically this was automated, however the execs / mods would prefer to have direct control. In addition, we'll want some api calls to modify permissions as well (a dashboard interface), but we should leave that for a future issue.
It looks like we can use discord's http api to get the info we're looking for.
Requirements:
figure out a way to mock this module so we can locally test it without making API calls (unless desired)If you're not sure what we're looking for specifically, please ask so we're all on the same page. If you have any questions please lmk!