Skip to content

Commit

Permalink
Update erm.py
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahCxrest authored Dec 14, 2024
1 parent 0805e80 commit 30d2614
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions erm.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
import utils.prc_api


setup = False

try:
sentry_url = config("SENTRY_URL")
bloxlink_api_key = config("BLOXLINK_API_KEY")
Expand All @@ -81,10 +83,6 @@


class Bot(commands.AutoShardedBot):
setup: bool = False

async def is_setup(self):
return bot.setup

async def close(self):
for session in self.external_http_sessions:
Expand All @@ -107,7 +105,8 @@ async def setup_hook(self) -> None:
self.external_http_sessions: list[aiohttp.ClientSession] = []
self.view_state_manager: ViewStateManager = ViewStateManager()

if not bot.is_setup():
global setup
if not setup:
# await bot.load_extension('utils.routes')
logging.info(
"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━���━━━━━━\n\n{} is online!".format(
Expand Down Expand Up @@ -220,7 +219,7 @@ async def setup_hook(self) -> None:
self.add_view(
LOAMenu(*document["args"]), message_id=document["message_id"]
)
bot.setup = True
setup = True


bot = Bot(
Expand Down Expand Up @@ -416,6 +415,8 @@ async def warning_json_to_mongo(jsonName: str, guildId: int):

bot.erm_team = {
"i_imikey": "Bot Developer",
"mbrinkley": "First Community Manager - Removed",
"theoneandonly_5567": "Executive Manager",
"royalcrests": "Website Developer & Asset Designer",
"1friendlydoge": "Data Scientist - a friendly doge",
}
Expand Down

0 comments on commit 30d2614

Please sign in to comment.