|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@custom.command(pass_context=True) |
|
|
@custom.command(pass_context=True) |
|
|
async def list(self, ctx): |
|
|
|
|
|
|
|
|
async def list(self, ctx, debug="0"): |
|
|
"Lists all custom commands for this server." |
|
|
"Lists all custom commands for this server." |
|
|
|
|
|
if debug != "0" and debug != "1": |
|
|
|
|
|
debug = "0" |
|
|
self.servers = self.con.load_config() |
|
|
self.servers = self.con.load_config() |
|
|
l = self.servers[ctx.message.server.id]["custom_commands"] |
|
|
l = self.servers[ctx.message.server.id]["custom_commands"] |
|
|
listzero = "" |
|
|
listzero = "" |
|
|
listone = "" |
|
|
listone = "" |
|
|
|
|
|
|
|
|
for command in l["0"]: |
|
|
for command in l["0"]: |
|
|
|
|
|
if debug == "1": |
|
|
|
|
|
command += command + " - {}".format(l["0"][command]) |
|
|
listzero = listzero + "- " + command + "\n" |
|
|
listzero = listzero + "- " + command + "\n" |
|
|
for command in l["1"]: |
|
|
for command in l["1"]: |
|
|
|
|
|
if debug == "1": |
|
|
|
|
|
command += command + " - {}".format(l["1"][command]) |
|
|
listone = listone + "- " + command + "\n" |
|
|
listone = listone + "- " + command + "\n" |
|
|
if not listone: |
|
|
if not listone: |
|
|
listone = "There are no commands setup.\n" |
|
|
listone = "There are no commands setup.\n" |