mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-05 19:44:51 +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
|
from misskaty import MOD_LOAD, MOD_NOLOAD
|
||||||
|
|
||||||
|
|
||||||
|
# skipcq: PYL-W1641
|
||||||
class EqInlineKeyboardButton(InlineKeyboardButton):
|
class EqInlineKeyboardButton(InlineKeyboardButton):
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
return self.text == other.text
|
return self.text == other.text
|
||||||
|
|
|
||||||
|
|
@ -133,25 +133,6 @@ async def member_has_joined(c: app, member: ChatMemberUpdated, strings):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LOGGER.info(e)
|
LOGGER.info(e)
|
||||||
userspammer = ""
|
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
|
# Combot API Detection
|
||||||
try:
|
try:
|
||||||
apicombot = (
|
apicombot = (
|
||||||
|
|
@ -202,25 +183,6 @@ async def greet_group(bot, message, strings):
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
userspammer = ""
|
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
|
# Combot API Detection
|
||||||
try:
|
try:
|
||||||
apicombot = (
|
apicombot = (
|
||||||
|
|
|
||||||
|
|
@ -70,16 +70,16 @@ async def inline_menu(_, inline_query: InlineQuery):
|
||||||
|
|
||||||
msg = f"""
|
msg = f"""
|
||||||
**[MissKaty✨](https://github.com/yasirarism):**
|
**[MissKaty✨](https://github.com/yasirarism):**
|
||||||
**MainBot:** `{bot_state}`
|
**MainBot Stats:** `{bot_state}`
|
||||||
**UserBot:** `{ubot_state}`
|
**UserBot Stats:** `{ubot_state}`
|
||||||
**Python:** `{pyver.split()[0]}`
|
**Python:** `{pyver.split()[0]}`
|
||||||
**Pyrogram:** `{pyrover}`
|
**Pyrogram:** `{pyrover}`
|
||||||
**MongoDB:** `{aspymon_ver}`
|
**MongoDB:** `{aspymon_ver}`
|
||||||
**Platform:** `{platform}`
|
**Platform:** `{platform}`
|
||||||
**Profiles:** {(await app.get_me()).username}
|
**Bot:** {(await app.get_me()).first_name}
|
||||||
"""
|
"""
|
||||||
if USER_SESSION:
|
if USER_SESSION:
|
||||||
msg += f" | {(await user.get_me()).first_name}"
|
msg += f"**UserBot:** {(await user.get_me()).first_name}"
|
||||||
answerss = [
|
answerss = [
|
||||||
InlineQueryResultArticle(
|
InlineQueryResultArticle(
|
||||||
title="Inline Commands",
|
title="Inline Commands",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue