Skip to content

Commit

Permalink
Read bot admin IDs set in .env file
Browse files Browse the repository at this point in the history
  • Loading branch information
someyuck authored and ankith26 committed Jun 5, 2024
1 parent c8a4972 commit dc919a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ MONGO_URI="mongodb://127.0.0.1:100"

# needed by ./bot
DISCORD_TOKEN=""
BOT_ADMINS=""

# needed by ./portal
CAS_LINK="https://cas.my-org.com/login"
Expand Down
2 changes: 2 additions & 0 deletions bot/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
SUBPATH = os.getenv("SUBPATH")
BASE_URL = f"{PROTOCOL}://{HOST}{_PORT_AS_SUFFIX}{SUBPATH}"

BOT_ADMINS = {int(id) for id in os.getenv("BOT_ADMINS", "").split(",") if id}

intent = discord.Intents.default()
intent.message_content = True
bot = commands.Bot(command_prefix=".", intents=intent)
Expand Down

0 comments on commit dc919a7

Please sign in to comment.