forked from blizzthewolf/SeaCogs
fix(pterodactyl): adding some debug logging
This commit is contained in:
parent
f87f4ee37f
commit
502ffbee84
1 changed files with 5 additions and 1 deletions
|
@ -118,6 +118,7 @@ class Pterodactyl(commands.Cog):
|
||||||
async def check_if_chat_message(self, text: str) -> Union[bool, dict]:
|
async def check_if_chat_message(self, text: str) -> Union[bool, dict]:
|
||||||
self.logger.debug("Checking if message is a chat message")
|
self.logger.debug("Checking if message is a chat message")
|
||||||
regex = await self.config.chat_regex()
|
regex = await self.config.chat_regex()
|
||||||
|
self.logger.debug(regex)
|
||||||
self.logger.debug('1')
|
self.logger.debug('1')
|
||||||
match: Optional[re.Match[str]] = re.match(regex, text)
|
match: Optional[re.Match[str]] = re.match(regex, text)
|
||||||
self.logger.debug('2')
|
self.logger.debug('2')
|
||||||
|
@ -160,7 +161,10 @@ class Pterodactyl(commands.Cog):
|
||||||
|
|
||||||
async def get_tellraw_string(self, username: str, message: str, color: discord.Color):
|
async def get_tellraw_string(self, username: str, message: str, color: discord.Color):
|
||||||
tellraw = await self.config.tellraw_json()
|
tellraw = await self.config.tellraw_json()
|
||||||
return tellraw.replace(".$U", username).replace(".$M", message).replace(".$C", str(color))
|
self.logger.debug("Generating tellraw string:\n%s", tellraw)
|
||||||
|
tellraw = tellraw.replace(".$U", username).replace(".$M", message).replace(".$C", str(color))
|
||||||
|
self.logger.debug("Tellraw string generated:\n%s", tellraw)
|
||||||
|
return tellraw
|
||||||
|
|
||||||
def get_task(self):
|
def get_task(self):
|
||||||
return self.bot.loop.create_task(self.establish_websocket_connection(), name="Pterodactyl Websocket Connection")
|
return self.bot.loop.create_task(self.establish_websocket_connection(), name="Pterodactyl Websocket Connection")
|
||||||
|
|
Loading…
Reference in a new issue