feat(pterodactyl): added a discord invite placeholder
updated default chat command as well, and also a configuration value and related command
This commit is contained in:
parent
87dfc03812
commit
34c34e745a
3 changed files with 17 additions and 1 deletions
|
@ -91,6 +91,7 @@ class Pterodactyl(commands.Cog):
|
|||
"M": message.content.replace('"',''),
|
||||
"N": message.author.display_name,
|
||||
"U": message.author.name,
|
||||
"V": await config.invite() or "use [p]pterodactyl config invite to change me",
|
||||
}
|
||||
for key, value in placeholders.items():
|
||||
command = command.replace('.$' + key, value)
|
||||
|
@ -181,6 +182,12 @@ class Pterodactyl(commands.Cog):
|
|||
await config.console_channel.set(channel.id)
|
||||
await ctx.send(f"Console channel set to {channel.mention}")
|
||||
|
||||
@pterodactyl_config.command(name = "invite")
|
||||
async def pterodactyl_config_invite(self, ctx: commands.Context, invite: str) -> None:
|
||||
"""Set the invite link for your server."""
|
||||
await config.invite.set(invite)
|
||||
await ctx.send(f"Invite link set to {invite}")
|
||||
|
||||
@pterodactyl_config.group(name = "chat")
|
||||
async def pterodactyl_config_chat(self, ctx: commands.Context):
|
||||
"""Configure chat settings."""
|
||||
|
@ -345,6 +352,7 @@ class Pterodactyl(commands.Cog):
|
|||
leave_msg = await config.leave_msg()
|
||||
mask_ip = await config.mask_ip()
|
||||
api_endpoint = await config.api_endpoint()
|
||||
invite = await config.invite()
|
||||
regex_blacklist: dict = await config.regex_blacklist()
|
||||
embed = discord.Embed(color = await ctx.embed_color(), title="Pterodactyl Configuration")
|
||||
embed.description = f"""**Base URL:** {base_url}
|
||||
|
@ -357,6 +365,7 @@ class Pterodactyl(commands.Cog):
|
|||
**Leave Message:** {leave_msg}
|
||||
**Mask IP:** {self.get_bool_str(mask_ip)}
|
||||
**API Endpoint:** `{api_endpoint}`
|
||||
**Invite:** {invite}
|
||||
|
||||
**Chat Command:** {box(chat_command, 'json')}
|
||||
**Chat Regex:** {box(chat_regex, 're')}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue