admin: allow cogs with _ in their name to be auto-reloaded

This commit is contained in:
Ave Ozkal 2018-12-29 22:13:42 +03:00
parent bf897762e6
commit 04661d3922
No known key found for this signature in database
GPG key ID: 09356ABAA42C842B

View file

@ -113,7 +113,7 @@ class Admin:
git_output = await self.bot.async_call_shell("git pull")
await tmp.edit(content=f"Pull complete. Output: ```{git_output}```")
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:
try:
self.bot.unload_extension("cogs." + cog)