Kaynağa Gözat

Fixed error when @mentioning a user that is not in the warnings of that server.

tags/v1.7.0
Roxie Gibson 6 yıl önce
ebeveyn
işleme
a38abeb7ce
2 değiştirilmiş dosya ile 5 ekleme ve 3 silme
  1. +1
    -0
      README.md
  2. +4
    -3
      roxbot/cogs/admin.py

+ 1
- 0
README.md Dosyayı Görüntüle

@@ -39,6 +39,7 @@ _Coming Soon_
###### Bug Fixes
- Doubled the amount of times subreddit commands will cycle through possible requests to fix JSON decode error.
- Fixed error in reddit cog due to changing JSON outputs thanks to new reddit redesign.
- Fixed error when trying to use `warn list` on a user that isn't in the list returning an unhelpful error.

#### v1.6.1
###### Small changes

+ 4
- 3
roxbot/cogs/admin.py Dosyayı Görüntüle

@@ -149,12 +149,13 @@ class Admin():

user_id = str(user.id)

if not settings.warnings.get(user_id):
return await ctx.send("This user doesn't have any warning on record.")

if not settings.warnings[user_id]:
settings.warnings.pop(user_id)
settings.update(settings.warnings, "warnings")
if user_id not in settings.warnings:
return await ctx.send("This user doesn't have any warning on record.")

em = discord.Embed(title="Warnings for {}".format(str(user)), colour=roxbot.EmbedColours.pink)
em.set_thumbnail(url=user.avatar_url)
x = 1

Yükleniyor…
İptal
Kaydet