aboutsummaryrefslogtreecommitdiff
path: root/cogs
diff options
context:
space:
mode:
authorLuca Matei Pintilie <lucafulger@gmail.com>2020-08-06 08:21:31 +0000
committerGitHub <noreply@github.com>2020-08-06 08:21:31 +0000
commit396ed5def9f26f1b18d4b405de6b22666b104c98 (patch)
tree8b83c802e677123cbd98740f671c626475f6df54 /cogs
parentb7782439934db5d56a19b34ea5b77afb19a10f9d (diff)
parent84dce3a0c1c0687e5c8f6f5beccad3618d9dc86f (diff)
downloadsteve-bot-396ed5def9f26f1b18d4b405de6b22666b104c98.tar
steve-bot-396ed5def9f26f1b18d4b405de6b22666b104c98.tar.gz
steve-bot-396ed5def9f26f1b18d4b405de6b22666b104c98.tar.bz2
steve-bot-396ed5def9f26f1b18d4b405de6b22666b104c98.tar.lz
steve-bot-396ed5def9f26f1b18d4b405de6b22666b104c98.tar.xz
steve-bot-396ed5def9f26f1b18d4b405de6b22666b104c98.tar.zst
steve-bot-396ed5def9f26f1b18d4b405de6b22666b104c98.zip
Merge pull request #20 from null2264/steve
Fix trailing comma on !prefix and !listcommands
Diffstat (limited to 'cogs')
-rwxr-xr-xcogs/general.py4
-rwxr-xr-xcogs/utils.py7
2 files changed, 3 insertions, 8 deletions
diff --git a/cogs/general.py b/cogs/general.py
index cf05eb4..aa61d9c 100755
--- a/cogs/general.py
+++ b/cogs/general.py
@@ -400,9 +400,7 @@ class General(commands.Cog):
prefixes.pop(1)
prefixes.pop(1)
prefixes.pop(1)
- output = ""
- for i in prefixes:
- output += i+", "
+ output = ", ".join(prefixes)
await ctx.send(f"My prefixes are {output}")
diff --git a/cogs/utils.py b/cogs/utils.py
index 1309141..7cf401b 100755
--- a/cogs/utils.py
+++ b/cogs/utils.py
@@ -267,11 +267,8 @@ class Utils(commands.Cog):
"""List all custom commands"""
with open('custom_commands.json', 'r') as f:
commands = json.load(f)
- output = '```List of custom commands:\n'
- for key in commands:
- output += f'{key}, '
- output += '```'
- await ctx.send(output)
+ output = ", ".join([*commands])
+ await ctx.send(f"```List of custom commands:\n{output}```")
def setup(bot):
bot.add_cog(Utils(bot))