display only server-specific settings if available

assumes server-specific settings are stored uhhhhh shoot, lemme just give an example.

{
    "MAX_CACHE": 50,
    "SERVER_SFX_ON": {
        "server1_id_here":True,
        "server2_id_here":False
    }
}
This commit is contained in:
Irdumb 2016-04-10 20:12:45 +10:00
parent 162916db18
commit d39c1baf92

View File

@ -522,9 +522,13 @@ class Audio:
async def audioset(self, ctx):
"""Changes audio module settings"""
if ctx.invoked_subcommand is None:
server = ctx.message.server
await send_cmd_help(ctx)
msg = "```"
for k, v in self.settings.items():
if type(v) is dict and server.id in v:
msg += str(k) + ": " + str(v[server.id]) + "\n"
else:
msg += str(k) + ": " + str(v) + "\n"
msg += "```"
await self.bot.say(msg)