Skip to content

Commit 604f9fb

Browse files
committed
change error attribute to message in discord cog example
1 parent 7bee22d commit 604f9fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/discord_cog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async def profile(self, ctx, tag: str):
1515
try:
1616
player = await self.client.get_profile(tag)
1717
except brawlstats.RequestError as e: # catches all exceptions
18-
return await ctx.send('```\n{}: {}\n```'.format(e.code, e.error)) # sends code and error message
18+
return await ctx.send('```\n{}: {}\n```'.format(e.code, e.message)) # sends code and error message
1919
em = discord.Embed(title='{0.name} ({0.tag})'.format(player))
2020
em.description = 'Trophies: {}'.format(player.trophies) # you could make this better by using embed fields
2121
await ctx.send(embed=em)

0 commit comments

Comments
 (0)