Correct couple small errors caused by database format change
This commit is contained in:
parent
fda6b3aae2
commit
8388cfa840
|
@ -215,7 +215,7 @@ class Stats:
|
||||||
stats = {
|
stats = {
|
||||||
command: data['server_usage'].get(str(server.id))
|
command: data['server_usage'].get(str(server.id))
|
||||||
for command, data in command_stats.items()
|
for command, data in command_stats.items()
|
||||||
if data['server_usage'].get(str(server.id), 0) > 0
|
if data.get("server_usage", {}).get(str(server.id), 0) > 0
|
||||||
}
|
}
|
||||||
sorted_stats = sorted(stats.items(), key=lambda x: x[1], reverse=True)
|
sorted_stats = sorted(stats.items(), key=lambda x: x[1], reverse=True)
|
||||||
try:
|
try:
|
||||||
|
@ -272,7 +272,7 @@ class Stats:
|
||||||
await ctx.message.channel.trigger_typing()
|
await ctx.message.channel.trigger_typing()
|
||||||
|
|
||||||
boops = self.bot.db.load('boops', key=ctx.message.author.id)
|
boops = self.bot.db.load('boops', key=ctx.message.author.id)
|
||||||
if boops is None:
|
if not boops:
|
||||||
await ctx.send("You have not booped anyone {} Why the heck not...?".format(ctx.message.author.mention))
|
await ctx.send("You have not booped anyone {} Why the heck not...?".format(ctx.message.author.mention))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue