Formatting

This commit is contained in:
Emily Doherty 2024-12-14 20:57:53 -08:00
parent 7c6b66660e
commit 621bd16d71
2 changed files with 10 additions and 5 deletions

View File

@ -1,5 +1,5 @@
import token_bot.token_bot as token_bot import token_bot.token_bot as token_bot
if __name__ == '__main__': if __name__ == "__main__":
bot = token_bot.TokenBot() bot = token_bot.TokenBot()
bot.run() bot.run()

View File

@ -78,7 +78,9 @@ class Tracker(Extension):
else: else:
users_alerts[user].append(alert) users_alerts[user].append(alert)
if users_alerts: if users_alerts:
self.bot.logger.log(logging.INFO, "TokenBot Tracker: Processing User Alerts") self.bot.logger.log(
logging.INFO, "TokenBot Tracker: Processing User Alerts"
)
for user in users_alerts: for user in users_alerts:
discord_user = await self.bot.fetch_user(user.user_id) discord_user = await self.bot.fetch_user(user.user_id)
embeds = [ embeds = [
@ -94,12 +96,15 @@ class Tracker(Extension):
alerts_by_flavor = await gather_alerts_by_flavor(users_alerts[user]) alerts_by_flavor = await gather_alerts_by_flavor(users_alerts[user])
for flavor in alerts_by_flavor: for flavor in alerts_by_flavor:
embeds.append( embeds.append(
await self._render_alert_flavor(alerts_by_flavor[flavor], user=user) await self._render_alert_flavor(
alerts_by_flavor[flavor], user=user
)
) )
await discord_user.send(embeds=embeds) await discord_user.send(embeds=embeds)
self.bot.logger.log(logging.INFO, "TokenBot Tracker: Done Processing User Alerts") self.bot.logger.log(
logging.INFO, "TokenBot Tracker: Done Processing User Alerts"
)
################################### ###################################
# Slash Commands # # Slash Commands #