Skip to content

Commit

Permalink
Log instead of using print
Browse files Browse the repository at this point in the history
  • Loading branch information
raccube committed Aug 28, 2024
1 parent 5b85289 commit 8b52d32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ async def remove_subscribed_message(self, msg: SubscribedMessage) -> None:

if message: # message may have already been deleted manually
chan_name = message.channel.name if hasattr(message.channel, 'name') else 'unknown channel'
print(f'Removing message in {chan_name} from {message.author.name}')
self.logger.info(f'Removing message in {chan_name} from {message.author.name}')
await message.delete() # remove message from discord

# remove message from subscription list and save to file
Expand All @@ -272,7 +272,7 @@ async def remove_subscribed_message(self, msg: SubscribedMessage) -> None:

async def update_subscribed_messages(self) -> None:
"""Update all subscribed messages."""
print('Updating subscribed messages')
self.logger.info('Updating subscribed messages')
for sub_msg in self.subscribed_messages: # edit all subscribed messages
message = self.stats_message(
sub_msg.members,
Expand Down

0 comments on commit 8b52d32

Please sign in to comment.