remove detailed error messages

release-1.0.0
DustyP 8 years ago
parent 52174175ef
commit 9c340116eb

@ -150,13 +150,13 @@ class BotEvents:
# noinspection PyMethodMayBeStatic # noinspection PyMethodMayBeStatic
async def on_command_error(self, ctx, error): async def on_command_error(self, ctx, error):
pag = utils.Paginator(ctx.bot) pag = utils.Paginator(ctx.bot, embed=True, max_line_length=48)
import traceback pag.set_embed_meta(title=f'Command Error',
if ctx.channel.id == 418452585683484680 and type(error) == commands.errors.CommandNotFound: color=self.bot.error_color,
return thumbnail=f'{ctx.guild.me.avatar_url}')
pag.add(''.join(traceback.format_exception(type(error), error, error.__traceback__))) pag.add(error)
for page in pag.pages(): book = utils.Book(pag, (None, ctx.channel, self.bot, ctx.message))
await ctx.send(page) await book.create_book()
async def on_guild_join(self, guild): async def on_guild_join(self, guild):
with open(f"{config_dir}{default_guild_config_file}", 'r') as file: with open(f"{config_dir}{default_guild_config_file}", 'r') as file:

Loading…
Cancel
Save