Remove unnecessary double match
This commit is contained in:
parent
3fc088c938
commit
3d96fe5f89
|
@ -16,10 +16,7 @@ PYEXEC_REGEX = '^(?:' + '|'.join(map(re.escape, config['config']['prefixes'])) +
|
||||||
@log_errors
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def pyexec(client, message):
|
async def pyexec(client, message):
|
||||||
match = re.match(PYEXEC_REGEX, (message.text or message.caption).markdown)
|
code = message.matches[0].group(1).strip()
|
||||||
if not match:
|
|
||||||
return
|
|
||||||
code = match.group(1).strip()
|
|
||||||
class UniqueExecReturnIdentifier:
|
class UniqueExecReturnIdentifier:
|
||||||
pass
|
pass
|
||||||
tree = ast.parse(code)
|
tree = ast.parse(code)
|
||||||
|
|
Loading…
Reference in New Issue