StampyAI / stampy

A Discord bot for the Robert Miles AI server
37 stars 9 forks source link

Moving discordConstants functionality to dotenv #254

Closed ProducerMatt closed 1 year ago

ProducerMatt commented 1 year ago

DEPENDS ON #247 and #263

The goal of this PR is to externalize the discordConstants functionality to the dotenv, so that the admin can customize it to their server.

TODO

make all calls to discord for Rob server roles dependent on dotenv instead. i.e. discord.utils.get(guild.roles, name="bot dev")

Checked

irrelevant (or low-priority at least) outside of Rob's server: invitemanager, reply, stampcollection

Var Changes

summary of changes in config.py, see lines 82 onward

"Pluralizing" refers to going from singular variables, if x == old_var to iterables checked like if x in new_var)

new:

changed:

basically moved from Constants to config:

jknowak commented 1 year ago

This would have to take into account the test I introduced here https://github.com/StampyAI/stampy/pull/253 @ProducerMatt

ProducerMatt commented 1 year ago

@jknowak thank you for bringing this to my attention.

Since my fork means people will enable different functionality and thus not need the same channels, I'll need to generalize this to some kind of module-updateable "needed discord channels" check that can alert the user if one is missing.