mirror of
https://github.com/wlinator/luminara.git
synced 2024-10-02 18:03:12 +00:00
Allow multiple owner IDs
This commit is contained in:
parent
a5e2af5403
commit
3e985d2165
3 changed files with 6 additions and 7 deletions
|
@ -1,7 +1,9 @@
|
|||
TOKEN=
|
||||
OWNER_ID=
|
||||
INSTANCE=BETA
|
||||
|
||||
# comma separated list of owner IDs
|
||||
OWNER_IDS=
|
||||
|
||||
XP_GAIN_PER_MESSAGE=1
|
||||
XP_GAIN_COOLDOWN=8
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@ docker compose up -d --build
|
|||
## Environment variables
|
||||
|
||||
- `TOKEN`: your Discord Bot Token, you can get this [here](https://discord.com/developers/applications).
|
||||
- `OWNER_ID`: a comma-separated list of bot owner IDs.
|
||||
- `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.
|
||||
- `XP_GAIN_COOLDOWN`: XP earning cooldown time in seconds.
|
||||
|
|
7
Racu.py
7
Racu.py
|
@ -1,15 +1,12 @@
|
|||
import os
|
||||
|
||||
import discord
|
||||
from dotenv import load_dotenv
|
||||
|
||||
import services.Client
|
||||
import services.GuildConfig
|
||||
import services.Help
|
||||
import services.logging_service
|
||||
import config.parser
|
||||
|
||||
load_dotenv('.env')
|
||||
_logs = services.logging_service.setup_logger()
|
||||
|
||||
|
||||
|
@ -19,9 +16,9 @@ async def get_prefix(bot, message):
|
|||
except AttributeError:
|
||||
return "."
|
||||
|
||||
|
||||
owner_ids = set(os.environ.get('OWNER_IDS').split(','))
|
||||
client = services.Client.RacuBot(
|
||||
owner_id=int(os.getenv('OWNER_ID')),
|
||||
owner_ids=owner_ids,
|
||||
command_prefix=get_prefix,
|
||||
intents=discord.Intents.all(),
|
||||
status=discord.Status.online,
|
||||
|
|
Loading…
Reference in a new issue