Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. import traceback
  2.  
  3. ...
  4.  
  5. @commands.Cog.listener()
  6. async def on_flamecogs_game_error(self, game, error):
  7.     chan = self.bot.get_guild(389832888889245697).get_channel(495722437997232148)
  8.     stack = ''.join(traceback.TracebackException.from_exception(error).format())
  9.     msg = (
  10.         f'<@!145519400223506432>\n'
  11.         f'```ini\n[Error in a FlameCogs game!]\n'
  12.         f'Game    = {game.__class__.__name__}\n'
  13.         f'Guild   = {game.ctx.guild.name}\n'
  14.         f'Channel = {game.ctx.channel.name}\n```'
  15.         f'```py\n{stack}\n'
  16.     )
  17.     await chan.send(msg[:1997] + '```')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement