TheHamkerCat 5 tahun lalu
induk
melakukan
ef1a848a95
2 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 1 1
      wbb/modules/greetings.py
  2. 2 2
      wbb/modules/karma.py

+ 1 - 1
wbb/modules/greetings.py

@@ -93,7 +93,7 @@ async def welcome(_, message: Message):
                 await message.reply_text(f"{member.mention} was globally banned, and got removed,"
                                          + " if you think this is a false gban, you can appeal"
                                          + " for this ban in support chat.")
-               continue
+                continue
             if member.is_bot:
                 continue  # ignore bots
             await message.chat.restrict_member(member.id, ChatPermissions())

+ 2 - 2
wbb/modules/karma.py

@@ -53,7 +53,7 @@ regex_downvote = r"^(\-|\-\-|\-1|👎)$"
 )
 @capture_err
 async def upvote(_, message):
-    if not await is_karma_on:
+    if not await is_karma_on(message.chat.id):
         return
     if message.reply_to_message.from_user.id == message.from_user.id:
         return
@@ -88,7 +88,7 @@ async def upvote(_, message):
 )
 @capture_err
 async def downvote(_, message):
-    if not await is_karma_on:
+    if not await is_karma_on(message.chat.id):
         return
     if message.reply_to_message.from_user.id == message.from_user.id:
         return