mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 11:48:55 -05:00
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:
parent
162916db18
commit
d39c1baf92
@ -522,9 +522,13 @@ class Audio:
|
|||||||
async def audioset(self, ctx):
|
async def audioset(self, ctx):
|
||||||
"""Changes audio module settings"""
|
"""Changes audio module settings"""
|
||||||
if ctx.invoked_subcommand is None:
|
if ctx.invoked_subcommand is None:
|
||||||
|
server = ctx.message.server
|
||||||
await send_cmd_help(ctx)
|
await send_cmd_help(ctx)
|
||||||
msg = "```"
|
msg = "```"
|
||||||
for k, v in self.settings.items():
|
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 += str(k) + ": " + str(v) + "\n"
|
||||||
msg += "```"
|
msg += "```"
|
||||||
await self.bot.say(msg)
|
await self.bot.say(msg)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user