feat(pterodactyl): added achievements
This commit is contained in:
parent
8954df4c1d
commit
7e03696e10
3 changed files with 73 additions and 0 deletions
|
@ -175,6 +175,42 @@ class Pterodactyl(commands.Cog):
|
|||
await config.server_regex.set(regex)
|
||||
await ctx.send(f"Server regex set to:\n{box(regex, 'regex')}")
|
||||
|
||||
@pterodactyl_config_regex.command(name = "join")
|
||||
async def pterodactyl_config_regex_join(self, ctx: commands.Context, *, regex: str = None) -> None:
|
||||
"""Set the regex pattern to match join messages on the server.
|
||||
|
||||
See [documentation]() for more information."""
|
||||
#TODO - fix this link
|
||||
if regex is None:
|
||||
regex = await config.join_regex()
|
||||
return await ctx.send(f"Join regex is currently set to:\n{box(regex, 'regex')}")
|
||||
await config.join_regex.set(regex)
|
||||
await ctx.send(f"Join regex set to:\n{box(regex, 'regex')}")
|
||||
|
||||
@pterodactyl_config_regex.command(name = "leave")
|
||||
async def pterodactyl_config_regex_leave(self, ctx: commands.Context, *, regex: str = None) -> None:
|
||||
"""Set the regex pattern to match leave messages on the server.
|
||||
|
||||
See [documentation]() for more information."""
|
||||
#TODO - fix this link
|
||||
if regex is None:
|
||||
regex = await config.leave_regex()
|
||||
return await ctx.send(f"Leave regex is currently set to:\n{box(regex, 'regex')}")
|
||||
await config.leave_regex.set(regex)
|
||||
await ctx.send(f"Leave regex set to:\n{box(regex, 'regex')}")
|
||||
|
||||
@pterodactyl_config_regex.command(name = "achievement")
|
||||
async def pterodactyl_config_regex_achievement(self, ctx: commands.Context, *, regex: str = None) -> None:
|
||||
"""Set the regex pattern to match achievement messages on the server.
|
||||
|
||||
See [documentation]() for more information."""
|
||||
#TODO - fix this link
|
||||
if regex is None:
|
||||
regex = await config.achievement_regex()
|
||||
return await ctx.send(f"Achievement regex is currently set to:\n{box(regex, 'regex')}")
|
||||
await config.achievement_regex.set(regex)
|
||||
await ctx.send(f"Achievement regex set to:\n{box(regex, 'regex')}")
|
||||
|
||||
@pterodactyl_config.group(name = "messages", aliases = ['msg', 'msgs', 'message'])
|
||||
async def pterodactyl_config_messages(self, ctx: commands.Context):
|
||||
"""Configure message settings."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue