Compare commits
No commits in common. "84561948da11abab9b6de0670d95e7cbee2b7513" and "7c6b66660e54d4acfe9fe3c93094ebf5eb8a1086" have entirely different histories.
84561948da
...
7c6b66660e
2
main.py
2
main.py
@ -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()
|
||||||
|
@ -29,8 +29,4 @@ class Core(Extension):
|
|||||||
|
|
||||||
@slash_command()
|
@slash_command()
|
||||||
async def help(self, ctx):
|
async def help(self, ctx):
|
||||||
await ctx.send(
|
await ctx.send(f"This is bot help command", ephemeral=True)
|
||||||
f"For help on using GoblinBot, please visit the help page found "
|
|
||||||
f"[here](https://blog.emily.sh/token-bot/#getting-started)",
|
|
||||||
ephemeral=True,
|
|
||||||
)
|
|
||||||
|
@ -78,9 +78,7 @@ 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(
|
self.bot.logger.log(logging.INFO, "TokenBot Tracker: Processing User Alerts")
|
||||||
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 = [
|
||||||
@ -96,15 +94,12 @@ 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(
|
await self._render_alert_flavor(alerts_by_flavor[flavor], user=user)
|
||||||
alerts_by_flavor[flavor], user=user
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
await discord_user.send(embeds=embeds)
|
await discord_user.send(embeds=embeds)
|
||||||
self.bot.logger.log(
|
self.bot.logger.log(logging.INFO, "TokenBot Tracker: Done Processing User Alerts")
|
||||||
logging.INFO, "TokenBot Tracker: Done Processing User Alerts"
|
|
||||||
)
|
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
# Slash Commands #
|
# Slash Commands #
|
||||||
|
Loading…
Reference in New Issue
Block a user