mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 03:38:53 -05:00
[Downloader] Fixed callbacks to load/unload
This commit is contained in:
parent
25dfefce4d
commit
7a0f97424b
@ -370,7 +370,7 @@ class Downloader:
|
|||||||
self.save_repos()
|
self.save_repos()
|
||||||
os.remove(os.path.join("cogs", cog + ".py"))
|
os.remove(os.path.join("cogs", cog + ".py"))
|
||||||
owner = self.bot.get_cog('Owner')
|
owner = self.bot.get_cog('Owner')
|
||||||
await owner.unload.callback(owner, module=cog)
|
await owner.unload.callback(owner, cog_name=cog)
|
||||||
await self.bot.say("Cog successfully uninstalled.")
|
await self.bot.say("Cog successfully uninstalled.")
|
||||||
|
|
||||||
@cog.command(name="install", pass_context=True)
|
@cog.command(name="install", pass_context=True)
|
||||||
@ -404,7 +404,7 @@ class Downloader:
|
|||||||
elif answer.content.lower().strip() == "yes":
|
elif answer.content.lower().strip() == "yes":
|
||||||
set_cog("cogs." + cog, True)
|
set_cog("cogs." + cog, True)
|
||||||
owner = self.bot.get_cog('Owner')
|
owner = self.bot.get_cog('Owner')
|
||||||
await owner.load.callback(owner, module=cog)
|
await owner.load.callback(owner, cog_name=cog)
|
||||||
else:
|
else:
|
||||||
await self.bot.say("Ok then, you can load it with"
|
await self.bot.say("Ok then, you can load it with"
|
||||||
" `{}load {}`".format(ctx.prefix, cog))
|
" `{}load {}`".format(ctx.prefix, cog))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user