Try to get caption too
This commit is contained in:
parent
6e1731f1df
commit
b904b1b641
|
@ -16,7 +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.markdown)
|
match = re.match(PYEXEC_REGEX, (message.text or message.caption).markdown)
|
||||||
if not match:
|
if not match:
|
||||||
return
|
return
|
||||||
code = match.group(1).strip()
|
code = match.group(1).strip()
|
||||||
|
|
|
@ -10,7 +10,7 @@ SHELL_REGEX = '^(?:' + '|'.join(map(re.escape, config['config']['prefixes'])) +
|
||||||
@log_errors
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def shell(client, message):
|
async def shell(client, message):
|
||||||
match = re.match(SHELL_REGEX, message.text.markdown)
|
match = re.match(SHELL_REGEX, (message.text or message.caption).markdown)
|
||||||
if not match:
|
if not match:
|
||||||
return
|
return
|
||||||
command = match.group(1)
|
command = match.group(1)
|
||||||
|
|
Loading…
Reference in New Issue