From 27c991f0af1dc5e8c6ec16320afd67571bdcca3e Mon Sep 17 00:00:00 2001 From: Ave Ozkal Date: Mon, 24 Dec 2018 03:18:40 +0300 Subject: [PATCH] reset: bugfix --- cogs/meme.py | 11 ++++++++--- cogs/mod.py | 2 ++ cogs/verification.py | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/cogs/meme.py b/cogs/meme.py index 58d7bb7..1fdc449 100644 --- a/cogs/meme.py +++ b/cogs/meme.py @@ -21,14 +21,19 @@ class Meme: """this is where we take memes too far""" return 9.0 / 5.0 * c + 32 + def c_to_k(self, c): + """this is where we take memes REALLY far""" + return c + 273.15 + @commands.check(check_if_staff_or_ot) @commands.command(hidden=True, name="warm") async def warm_member(self, ctx, user: discord.Member): """Warms a user :3""" - celcius = random.randint(0, 100) - fahrenheit = self.c_to_f(celcius) + celsius = random.randint(0, 100) + fahrenheit = self.c_to_f(celsius) + kelvin = self.c_to_k(celsius) await ctx.send(f"{user.mention} warmed." - f" User is now {celcius}°C ({fahrenheit}°F).") + f" User is now {celsius}°C ({fahrenheit}°F, {kelvin}K).") @commands.check(check_if_staff_or_ot) @commands.command(hidden=True, name="bam") diff --git a/cogs/mod.py b/cogs/mod.py index 7b66066..19a5e9a 100644 --- a/cogs/mod.py +++ b/cogs/mod.py @@ -259,6 +259,7 @@ class ModCog: @commands.command() async def approve(self, ctx, target: discord.Member, role: str = "community"): + """Add a role to a user (default: community). Staff only.""" if role not in config.named_roles: return await ctx.send("No such role! Available roles: " + ','.join(config.named_roles)) @@ -281,6 +282,7 @@ class ModCog: @commands.command(aliases=["unapprove"]) async def revoke(self, ctx, target: discord.Member, role: str = "community"): + """Remove a role from a user (default: community). Staff only.""" if role not in config.named_roles: return await ctx.send("No such role! Available roles: " + ','.join(config.named_roles)) diff --git a/cogs/verification.py b/cogs/verification.py index 3812e67..4e2dab1 100644 --- a/cogs/verification.py +++ b/cogs/verification.py @@ -125,8 +125,8 @@ class Verification: msg = f"🗑 **Reset**: {ctx.author.mention} cleared {limit} messages "\ f" in {ctx.channel.mention}" msg += f"\n💬 __Current challenge location__: under rule {rule_choice}" - modlog_channel = self.bot.get_channel(config.modlog_channel) - await modlog_channel.send(msg) + log_channel = self.bot.get_channel(config.log_channel) + await log_channel.send(msg) # find rule that puts us over 2,000 characters, if any total = 0