Backup #16

Merged
cswimr merged 41 commits from backup into main 2024-01-31 15:58:08 -05:00
Showing only changes of commit 5eb762d9fe - Show all commits

View file

@ -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()