This commit is contained in:
yasirarism 2023-06-27 03:10:12 +00:00 committed by GitHub
parent 09ebff7289
commit 630d2c698e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 42 deletions

View file

@ -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

View file

@ -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 = (

View file

@ -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",