feat(pterodactyl): updated how placeholders are parsed in get_chat_command(), updated documentation to match
This commit is contained in:
parent
1bc1c7a90e
commit
4979e44b7c
2 changed files with 11 additions and 5 deletions
|
@ -83,7 +83,13 @@ class Pterodactyl(commands.Cog):
|
|||
|
||||
async def get_chat_command(self, username: str, message: str, color: discord.Color) -> str:
|
||||
command: str = await config.chat_command()
|
||||
command = command.replace(".$U", username).replace(".$M", message).replace(".$C", str(color))
|
||||
placeholders = {
|
||||
"U": username,
|
||||
"M": message,
|
||||
"C": str(color)
|
||||
}
|
||||
for key, value in placeholders.items():
|
||||
command = command.replace('$.' + key, value)
|
||||
return command
|
||||
|
||||
@commands.Cog.listener()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue