Skip to content

Commit

Permalink
the method of dividing the list of administrators has been replaced b…
Browse files Browse the repository at this point in the history
…y re
  • Loading branch information
D1ffic00lt committed Oct 6, 2024
1 parent ae0114f commit 9177de7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion discord-client/bot.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import os
import re
import logging
import random
import httpx
Expand All @@ -12,7 +13,9 @@


class BunkerBOT(commands.Bot):
ADMINISTRATORS = list(map(int, os.environ.get("ADMINISTRATORS").split(", ")))
ADMINISTRATORS = list(
map(lambda x: int(x) if x else None, re.split(",\s*", os.environ.get("ADMINISTRATORS", ",")))
)

def __init__(self, command_prefix: str, *, intents: discord.Intents, **kwargs) -> None:
super().__init__(command_prefix, intents=intents, **kwargs)
Expand Down

0 comments on commit 9177de7

Please sign in to comment.