@@ -95,15 +95,22 @@ class CustomCommands(): | |||
@custom.command(pass_context=True) | |||
async def list(self, ctx): | |||
async def list(self, ctx, debug="0"): | |||
"Lists all custom commands for this server." | |||
if debug != "0" and debug != "1": | |||
debug = "0" | |||
self.servers = self.con.load_config() | |||
l = self.servers[ctx.message.server.id]["custom_commands"] | |||
listzero = "" | |||
listone = "" | |||
for command in l["0"]: | |||
if debug == "1": | |||
command += command + " - {}".format(l["0"][command]) | |||
listzero = listzero + "- " + command + "\n" | |||
for command in l["1"]: | |||
if debug == "1": | |||
command += command + " - {}".format(l["1"][command]) | |||
listone = listone + "- " + command + "\n" | |||
if not listone: | |||
listone = "There are no commands setup.\n" |
@@ -99,10 +99,13 @@ class Settings(): | |||
em.set_author(name="{} settings for {}.".format(self.bot.user.name, ctx.message.server.name), icon_url=self.bot.user.avatar_url) | |||
for settings in config: | |||
settingcontent = "" | |||
for x in config[settings].items(): | |||
settingcontent += str(x).strip("()") + "\n" | |||
em.add_field(name=settings, value=settingcontent, inline=False) | |||
if settings != "custom_commands": | |||
settingcontent = "" | |||
for x in config[settings].items(): | |||
settingcontent += str(x).strip("()") + "\n" | |||
em.add_field(name=settings, value=settingcontent, inline=False) | |||
else: | |||
em.add_field(name="custom_commands", value="For Custom Commands, use the custom list command.", inline=False) | |||
return await self.bot.say(embed=em) | |||