Skip to content

Commit

Permalink
Update erm.py
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahCxrest authored Nov 13, 2024
1 parent 36de877 commit 2fa11cb
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions erm.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ async def setup_hook(self) -> None:
statistics_check.start()
tempban_checks.start()
check_whitelisted_car.start()
change_status.start()
logging.info("Setup_hook complete! All tasks are now running!")

async for document in self.views.db.find({}):
Expand All @@ -220,20 +221,15 @@ async def setup_hook(self) -> None:
setup = True


status_message = "⚡ /about | ermbot.xyz"

bot = commands.Bot(
bot = Bot(
command_prefix=get_prefix,
case_insensitive=True,
intents=intents,
help_command=None,
allowed_mentions=discord.AllowedMentions(
replied_user=False, everyone=False, roles=False
),
activity=discord.CustomActivity(name=status_message),
status=discord.Status.online
)

bot.debug_servers = [987798554972143728]
bot.is_synced = False
bot.shift_management_disabled = False
Expand Down Expand Up @@ -461,6 +457,17 @@ async def staff_field(bot: Bot, embed, query):
mongo_url = ""


# status change discord.ext.tasks


@tasks.loop(hours=1)
async def change_status():
await bot.wait_until_ready()
logging.info("Changing status")
status = "⚡ /about | ermbot.xyz"
await bot.change_presence(
activity=discord.CustomActivity(name=status)
)

@tasks.loop(minutes=1)
async def check_reminders():
Expand Down

0 comments on commit 2fa11cb

Please sign in to comment.