diff --git a/sukuinote/plugins/pyexec.py b/sukuinote/plugins/pyexec.py index 087bfa5..2b8eeab 100644 --- a/sukuinote/plugins/pyexec.py +++ b/sukuinote/plugins/pyexec.py @@ -16,7 +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.markdown) + match = re.match(PYEXEC_REGEX, (message.text or message.caption).markdown) if not match: return code = match.group(1).strip() diff --git a/sukuinote/plugins/shell.py b/sukuinote/plugins/shell.py index 10f96a3..63dca5b 100644 --- a/sukuinote/plugins/shell.py +++ b/sukuinote/plugins/shell.py @@ -10,7 +10,7 @@ SHELL_REGEX = '^(?:' + '|'.join(map(re.escape, config['config']['prefixes'])) + @log_errors @public_log_errors 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: return command = match.group(1)