reset: bugfix

This commit is contained in:
Ave Ozkal 2018-12-24 03:18:40 +03:00
parent 7aa19fae41
commit 27c991f0af
No known key found for this signature in database
GPG key ID: 09356ABAA42C842B
3 changed files with 12 additions and 5 deletions

View file

@ -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")

View file

@ -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))

View file

@ -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