fix(backup): fixed extract_json_from_codeblock
This commit is contained in:
parent
2dd8663e78
commit
5eb762d9fe
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ class Backup(commands.Cog):
|
||||||
await ctx.send(error(f"You do not have the `Downloader` cog loaded. Please run `{ctx.prefix}load downloader` and try again."))
|
await ctx.send(error(f"You do not have the `Downloader` cog loaded. Please run `{ctx.prefix}load downloader` and try again."))
|
||||||
return
|
return
|
||||||
|
|
||||||
def extract_json_from_codeblock(text):
|
def extract_json_from_codeblock(self, text):
|
||||||
match = re.match(r"```(?:\w+)?\n(.*?)\n```", text, re.DOTALL)
|
match = re.match(r"```(?:\w+)?\n(.*?)\n```", text, re.DOTALL)
|
||||||
if match:
|
if match:
|
||||||
return match.group(1).strip()
|
return match.group(1).strip()
|
||||||
|
|
Loading…
Reference in a new issue