ZeldaFan0225 / AI_Horde_Discord

A discord bot to interact with https://aihorde.net
GNU Affero General Public License v3.0
50 stars 14 forks source link

Role for all logged-in users #36

Closed db0 closed 1 year ago

db0 commented 1 year ago

Now that we can connect horde IDs to discord accounts, I wanted to ping all logged-in users to run /updatetoken so that this is recorded. Unfortunately I don't have an easy way to ping just them. So I had two ideas

  1. Allow me to specify a role ID that all logged-in users will be automatically assigned to
  2. Allow me to use a special command as a bot admin, which will refresh this role with all logged in users.

This role will also be usedful for sending pings whenever the bot has a downtime.

ZeldaFan0225 commented 1 year ago

with mass updating there would, like in #37 be a huge load on the api and the database

db0 commented 1 year ago

ok, then simply a role that can be assigned to logged in users whenever they /login, /updatetoken or when someone queries them with /userinfo, like we do for adding the Workers role.

ZeldaFan0225 commented 1 year ago

when a user updates or saves their token in the bot they will now receive the role specified in the config file (https://github.com/ZeldaFan0225/AI_Horde_Discord/commit/897793a103e0a6057bf3a390975c65d89c0d5969)