mirror of
https://github.com/Ryujinx/ryuko-ng.git
synced 2024-12-23 11:35:39 +00:00
admin: allow cogs with _ in their name to be auto-reloaded
This commit is contained in:
parent
bf897762e6
commit
04661d3922
|
@ -113,7 +113,7 @@ class Admin:
|
||||||
git_output = await self.bot.async_call_shell("git pull")
|
git_output = await self.bot.async_call_shell("git pull")
|
||||||
await tmp.edit(content=f"Pull complete. Output: ```{git_output}```")
|
await tmp.edit(content=f"Pull complete. Output: ```{git_output}```")
|
||||||
if auto:
|
if auto:
|
||||||
cogs_to_reload = re.findall(r'cogs/([a-z]*).py[ ]*\|', git_output)
|
cogs_to_reload = re.findall(r'cogs/([a-z_]*).py[ ]*\|', git_output)
|
||||||
for cog in cogs_to_reload:
|
for cog in cogs_to_reload:
|
||||||
try:
|
try:
|
||||||
self.bot.unload_extension("cogs." + cog)
|
self.bot.unload_extension("cogs." + cog)
|
||||||
|
|
Loading…
Reference in a new issue