[Mod] Additional check in on_message, fixed typos

Fixes #433
This commit is contained in:
Twentysix 2016-11-02 22:38:20 +01:00
parent 70b7fe4468
commit 324a2d2156
2 changed files with 6 additions and 5 deletions

View File

@ -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"]:

View File

@ -837,7 +837,7 @@ class Mod:
tmp["reason"] = "Type [p]reason {} <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