From 495562a0ec39b4cb4ae5b248acaa56b05e184b68 Mon Sep 17 00:00:00 2001 From: brandons209 Date: Sun, 9 Feb 2020 07:51:38 -0500 Subject: [PATCH] return cost of 0 if using in dms, fix mascot command --- costmanager/manager.py | 2 ++ pony/pony.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/costmanager/manager.py b/costmanager/manager.py index 8bf059a..ba51ef0 100644 --- a/costmanager/manager.py +++ b/costmanager/manager.py @@ -61,6 +61,8 @@ class CostManager(commands.Cog): """ Get cost of a command, respecting hierarchy """ + if isinstance(ctx.channel, discord.DMChannel): + return 0 guild = ctx.guild if not member: member = ctx.author diff --git a/pony/pony.py b/pony/pony.py index a158088..c757923 100644 --- a/pony/pony.py +++ b/pony/pony.py @@ -36,7 +36,7 @@ class Pony(commands.Cog): """ Gives a random picture of our mascot! """ - await fetch_image(self, ctx, randomize=True, mascot=True, tags=["safe,", "coe"]) + await self.fetch_image(self, ctx, randomize=True, mascot=True, tags=["safe,", "coe"]) @commands.group() @commands.guild_only()