mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 17:44:50 +00:00
Fix
This commit is contained in:
parent
09ebff7289
commit
630d2c698e
3 changed files with 5 additions and 42 deletions
|
|
@ -5,6 +5,7 @@ from pyrogram.types import InlineKeyboardButton
|
|||
from misskaty import MOD_LOAD, MOD_NOLOAD
|
||||
|
||||
|
||||
# skipcq: PYL-W1641
|
||||
class EqInlineKeyboardButton(InlineKeyboardButton):
|
||||
def __eq__(self, other):
|
||||
return self.text == other.text
|
||||
|
|
|
|||
|
|
@ -133,25 +133,6 @@ async def member_has_joined(c: app, member: ChatMemberUpdated, strings):
|
|||
except Exception as e:
|
||||
LOGGER.info(e)
|
||||
userspammer = ""
|
||||
# Spamwatch Detection
|
||||
try:
|
||||
headers = {
|
||||
"Authorization": "Bearer XvfzE4AUNXkzCy0DnIVpFDlxZi79lt6EnwKgBj8Quuzms0OSdHvf1k6zSeyzZ_lz"
|
||||
}
|
||||
apispamwatch = (
|
||||
await http.get(
|
||||
f"https://api.spamwat.ch/banlist/{user.id}", headers=headers
|
||||
)
|
||||
).json()
|
||||
if not apispamwatch.get("error"):
|
||||
await app.ban_chat_member(
|
||||
member.chat.id, user.id, datetime.now() + timedelta(seconds=30)
|
||||
)
|
||||
userspammer += strings("spamwatch_msg").format(
|
||||
umention=user.mention, uid=user.id, reas=apispamwatch.get("reason")
|
||||
)
|
||||
except Exception as err:
|
||||
LOGGER.error(f"ERROR in Spamwatch Detection. {err}")
|
||||
# Combot API Detection
|
||||
try:
|
||||
apicombot = (
|
||||
|
|
@ -202,25 +183,6 @@ async def greet_group(bot, message, strings):
|
|||
),
|
||||
)
|
||||
userspammer = ""
|
||||
# Spamwatch Detection
|
||||
try:
|
||||
headers = {
|
||||
"Authorization": "Bearer XvfzE4AUNXkzCy0DnIVpFDlxZi79lt6EnwKgBj8Quuzms0OSdHvf1k6zSeyzZ_lz"
|
||||
}
|
||||
apispamwatch = (
|
||||
await http.get(
|
||||
f"https://api.spamwat.ch/banlist/{u.id}", headers=headers
|
||||
)
|
||||
).json()
|
||||
if not apispamwatch.get("error"):
|
||||
await app.ban_chat_member(
|
||||
message.chat.id, u.id, datetime.now() + timedelta(seconds=30)
|
||||
)
|
||||
userspammer += strings("spamwatch_msg").format(
|
||||
umention=u.mention, uid=u.id, reas=apispamwatch.get("reason")
|
||||
)
|
||||
except Exception as err:
|
||||
LOGGER.error(f"ERROR in Spamwatch Detection. {err}")
|
||||
# Combot API Detection
|
||||
try:
|
||||
apicombot = (
|
||||
|
|
|
|||
|
|
@ -70,16 +70,16 @@ async def inline_menu(_, inline_query: InlineQuery):
|
|||
|
||||
msg = f"""
|
||||
**[MissKaty✨](https://github.com/yasirarism):**
|
||||
**MainBot:** `{bot_state}`
|
||||
**UserBot:** `{ubot_state}`
|
||||
**MainBot Stats:** `{bot_state}`
|
||||
**UserBot Stats:** `{ubot_state}`
|
||||
**Python:** `{pyver.split()[0]}`
|
||||
**Pyrogram:** `{pyrover}`
|
||||
**MongoDB:** `{aspymon_ver}`
|
||||
**Platform:** `{platform}`
|
||||
**Profiles:** {(await app.get_me()).username}
|
||||
**Bot:** {(await app.get_me()).first_name}
|
||||
"""
|
||||
if USER_SESSION:
|
||||
msg += f" | {(await user.get_me()).first_name}"
|
||||
msg += f"**UserBot:** {(await user.get_me()).first_name}"
|
||||
answerss = [
|
||||
InlineQueryResultArticle(
|
||||
title="Inline Commands",
|
||||
|
|
|
|||
Loading…
Reference in a new issue