From 324a2d2156c9e1ec1d311ae40edd5cdd171d1f8b Mon Sep 17 00:00:00 2001 From: Twentysix Date: Wed, 2 Nov 2016 22:38:20 +0100 Subject: [PATCH] [Mod] Additional check in on_message, fixed typos Fixes #433 --- cogs/economy.py | 6 +++--- cogs/mod.py | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cogs/economy.py b/cogs/economy.py index 848d5fb68..48c736ed7 100644 --- a/cogs/economy.py +++ b/cogs/economy.py @@ -238,7 +238,7 @@ class Economy: await self.bot.say("{} Your balance is: {}".format(user.mention, self.bank.get_balance(user))) except NoAccount: await self.bot.say("{} You don't have an account at the Twentysix bank." - " Type {}bank register to open one.".format(user.mention, ctx.prefix)) + " Type `{}bank register` to open one.".format(user.mention, ctx.prefix)) else: try: await self.bot.say("{}'s balance is {}".format(user.name, self.bank.get_balance(user))) @@ -297,7 +297,7 @@ class Economy: self.bank.deposit_credits(author, self.settings[server.id]["PAYDAY_CREDITS"]) await self.bot.say("{} Here, take some credits. Enjoy! (+{} credits!)".format(author.mention, str(self.settings[server.id]["PAYDAY_CREDITS"]))) else: - await self.bot.say("{} You need an account to receive credits. Type {}bank register to open one.".format(author.mention, ctx.prefix)) + await self.bot.say("{} You need an account to receive credits. Type `{}bank register` to open one.".format(author.mention, ctx.prefix)) @commands.group(pass_context=True) async def leaderboard(self, ctx): @@ -383,7 +383,7 @@ class Economy: author = ctx.message.author server = author.server if not self.bank.account_exists(author): - await self.bot.say("{} You need an account to use the slot machine. Type {}bank register to open one.".format(author.mention, ctx.prefix)) + await self.bot.say("{} You need an account to use the slot machine. Type `{}bank register` to open one.".format(author.mention, ctx.prefix)) return if self.bank.can_spend(author, bid): if bid >= self.settings[server.id]["SLOT_MIN"] and bid <= self.settings[server.id]["SLOT_MAX"]: diff --git a/cogs/mod.py b/cogs/mod.py index f8ceb9ece..b58d030b3 100644 --- a/cogs/mod.py +++ b/cogs/mod.py @@ -837,7 +837,7 @@ class Mod: tmp["reason"] = "Type [p]reason {} to add it".format(case_n) if case["moderator"] is None: tmp["moderator"] = "Unknown" - tmp["moderator_id"] = "Nobody has claimed responsability yet" + tmp["moderator_id"] = "Nobody has claimed responsibility yet" case_msg = ("**Case #{case}** | {action}\n" "**User:** {user} ({user_id})\n" @@ -951,7 +951,8 @@ class Mod: return False async def on_message(self, message): - if message.channel.is_private or self.bot.user == message.author: + if message.channel.is_private or self.bot.user == message.author \ + or isinstance(message.author, discord.User): return elif self.is_mod_or_superior(message): return