Browse Source

.

tags/v1.1.1
roxie 6 years ago
parent
commit
74dab20509
2 changed files with 5 additions and 1 deletions
  1. +4
    -0
      cogs/customcommands.py
  2. +1
    -1
      config/meta.py

+ 4
- 0
cogs/customcommands.py View File

@custom.command(pass_context=True) @custom.command(pass_context=True)
async def add(self, ctx, command, output, prefix_required = "0"): async def add(self, ctx, command, output, prefix_required = "0"):
"Adds a custom command to the list of custom commands." "Adds a custom command to the list of custom commands."
self.servers = self.con.load_config()
command = command.lower() command = command.lower()
output = output.lower() output = output.lower()
zero = self.servers[ctx.message.server.id]["custom_commands"]["0"] zero = self.servers[ctx.message.server.id]["custom_commands"]["0"]
@custom.command(pass_context=True) @custom.command(pass_context=True)
async def edit(self, ctx, command, edit): async def edit(self, ctx, command, edit):
"Edits an existing custom command." "Edits an existing custom command."
self.servers = self.con.load_config()
zero = self.servers[ctx.message.server.id]["custom_commands"]["0"] zero = self.servers[ctx.message.server.id]["custom_commands"]["0"]
one = self.servers[ctx.message.server.id]["custom_commands"]["1"] one = self.servers[ctx.message.server.id]["custom_commands"]["1"]


@custom.command(pass_context=True) @custom.command(pass_context=True)
async def remove(self, ctx, command): async def remove(self, ctx, command):
"Removes a custom command." "Removes a custom command."
self.servers = self.con.load_config()
command = command.lower() command = command.lower()
if command in self.servers[ctx.message.server.id]["custom_commands"]["1"]: if command in self.servers[ctx.message.server.id]["custom_commands"]["1"]:
self.servers[ctx.message.server.id]["custom_commands"]["1"].pop(command) self.servers[ctx.message.server.id]["custom_commands"]["1"].pop(command)
@custom.command(pass_context=True) @custom.command(pass_context=True)
async def list(self, ctx): async def list(self, ctx):
"Lists all custom commands for this server." "Lists all custom commands for this server."
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 = ""

+ 1
- 1
config/meta.py View File

[Github link](https://github.com/RainbowDinoaur/roxbot) [Github link](https://github.com/RainbowDinoaur/roxbot)
[Changelog](https://github.com/RainbowDinoaur/roxbot#v100)""" [Changelog](https://github.com/RainbowDinoaur/roxbot#v100)"""
__author__ = "Roxanne Gibson" __author__ = "Roxanne Gibson"
__version__= "1.1.0"
__version__= "1.1.1"
embedcolour = 0xDEADBF embedcolour = 0xDEADBF

Loading…
Cancel
Save