Remove unnecessary double match

This commit is contained in:
blank X 2022-02-08 18:02:06 +07:00
parent 3fc088c938
commit 3d96fe5f89
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 1 additions and 4 deletions

View File

@ -16,10 +16,7 @@ PYEXEC_REGEX = '^(?:' + '|'.join(map(re.escape, config['config']['prefixes'])) +
@log_errors
@public_log_errors
async def pyexec(client, message):
match = re.match(PYEXEC_REGEX, (message.text or message.caption).markdown)
if not match:
return
code = match.group(1).strip()
code = message.matches[0].group(1).strip()
class UniqueExecReturnIdentifier:
pass
tree = ast.parse(code)