Add Pterodactyl cog #19

Merged
cswimr merged 139 commits from pterodactyl into main 2024-03-02 00:07:42 -05:00
Showing only changes of commit 579855af02 - Show all commits

View file

@ -119,11 +119,11 @@ class Pterodactyl(commands.Cog):
self.logger.debug("Checking if message is a chat message")
regex = await self.config.chat_regex()
self.logger.debug('1')
regex_match: Optional[re.Match[str]] = re.match(regex, text)
match: Optional[re.Match[str]] = re.match(regex, text)
self.logger.debug('2')
if regex_match:
if match:
self.logger.debug('3')
dict = {"time": regex_match.group(1), "username": regex_match.group(2), "message": regex_match.group(3)}
dict = {"time": match.group(1), "username": match.group(2), "message": match.group(3)}
self.logger.debug('4')
self.logger.debug("Message is a chat message\n%s", json.dumps(dict))
self.logger.debug('5')