-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
user discord online status is not checking everyone #405
Comments
So I read this: https://discord.com/developers/docs/resources/guild#guild-object-guild-structure. |
the question mark after the field means it's optional. those are fields in the responses to |
Thanks for clarification. I still couldn't manage to get the wanted information from discord api. |
OK I looked into this today:
so I propose:
EDIT: |
Thanks for the investigation! I have one security wonder: The API endpoint would change our database and I am reluctant to open that to everyone. Maybe we could do a trick: The bot read a text file Is my security concern not relevant? Is the suggested security check ok? |
the bot and the db are on the same server. no need to post I think this is pretty overkill and I would personally settle for the discord widget, though |
You mean we could connect the bot to OSR db directly? Isn't it tricky without django ORM?
Well discord widget would look like : https://discord.com/widget?id=287487891003932672&theme=light It just show a global activity count and we have this working allready: The idea here is to show users online status on users links. Is it really needed? it's not clear indeed. |
just install psycopg2 in the bot's venv |
When we scrape, we update discord users online status:
openstudyroom/league/views.py
Lines 88 to 96 in d1979e1
Then we display it like that:
I just realised that this url only show first 100 users: https://discordapp.com/api/guilds/287487891003932672/widget.json
We should find another way to check who is online.
The text was updated successfully, but these errors were encountered: