-
- Notifications
You must be signed in to change notification settings - Fork 4.7k
Fix for Issue #191 #200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for Issue #191 #200
Changes from 29 commits
886e483 964ff0f c8b2132 9738833 a22aca7 defc31d 20243ee c7c22d9 965a4d6 0e279da 775006f 08a6119 ef8fccb 20040a0 4a7f95c 72ad551 8b536c3 1a264df aaa9ef0 1b9e2b0 6fb1032 f29590b 7426484 8024647 6e40b3a a390a7a 0e8eef1 3e3c047 9fb31e3 a88063b 5bc8d9d 78999cc bcb0b47 c05846b b44bc97 f3e9eac f50a013 7f71c77 File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -307,8 +307,8 @@ async def reply(self, message, anonymous=False): | |
| return await message.channel.send( | ||
| embed=discord.Embed( | ||
| color=discord.Color.red(), | ||
| description='Your message could not be delivered since' | ||
| 'the recipient shares no servers with the bot' | ||
| description='Your message could not be delivered since ' | ||
| 'the recipient shares no servers with the bot.' | ||
| )) | ||
| | ||
| tasks = [] | ||
| | @@ -645,15 +645,30 @@ def _format_info_embed(self, user, log_url, log_count, color): | |
| # key = log_url.split('/')[-1] | ||
| | ||
| role_names = '' | ||
| count = 0 | ||
| if member: | ||
| separate_server = self.bot.guild != self.bot.modmail_guild | ||
| roles = sorted(member.roles, key=lambda c: c.position) | ||
| if separate_server: | ||
| role_names = ', '.join(r.name for r in roles | ||
| if r.name != "@everyone") | ||
| for r in roles: | ||
| count = count + 1 | ||
| charCounter = ', '.join(r.name for r in roles | ||
| if r.name != "@everyone") | ||
| if len(charCounter) <= 1024: | ||
| role_names = ', '.join(r.name for r in roles | ||
| if r.name != "@everyone") | ||
| else: | ||
| role_names = "Due to Discord limitations the bot can't display roles that contain more than 1024 characters in total." | ||
| ||
| else: | ||
| role_names = ' '.join(r.mention for r in roles | ||
| if r.name != "@everyone") | ||
| for r in roles: | ||
| count = count + 1 | ||
| ||
| charCounter = ', '.join(r.mention for r in roles | ||
| if r.name != "@everyone") | ||
| if len(charCounter) <= 1024: | ||
| role_names = ' '.join(r.mention for r in roles | ||
| if r.name != "@everyone") | ||
| else: | ||
| role_names = "Due to Discord limitations the bot can't display roles that contain more than 1024 characters in total." | ||
| | ||
| embed = discord.Embed(color=color, | ||
| description=user.mention, | ||
| | @@ -680,7 +695,8 @@ def _format_info_embed(self, user, log_url, log_count, color): | |
| value=member.nick, | ||
| inline=True) | ||
| if role_names: | ||
| embed.add_field(name='Roles', | ||
| count = count - 1 | ||
| ||
| embed.add_field(name='Roles ['+str(count)+"]", | ||
| value=role_names, | ||
| inline=True) | ||
| else: | ||
| | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use snake_case