Closed ProducerMatt closed 1 year ago
This would have to take into account the test I introduced here https://github.com/StampyAI/stampy/pull/253 @ProducerMatt
@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.
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 likeif x in new_var
)new:
ROBMILES_DEFAULTS
: when defined, sets relevant values to defaults for Rob's server and ignores other external settings, i.e.bot_dev_ids
. Convenience setting for Rob.DATABASE_PATH
for DB of Rob's YouTube comment questionsFACTOID_DATABASE_PATH
formodules/Factoids.py
BOT_DEV_IDS
: ids of dev users, union withBOT_VIP_IDS
BOT_REBOOT
: provides a choice for how the bot reboots itself.PAID_SERVICE_FOR_ALL
: when defined, the ChatGPT module limits responses to an approved set of usersPAID_SERVICE_ROLE_IDS
: if the above is defined, these are the approved userschanged:
bot_admin_role_id,bot_dev_role_id
(latter unused) ->BOT_DEV_ROLES
(pluralized)rob_id
->BOT_VIP_IDS
(pluralized). I've also assumed that "VIP" user ids should be included inBOT_DEV_IDS
stampy_control_channel_ids
->BOT_CONTROL_CHANNEL_IDS
stampy_private_channel_id
->BOT_PRIVATE_CHANNEL_ID
stampy_id
-> instead please call functionUtilities.get_instance().stampy_is_author(message)
, this gets stampy's id from the current internal state rather than a config fileopenai_channel_ids
->PAID_SERVICE_CHANNEL_IDS
basically moved from Constants to config:
can_invite_role_id
member_role_id