Exemplo n.º 1
0
 def __init__(self, command_key, client):
     self.client = client
     super().__init__(command_key, "shell", """Shell""",
                      f"{command_key} shell *shell command*",
                      ['bash', 'sh'])
     self.args = Args(shell=Args.ANY_ARG)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 2
0
 def __init__(self, command_key, client: discord.Client, database: DB_API):
     self.database = database
     self.client = client
     super().__init__(command_key, "createtable", """Create table""",
                      f"{command_key} createtable *tablename*", [])
     self.args = Args(table_name=Args.STRING_ARG)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 3
0
 def __init__(self, command_key, client):
     self.client = client
     super().__init__(command_key, "probability",
                      """Calculates probability""",
                      f"{command_key} probability", ["chances"])
     self.args = Args()
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 4
0
 def __init__(self, command_key, database, steam_api):
     self.database = database
     self.steam_api = steam_api
     super().__init__(command_key, "dotaprofile", """Testing""",
                      f"{command_key} dotaprofile", [])
     self.args = Args(steamarg=SteamCommands.STEAM_URL_REGEX)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 5
0
 def __init__(self, command_key: str, client: discord.Client,
              database: DB_API):
     self.client = client
     self.database = database
     super().__init__(command_key, "doll", """Info of dolls""",
                      f"{command_key} doll", ["d", "tdoll"])
     self.args = Args(doll=Args.ANY_ARG)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 6
0
 def __init__(self, command_key, client, database):
     self.client = client
     self.database = database
     super().__init__(command_key, "production", """Production Dolls""",
                      f"{command_key} production",
                      ["production", "prod", "pr"])
     self.args = Args()
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 7
0
 def __init__(
     self,
     command_key,
 ):
     super().__init__(command_key, "sfsim", """SF Capture sim""",
                      f"{command_key} sfsim", ["sfcap"])
     self.args = Args(banner=Args.STRING_ARG, amount=Args.OPTIONAL_INT_ARG)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 8
0
 def __init__(self, command_key: str, client: discord.Client,
              database: DB_API):
     self.client = client
     self.database = database
     super().__init__(
         command_key, "resourcesearch",
         """Search AK resources, their sanitycosts /per stage""",
         f"{command_key} resourcesearch", ["rs", "resource", "item"])
     self.args = Args(resource=Args.ANY_ARG)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 9
0
 def __init__(self, command_key, client):
     self.client = client
     super().__init__(command_key, "play", """Play music, by giving URLs""",
                      f"{command_key} play *<url>*", ["test"])
     self.args = Args(url=Play.YOUTUBE_REGEX)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 10
0
 def __init__(self, command_key: str, client: discord.Client) -> None:
     self.client = client
     super().__init__(command_key, "eval", """Eval""",
                      f"{command_key} eval *evaled statement*", ['ev'])
     self.args = Args(shell=Args.ANY_ARG)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 11
0
 def __init__(self, command_key, client):
     self.client = client
     super().__init__(command_key, "crisscross", """Start a game of crisscross""", f"{command_key} crisscross *<challenged user>*", [])
     self.args = Args(mention=Args.MENTION_ARG, size=Args.OPTIONAL_INT_ARG)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 12
0
 def __init__(self, command_key: str, database: DB_API):
     self.database = database
     super().__init__(command_key, "dbquery", """Query to DB""",
                      f"{command_key} dbquery *query*", ["query"])
     self.args = Args(query=Args.ANY_ARG)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 13
0
 def __init__(self, command_key, database, newswire):
     self.database = database
     self.newswire = newswire
     super().__init__(command_key, "gtanw", """GTA V newswire""", f"{command_key} gtanw", [])
     self.args = Args(message=Args.OPTIONAL_STRING_ARG)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 14
0
 def __init__(self, command_key):
     super().__init__(command_key, "list", """Lists roles""", f"{command_key} list", [])
     self.args = Args()
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 15
0
 def __init__(self, command_key, database, client):
     self.client = client
     self.database = database
     super().__init__(command_key, "worldstate", """Creates an message where X thing is updated from Warframe Worldstate""", f"{command_key} worldstate *<nightwave|sorties|poe|invasions|fissures>*", ["worldstate"])
     self.args = Args(message=WorldState.UPDATED_MESSAGE_REGEX)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 16
0
 def __init__(self, command_key):
     super().__init__(command_key, "leave", """Leaves X role""", f"{command_key} leave *<role name>*", [])
     self.args = Args(role=Args.ANY_ARG)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 17
0
 def __init__(self, command_key, database):
     self.database = database
     super().__init__(command_key, "remove", """Removes X role""", f"{command_key} remove *<role mention>*", [])
     self.args = Args(role=Args.ANY_ARG)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 18
0
 def __init__(self, command_key, database, client):
     self.client = client
     self.database = database
     super().__init__(command_key, "rolemessage", """Assign role reaction to message or send new message to be reacted.""", f"{command_key} rolemessage *<channel mention>* *<role mention>*", [])
     self.args = Args(channel=Args.CHANNEL_MENTION_ARG, role=Args.MENTION_ARG)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 19
0
 def __init__(self, command_key):
     super().__init__(command_key, "join", """Joins X role""", f"{command_key} join *<role name>*", [])
     self.args = Args(role=Args.ANY_ARG)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 20
0
 def __init__(self, command_key):
     super().__init__(command_key, "purge",
                      """Purge channel of X amount of messages""",
                      f"{command_key} purge *<1-99>*", ["empty"])
     self.args = Args(limit=Args.INT_ARG)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 21
0
 def __init__(self, command_key, client):
     self.client = client
     super().__init__(command_key, "sound", """Plays a certain sound""",
                      f"{command_key} sound <*list*|*sound name*>", [])
     self.args = Args(sound=Args.ANY_ARG)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 22
0
 def __init__(self, command_key):
     super().__init__(command_key, "gelbooru", """Gelbooru Search""",
                      f"{command_key} gelbooru *<tags>*", ["gel"])
     self.args = Args(tags=Args.ANY_ARG)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 23
0
 def __init__(self, command_key):
     super().__init__(command_key, "rule34", """Rule34 Search""",
                      f"{command_key} rule34 *<tags>*", ["r34"])
     self.args = Args(tags=Args.ANY_ARG)
     self.args.set_pattern(command_key, self.aliases)
Exemplo n.º 24
0
 def __init__(self, command_key, droptables, client):
     self.client = client
     self.droptables = droptables
     super().__init__(command_key, "relic", """Relic search""", f"{command_key} relic *<relic name>*", ["relicsearch"])
     self.args = Args(relic=Args.ANY_ARG)
     self.args.set_pattern(command_key, self.aliases)