mirror of
https://github.com/wlinator/luminara.git
synced 2024-10-02 18:03:12 +00:00
Change the way INSTANCE is handled
This commit is contained in:
parent
4667a6df3c
commit
92fda02391
2 changed files with 3 additions and 8 deletions
|
@ -31,7 +31,7 @@ docker compose up -d --build
|
|||
## ⚙️ Environment variables
|
||||
|
||||
- `TOKEN`: your Discord Bot Token, you can get this [here](https://discord.com/developers/applications).
|
||||
- `INSTANCE`: this should always be "MAIN" unless you plan to run multiple bots (for testing purposes).
|
||||
- `INSTANCE`: this can be anything, only set it as "MAIN" if you've configured Dropbox backups.
|
||||
- `OWNER_ID`: the Discord user ID of the person who will act as owner of this bot.
|
||||
|
||||
- `XP_GAIN_PER_MESSAGE`: how much XP should be awarded to a user per message.
|
||||
|
|
9
main.py
9
main.py
|
@ -39,8 +39,7 @@ logs = LoggingHandler.setup_logger()
|
|||
async def on_message(message):
|
||||
if (
|
||||
message.author.bot or
|
||||
message.guild is None or
|
||||
instance.lower() != "main"
|
||||
message.guild is None
|
||||
):
|
||||
return
|
||||
|
||||
|
@ -67,11 +66,7 @@ async def on_message(message):
|
|||
async def on_member_join(member):
|
||||
config = GuildConfig(member.guild.id)
|
||||
|
||||
if (not config.welcome_channel_id
|
||||
|
||||
# comment next line if debugging greetings
|
||||
or instance.lower() != "main"
|
||||
):
|
||||
if not config.welcome_channel_id:
|
||||
return
|
||||
|
||||
embed = Greet.message(member, config.welcome_message)
|
||||
|
|
Loading…
Reference in a new issue