aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kosayoda <[email protected]>2020-07-24 17:42:42 +0800
committerGravatar kosayoda <[email protected]>2020-07-24 17:42:42 +0800
commit6bab215b45b5ad2d40b68459a70e7731af2eb7a2 (patch)
tree9a04a2dba182299e5dd8414a3f763f6e45f585e0
parentMerge pull request #1064 from python-discord/bug/1036/empty-embed-fields (diff)
Fix: Implicit string concatenation considered harmful
Python joins two string adjacent string literals implicitly, which may cause unintended side effects when used with certain string methods. >>> 'A' ' '.join(['1', '2', '3']) '1A 2A 3'
-rw-r--r--bot/cogs/information.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/bot/cogs/information.py b/bot/cogs/information.py
index d6090d481..8982196d1 100644
--- a/bot/cogs/information.py
+++ b/bot/cogs/information.py
@@ -116,10 +116,7 @@ class Information(Cog):
parsed_roles.append(role)
if failed_roles:
- await ctx.send(
- ":x: I could not convert the following role names to a role: \n- "
- "\n- ".join(failed_roles)
- )
+ await ctx.send(f":x: Could not retrieve the following roles: {', '.join(failed_roles)}")
for role in parsed_roles:
h, s, v = colorsys.rgb_to_hsv(*role.colour.to_rgb())