Skip to content

Commit 18fabdc

Browse files
committed
Change set_presence logging behavior
1 parent 0b4f400 commit 18fabdc

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

cogs/utility.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -589,26 +589,25 @@ async def set_presence(self, *,
589589

590590
await self.bot.change_presence(activity=activity, status=status)
591591

592-
presence = {'activity': None, 'status': None}
592+
presence = {'activity': (None, 'No activity has been set.'),
593+
'status': (None, 'No status has been set.')}
593594
if activity is not None:
594595
# TODO: Trim message
595596
to = 'to ' if activity.type == ActivityType.listening else ''
596597
msg = f'Activity set to: {activity.type.name.capitalize()} '
597598
msg += f'{to}{activity.name}.'
598-
if log:
599-
logger.info(info(msg))
600599
presence['activity'] = (activity, msg)
601600
if status is not None:
602601
msg = f'Status set to: {status.value}.'
603-
if log:
604-
logger.info(info(msg))
605602
presence['status'] = (status, msg)
606603
return presence
607604

608605
async def on_ready(self):
609606
# Wait until config cache is populated with stuff from db
610607
await self.bot.config.wait_until_ready()
611-
await self.set_presence()
608+
presence = await self.set_presence()
609+
logger.info(info(presence['activity'][1]))
610+
logger.info(info(presence['status'][1]))
612611

613612
@commands.command()
614613
@trigger_typing

0 commit comments

Comments
 (0)