mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-25 10:47:14 +00:00
New group admin plugins: Fuck and Rape
This commit is contained in:
parent
db21ca4e37
commit
de49de9208
82
fuck.py
Normal file
82
fuck.py
Normal file
@ -0,0 +1,82 @@
|
||||
""" Pagermaid Plugins Fuck """
|
||||
# ______ _
|
||||
# | ___ \ | |
|
||||
# | |_/ /__ _ __ | |_ __ _ ___ ___ _ __ ___
|
||||
# | __/ _ \ '_ \| __/ _` |/ __/ _ \ '_ \ / _ \
|
||||
# | | | __/ | | | || (_| | (_| __/ | | | __/
|
||||
# \_| \___|_| |_|\__\__,_|\___\___|_| |_|\___|
|
||||
#
|
||||
|
||||
from datetime import timedelta
|
||||
from telethon.tl.types import ChannelParticipantsAdmins
|
||||
from pagermaid.listener import listener
|
||||
|
||||
@listener(is_plugin=True, incoming=True, outgoing=True, command="fuck",
|
||||
description="回复你要踢出的人或-fuck <TelegramID>")
|
||||
async def fuck(context):
|
||||
""" kick and ban this member """
|
||||
reply = await context.get_reply_message()
|
||||
if context.is_group:
|
||||
if reply:
|
||||
if reply.sender.last_name == None:
|
||||
reply_last_name = ''
|
||||
else:
|
||||
reply_last_name = reply.sender.last_name
|
||||
if context.sender.last_name == None:
|
||||
context_last_name = ''
|
||||
else:
|
||||
context_last_name = context.sender.last_name
|
||||
admins = await context.client.get_participants(context.chat, filter=ChannelParticipantsAdmins)
|
||||
if context.sender in admins:
|
||||
try:
|
||||
await context.client.edit_permissions(context.chat_id, reply.sender.id, view_messages=False)
|
||||
await context.client.send_message(
|
||||
context.chat_id,
|
||||
f'[{reply.sender.first_name}{reply_last_name}](tg://user?id={reply.sender.id}) 已被踢出群聊',
|
||||
reply_to = reply.id
|
||||
)
|
||||
await context.delete()
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
try:
|
||||
await context.client.edit_permissions(context.chat_id, context.sender.id, timedelta(seconds=60), send_messages=False, send_media=False, send_stickers=False, send_gifs=False, send_games=False, send_inline=False, send_polls=False, invite_users=False, change_info=False, pin_messages=False)
|
||||
await context.client.send_message(
|
||||
context.chat_id,
|
||||
f'[{context.sender.first_name}{context_last_name}](tg://user?id={context.sender.id}) 由于乱玩管理员命令 已被禁言60秒',
|
||||
reply_to = context.id
|
||||
)
|
||||
await context.delete()
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
if context.arguments == '':
|
||||
return
|
||||
else:
|
||||
userid = int(context.arguments)
|
||||
admins = await context.client.get_participants(context.chat, filter=ChannelParticipantsAdmins)
|
||||
if context.sender in admins:
|
||||
try:
|
||||
await context.client.edit_permissions(context.chat_id, userid, view_messages=False)
|
||||
await context.client.send_message(
|
||||
context.chat_id,
|
||||
f'[{userid}](tg://user?id={userid}) 已被踢出群聊',
|
||||
reply_to = context.id
|
||||
)
|
||||
await context.delete()
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
try:
|
||||
await context.client.edit_permissions(context.chat_id, context.sender.id, timedelta(seconds=60), send_messages=False, send_media=False, send_stickers=False, send_gifs=False, send_games=False, send_inline=False, send_polls=False, invite_users=False, change_info=False, pin_messages=False)
|
||||
await context.client.send_message(
|
||||
context.chat_id,
|
||||
f'[{context.sender.first_name}{context_last_name}](tg://user?id={context.sender.id}) 由于乱玩管理员命令 已被禁言60秒',
|
||||
reply_to = context.id
|
||||
)
|
||||
await context.delete()
|
||||
except:
|
||||
pass
|
||||
|
||||
else:
|
||||
pass
|
20
list.json
20
list.json
@ -489,6 +489,26 @@
|
||||
"supported": true,
|
||||
"des-short": "查询食物嘌呤含量",
|
||||
"des": "命令:pl"
|
||||
},
|
||||
{
|
||||
"name": "rape",
|
||||
"version": "1.0",
|
||||
"section": "chat",
|
||||
"maintainer": "Pentacene",
|
||||
"size": "4.0 kb",
|
||||
"supported": true,
|
||||
"des-short": "只踢出不ban群成员",
|
||||
"des": "命令:(在群内回复该人)-rape 或 -rape <telegramID> "
|
||||
},
|
||||
{
|
||||
"name": "fuck",
|
||||
"version": "1.0",
|
||||
"section": "chat",
|
||||
"maintainer": "Pentacene",
|
||||
"size": "4.0 kb",
|
||||
"supported": true,
|
||||
"des-short": "踢出并ban群成员",
|
||||
"des": "命令:(在群内回复该人)-fuck 或 -fuck <telegramID> "
|
||||
}
|
||||
]
|
||||
}
|
||||
|
80
rape.py
Normal file
80
rape.py
Normal file
@ -0,0 +1,80 @@
|
||||
""" Pagermaid Plugins Rape """
|
||||
# ______ _
|
||||
# | ___ \ | |
|
||||
# | |_/ /__ _ __ | |_ __ _ ___ ___ _ __ ___
|
||||
# | __/ _ \ '_ \| __/ _` |/ __/ _ \ '_ \ / _ \
|
||||
# | | | __/ | | | || (_| | (_| __/ | | | __/
|
||||
# \_| \___|_| |_|\__\__,_|\___\___|_| |_|\___|
|
||||
#
|
||||
|
||||
from datetime import timedelta
|
||||
from telethon.tl.types import ChannelParticipantsAdmins
|
||||
from pagermaid.listener import listener
|
||||
|
||||
@listener(is_plugin=True, incoming=True, outgoing=True, command="rape",
|
||||
description="回复你要踢出的人或-rape <TelegramID>")
|
||||
async def rape(context):
|
||||
reply = await context.get_reply_message()
|
||||
if context.is_group:
|
||||
if reply:
|
||||
if reply.sender.last_name == None:
|
||||
reply_last_name = ''
|
||||
else:
|
||||
reply_last_name = reply.sender.last_name
|
||||
if context.sender.last_name == None:
|
||||
context_last_name = ''
|
||||
else:
|
||||
context_last_name = context.sender.last_name
|
||||
admins = await context.client.get_participants(context.chat, filter=ChannelParticipantsAdmins)
|
||||
if context.sender in admins:
|
||||
await context.client.kick_participant(context.chat_id, reply.sender.id)
|
||||
await context.client.send_message(
|
||||
context.chat_id,
|
||||
f'[{reply.sender.first_name} {reply_last_name}](tg://user?id={reply.sender.id}) 已被移出群聊',
|
||||
reply_to = reply.id
|
||||
)
|
||||
try:
|
||||
await context.delete()
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
try:
|
||||
await context.client.edit_permissions(context.chat_id, context.sender.id, timedelta(seconds=60), send_messages=False, send_media=False, send_stickers=False, send_gifs=False, send_games=False, send_inline=False, send_polls=False, invite_users=False, change_info=False, pin_messages=False)
|
||||
await context.client.send_message(
|
||||
context.chat_id,
|
||||
f'[{context.sender.first_name} {context_last_name}](tg://user?id={context.sender.id}) 由于乱玩管理员命令 已被禁言60秒',
|
||||
reply_to = reply.id
|
||||
)
|
||||
await context.delete()
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
if context.arguments == '':
|
||||
return
|
||||
else:
|
||||
userid = int(context.arguments)
|
||||
admins = await context.client.get_participants(context.chat, filter=ChannelParticipantsAdmins)
|
||||
if context.sender in admins:
|
||||
try:
|
||||
await context.client.kick_participant(context.chat_id, userid)
|
||||
await context.client.send_message(
|
||||
context.chat_id,
|
||||
f'[{userid}](tg://user?id={userid}) 已被移出群聊',
|
||||
reply_to = context.id
|
||||
)
|
||||
await context.delete()
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
try:
|
||||
await context.client.edit_permissions(context.chat_id, context.sender.id, timedelta(seconds=60), send_messages=False, send_media=False, send_stickers=False, send_gifs=False, send_games=False, send_inline=False, send_polls=False, invite_users=False, change_info=False, pin_messages=False)
|
||||
await context.client.send_message(
|
||||
context.chat_id,
|
||||
f'[{context.sender.first_name}{context_last_name}](tg://user?id={context.sender.id}) 由于乱玩管理员命令 已被禁言60秒',
|
||||
reply_to = context.id
|
||||
)
|
||||
await context.delete()
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
pass
|
Loading…
Reference in New Issue
Block a user