mirror of
https://github.com/TeamPGM/PagerMaid_Plugins_Pyro.git
synced 2024-11-23 23:04:35 +00:00
♻️ Reformat All Plugins
This commit is contained in:
parent
4aa94e7db1
commit
a7a34202fd
14
1A2B/main.py
14
1A2B/main.py
@ -49,10 +49,12 @@ class Game:
|
||||
return a, b
|
||||
|
||||
|
||||
@listener(command="1A2B",
|
||||
groups_only=True,
|
||||
description="Play a game of 1A2B",
|
||||
parameters="[start/stop/answer]")
|
||||
@listener(
|
||||
command="1A2B",
|
||||
groups_only=True,
|
||||
description="Play a game of 1A2B",
|
||||
parameters="[start/stop/answer]",
|
||||
)
|
||||
async def play_game_1a2b(message: Message):
|
||||
if not message.arguments:
|
||||
return await message.edit("Please specify a command.")
|
||||
@ -76,7 +78,9 @@ async def play_game_1a2b(message: Message):
|
||||
try:
|
||||
a, b = game.check_answer(message.arguments)
|
||||
except ValueError:
|
||||
return await message.edit("You need to guess 4 numbers between 0 ~ 9.\nFor example: 1234")
|
||||
return await message.edit(
|
||||
"You need to guess 4 numbers between 0 ~ 9.\nFor example: 1234"
|
||||
)
|
||||
if a == 4:
|
||||
return await message.edit("You Win!\n\nGame over.")
|
||||
return await message.edit("%d: %dA%dB" % (game.times, a, b))
|
||||
|
2161
abstract/main.py
2161
abstract/main.py
File diff suppressed because it is too large
Load Diff
@ -23,9 +23,11 @@ def del_aff() -> None:
|
||||
del sqlite["aff.web_page"]
|
||||
|
||||
|
||||
@listener(command="aff",
|
||||
description="在别人要打算买机场的时候光速发出自己的aff信息(请尽量配合短链接)",
|
||||
parameters="[save|remove] (可选,回复一条消息,用于保存|删除aff信息)")
|
||||
@listener(
|
||||
command="aff",
|
||||
description="在别人要打算买机场的时候光速发出自己的aff信息(请尽量配合短链接)",
|
||||
parameters="[save|remove] (可选,回复一条消息,用于保存|删除aff信息)",
|
||||
)
|
||||
async def aff(message: Message):
|
||||
if not message.parameter:
|
||||
msg, web_page = get_aff()
|
||||
|
@ -36,10 +36,12 @@ class Setting:
|
||||
ai_setting = Setting("aireply")
|
||||
|
||||
|
||||
@listener(command="aireply",
|
||||
need_admin=True,
|
||||
parameters="{on|off|add|del|list}",
|
||||
description="通过预设根据语义分析进行应答,支持设置白名单并全局开关")
|
||||
@listener(
|
||||
command="aireply",
|
||||
need_admin=True,
|
||||
parameters="{on|off|add|del|list}",
|
||||
description="通过预设根据语义分析进行应答,支持设置白名单并全局开关",
|
||||
)
|
||||
async def ai_reply(_: Client, message: Message):
|
||||
input_str = message.arguments
|
||||
chats = ai_setting.chats()
|
||||
@ -76,7 +78,7 @@ async def ai_reply(_: Client, message: Message):
|
||||
text += f"• `{chatid}`\n"
|
||||
await message.edit(text)
|
||||
else:
|
||||
await edit_delete(message, lang('arg_error'))
|
||||
await edit_delete(message, lang("arg_error"))
|
||||
|
||||
|
||||
@listener(incoming=True, outgoing=True, privates_only=True)
|
||||
@ -100,4 +102,6 @@ async def replay_listener(_, message: Message):
|
||||
if reply != 0:
|
||||
await asyncio.sleep(random.uniform(0, 1))
|
||||
await bot.send_message(message.from_user.id, reply)
|
||||
print(f"aireply: AI Reply to '{message.from_user.mention()}' by '{reply}'")
|
||||
print(
|
||||
f"aireply: AI Reply to '{message.from_user.mention()}' by '{reply}'"
|
||||
)
|
||||
|
@ -15,7 +15,9 @@ from pagermaid.utils import check_manage_subs, edit_delete
|
||||
|
||||
class AliCloud:
|
||||
def __init__(self):
|
||||
self.url = 'https://api.aliyundrive.com/adrive/v1/timeline/homepage/list_message'
|
||||
self.url = (
|
||||
"https://api.aliyundrive.com/adrive/v1/timeline/homepage/list_message"
|
||||
)
|
||||
self.data = {
|
||||
"user_id": "ec11691148db442aa7aa374ca707543c", # 阿里盘盘酱
|
||||
"limit": 50,
|
||||
@ -27,8 +29,8 @@ class AliCloud:
|
||||
|
||||
@staticmethod
|
||||
def parse_time(timestamp: int) -> str:
|
||||
""" parse timestamp to date time """
|
||||
return datetime.fromtimestamp(timestamp).strftime('%Y-%m-%d %H:%M:%S')
|
||||
"""parse timestamp to date time"""
|
||||
return datetime.fromtimestamp(timestamp).strftime("%Y-%m-%d %H:%M:%S")
|
||||
|
||||
async def get(self):
|
||||
with contextlib.suppress(Exception):
|
||||
@ -59,8 +61,14 @@ class AliCloud:
|
||||
share_time = self.share_time
|
||||
if not share_id:
|
||||
share_id = self.share_id
|
||||
return (f"最近一次阿里云盘掉落福利的时间是 {self.parse_time(share_time)}\n\n"
|
||||
f"https://www.aliyundrive.com/s/{share_id}") if share_id else "未获取到阿里云盘掉落福利信息"
|
||||
return (
|
||||
(
|
||||
f"最近一次阿里云盘掉落福利的时间是 {self.parse_time(share_time)}\n\n"
|
||||
f"https://www.aliyundrive.com/s/{share_id}"
|
||||
)
|
||||
if share_id
|
||||
else "未获取到阿里云盘掉落福利信息"
|
||||
)
|
||||
|
||||
async def send_to_chat(self, cid: int):
|
||||
try:
|
||||
@ -94,15 +102,15 @@ async def alicloud_startup() -> None:
|
||||
await alicloud.push()
|
||||
|
||||
|
||||
@listener(command="alicloud",
|
||||
description="获取阿里云盘掉落福利信息",
|
||||
parameters="[订阅/退订]")
|
||||
@listener(command="alicloud", description="获取阿里云盘掉落福利信息", parameters="[订阅/退订]")
|
||||
async def set_alicloud_notice(message: Message):
|
||||
if not message.arguments:
|
||||
try:
|
||||
item = await alicloud.get()
|
||||
text = alicloud.get_text(item["created"] / 1000, item["content"]["share_id"])
|
||||
except Exception as e: # noqa
|
||||
text = alicloud.get_text(
|
||||
item["created"] / 1000, item["content"]["share_id"]
|
||||
)
|
||||
except Exception as e: # noqa
|
||||
text = f"获取阿里云盘掉落福利信息失败:{e}"
|
||||
return await message.edit(text)
|
||||
elif message.arguments == "订阅":
|
||||
|
@ -17,27 +17,29 @@ import emoji
|
||||
# 获取内容中的表情符号,并用|分割
|
||||
def get_emoji(text):
|
||||
if emojiArr := emoji.distinct_emoji_list(text):
|
||||
delimiter = '|'
|
||||
delimiter = "|"
|
||||
return delimiter.join(emojiArr)
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
@listener(is_plugin=False,
|
||||
outgoing=True,
|
||||
command="auto_send_reactions",
|
||||
description='\n自动回复Emoji插件',
|
||||
parameters="`\n自动回复Emoji插件,支持同时设置多个目标生效用户,目前仅支持回复用户在群组中发送的消息,默认在所有已加入的群组中生效\n"
|
||||
"\n**设置插件状态**:"
|
||||
"\n启用:`,auto_send_reactions enable`"
|
||||
"\n停用:`,auto_send_reactions disable`"
|
||||
"\n\n**设置目标生效用户**:"
|
||||
"\n添加:`,auto_send_reactions set <用户id/用户名> <表情内容>`"
|
||||
"\n移除:`,auto_send_reactions unset <用户id/用户名>`"
|
||||
"\n支持直接回复消息以进行快速设置,可以省略用户标识参数"
|
||||
"\n\n**设置生效群组黑名单**:"
|
||||
"\n添加:`,auto_send_reactions block <群组id/群组用户名>`"
|
||||
"\n移除:`,auto_send_reactions unblock <群组id/群组用户名>\n")
|
||||
@listener(
|
||||
is_plugin=False,
|
||||
outgoing=True,
|
||||
command="auto_send_reactions",
|
||||
description="\n自动回复Emoji插件",
|
||||
parameters="`\n自动回复Emoji插件,支持同时设置多个目标生效用户,目前仅支持回复用户在群组中发送的消息,默认在所有已加入的群组中生效\n"
|
||||
"\n**设置插件状态**:"
|
||||
"\n启用:`,auto_send_reactions enable`"
|
||||
"\n停用:`,auto_send_reactions disable`"
|
||||
"\n\n**设置目标生效用户**:"
|
||||
"\n添加:`,auto_send_reactions set <用户id/用户名> <表情内容>`"
|
||||
"\n移除:`,auto_send_reactions unset <用户id/用户名>`"
|
||||
"\n支持直接回复消息以进行快速设置,可以省略用户标识参数"
|
||||
"\n\n**设置生效群组黑名单**:"
|
||||
"\n添加:`,auto_send_reactions block <群组id/群组用户名>`"
|
||||
"\n移除:`,auto_send_reactions unblock <群组id/群组用户名>\n",
|
||||
)
|
||||
async def AutoSendReactions(client: Client, message: Message):
|
||||
reply = message.reply_to_message
|
||||
|
||||
@ -53,13 +55,12 @@ async def AutoSendReactions(client: Client, message: Message):
|
||||
# return
|
||||
|
||||
if not sqlite.get("AutoSendReactions.Enable"):
|
||||
sqlite["AutoSendReactions.Enable"] = 'yes'
|
||||
sqlite["AutoSendReactions.Enable"] = "yes"
|
||||
|
||||
# 返回消息
|
||||
await edit_delete(message, "✅ **已启用自动回复表情插件**")
|
||||
|
||||
elif message.parameter[0] == "disable":
|
||||
|
||||
if sqlite.get("AutoSendReactions.Enable"):
|
||||
del sqlite["AutoSendReactions.Enable"]
|
||||
|
||||
@ -67,10 +68,8 @@ async def AutoSendReactions(client: Client, message: Message):
|
||||
await edit_delete(message, "❌ **已停用自动回复表情插件**")
|
||||
|
||||
elif message.parameter[0] in ["set", "unset"]:
|
||||
|
||||
## 设置插件
|
||||
if (message.parameter[0] == "set"):
|
||||
|
||||
if message.parameter[0] == "set":
|
||||
if not reply and (len(message.parameter) == 3):
|
||||
target = message.parameter[1]
|
||||
content = message.parameter[2]
|
||||
@ -83,7 +82,7 @@ async def AutoSendReactions(client: Client, message: Message):
|
||||
if not content or not get_emoji(content):
|
||||
return await message.edit("❌ **Emoji参数不能为空或不合法**")
|
||||
user_name = (
|
||||
f'{user_info.first_name} {user_info.last_name}'
|
||||
f"{user_info.first_name} {user_info.last_name}"
|
||||
if user_info.last_name
|
||||
else user_info.first_name
|
||||
)
|
||||
@ -92,7 +91,7 @@ async def AutoSendReactions(client: Client, message: Message):
|
||||
sqlite[f"AutoSendReactions.{target}"] = content
|
||||
await edit_delete(
|
||||
message,
|
||||
f"✅ 已{'更新' if hasSetted else '添加'}对 __{user_name}__ 的自动回复Emoji设置**"
|
||||
f"✅ 已{'更新' if hasSetted else '添加'}对 __{user_name}__ 的自动回复Emoji设置**",
|
||||
)
|
||||
except Exception as e:
|
||||
await message.edit(message, f"❌ **在设置中遇到了一些错误** > {e}")
|
||||
@ -107,7 +106,7 @@ async def AutoSendReactions(client: Client, message: Message):
|
||||
if not content or not get_emoji(content):
|
||||
return await message.edit("❌ **Emoji参数不能为空或不合法**")
|
||||
user_name = (
|
||||
f'{from_user.first_name} {from_user.last_name}'
|
||||
f"{from_user.first_name} {from_user.last_name}"
|
||||
if from_user.last_name
|
||||
else from_user.first_name
|
||||
)
|
||||
@ -116,17 +115,15 @@ async def AutoSendReactions(client: Client, message: Message):
|
||||
sqlite[f"AutoSendReactions.{target}"] = content
|
||||
await edit_delete(
|
||||
message,
|
||||
f"✅ 已{'更新' if hasSetted else '添加'}对 __{user_name}__ 的自动回复Emoji设置"
|
||||
f"✅ 已{'更新' if hasSetted else '添加'}对 __{user_name}__ 的自动回复Emoji设置",
|
||||
)
|
||||
except Exception as e:
|
||||
await message.edit(message, f"❌ **在设置中遇到了一些错误** > {e}")
|
||||
await log(e) # 打印错误日志
|
||||
else:
|
||||
return await message.edit(
|
||||
f"{lang('error_prefix')}{lang('arg_error')}")
|
||||
|
||||
elif (message.parameter[0] == "unset"):
|
||||
return await message.edit(f"{lang('error_prefix')}{lang('arg_error')}")
|
||||
|
||||
elif message.parameter[0] == "unset":
|
||||
if not reply and (len(message.parameter) == 2):
|
||||
target = message.parameter[1]
|
||||
try:
|
||||
@ -137,17 +134,19 @@ async def AutoSendReactions(client: Client, message: Message):
|
||||
return await message.edit("❌ **目标用户不存在或参数有误**")
|
||||
user_id = user_info.id
|
||||
user_name = (
|
||||
f'{user_info.first_name} {user_info.last_name}'
|
||||
f"{user_info.first_name} {user_info.last_name}"
|
||||
if user_info.last_name
|
||||
else user_info.first_name
|
||||
)
|
||||
if hasSetted := sqlite.get(f"AutoSendReactions.{user_id}"):
|
||||
del sqlite[f"AutoSendReactions.{user_id}"]
|
||||
await edit_delete(
|
||||
message, f"✅ 对 __{user_name}__ 的自动回复Emoji设置已删除")
|
||||
message, f"✅ 对 __{user_name}__ 的自动回复Emoji设置已删除"
|
||||
)
|
||||
else:
|
||||
await edit_delete(
|
||||
message, f"❌ 还没有对 __{user_name}__ 设置自动回复Emoji哦~")
|
||||
message, f"❌ 还没有对 __{user_name}__ 设置自动回复Emoji哦~"
|
||||
)
|
||||
except Exception as e:
|
||||
await message.edit(message, f"❌ **在设置中遇到了一些错误** > {e}")
|
||||
await log(e) # 打印错误日志
|
||||
@ -157,31 +156,33 @@ async def AutoSendReactions(client: Client, message: Message):
|
||||
target = from_user.id
|
||||
try:
|
||||
user_name = (
|
||||
f'{from_user.first_name} {from_user.last_name}'
|
||||
f"{from_user.first_name} {from_user.last_name}"
|
||||
if from_user.last_name
|
||||
else from_user.first_name
|
||||
)
|
||||
if hasSetted := sqlite.get(f"AutoSendReactions.{target}"):
|
||||
del sqlite[f"AutoSendReactions.{target}"]
|
||||
await edit_delete(
|
||||
message, f"✅ 已删除对 __{user_name}__ 的自动回复Emoji设置")
|
||||
message, f"✅ 已删除对 __{user_name}__ 的自动回复Emoji设置"
|
||||
)
|
||||
else:
|
||||
await edit_delete(
|
||||
message, f"❌ 还没有对 __{user_name}__ 设置自动回复Emoji哦~")
|
||||
message, f"❌ 还没有对 __{user_name}__ 设置自动回复Emoji哦~"
|
||||
)
|
||||
except Exception as e:
|
||||
await message.edit(message, f"❌ **在设置中遇到了一些错误** > {e}")
|
||||
await log(e) # 打印错误日志
|
||||
else:
|
||||
return await message.edit(
|
||||
f"{lang('error_prefix')}{lang('arg_error')}")
|
||||
return await message.edit(f"{lang('error_prefix')}{lang('arg_error')}")
|
||||
|
||||
else:
|
||||
return await message.edit(
|
||||
f"{lang('error_prefix')}{lang('arg_error')}")
|
||||
return await message.edit(f"{lang('error_prefix')}{lang('arg_error')}")
|
||||
|
||||
elif (message.parameter[0]
|
||||
== "block") or (message.parameter[0] == "unblock") and (len(
|
||||
message.parameter) == 2):
|
||||
elif (
|
||||
(message.parameter[0] == "block")
|
||||
or (message.parameter[0] == "unblock")
|
||||
and (len(message.parameter) == 2)
|
||||
):
|
||||
group = message.parameter[1]
|
||||
group_info = await bot.get_chat(chat_id=group)
|
||||
if not group_info:
|
||||
@ -189,36 +190,35 @@ async def AutoSendReactions(client: Client, message: Message):
|
||||
group_id = group_info.id
|
||||
group_name = group_info.title
|
||||
|
||||
if (message.parameter[0] == "block"):
|
||||
if message.parameter[0] == "block":
|
||||
if hasBlocked := sqlite.get(f"AutoSendReactionsBlock.{group_id}"):
|
||||
await edit_delete(
|
||||
message, f"❌ 已经将 __{group_name}__ 加入自动回复Emoji黑名单群组了哦~")
|
||||
message, f"❌ 已经将 __{group_name}__ 加入自动回复Emoji黑名单群组了哦~"
|
||||
)
|
||||
else:
|
||||
sqlite[f"AutoSendReactionsBlock.{group_id}"] = 'yes'
|
||||
await edit_delete(message,
|
||||
f"✅ 已将 __{group_name}__ 加入至自动回复Emoji黑名单群组")
|
||||
elif (message.parameter[0] == "unblock"):
|
||||
sqlite[f"AutoSendReactionsBlock.{group_id}"] = "yes"
|
||||
await edit_delete(message, f"✅ 已将 __{group_name}__ 加入至自动回复Emoji黑名单群组")
|
||||
elif message.parameter[0] == "unblock":
|
||||
if hasBlocked := sqlite.get(f"AutoSendReactionsBlock.{group_id}"):
|
||||
del sqlite[f"AutoSendReactionsBlock.{group_id}"]
|
||||
await edit_delete(message,
|
||||
f"✅ 已将 __{group_name}__ 从自动回复Emoji黑名单群组中移除")
|
||||
await edit_delete(message, f"✅ 已将 __{group_name}__ 从自动回复Emoji黑名单群组中移除")
|
||||
else:
|
||||
await edit_delete(
|
||||
message, f"❌ 还没有将 __{group_name}__ 加入进自动回复Emoji群组黑名单哦~")
|
||||
message, f"❌ 还没有将 __{group_name}__ 加入进自动回复Emoji群组黑名单哦~"
|
||||
)
|
||||
|
||||
else:
|
||||
return await message.edit(f"{lang('error_prefix')}{lang('arg_error')}"
|
||||
)
|
||||
return await message.edit(f"{lang('error_prefix')}{lang('arg_error')}")
|
||||
|
||||
|
||||
@listener(is_plugin=False, incoming=True, ignore_edited=True)
|
||||
async def AutoSendReactions(message: Message):
|
||||
from_user = ''
|
||||
from_user = ""
|
||||
try:
|
||||
# 判断是否启用了本插件
|
||||
if not sqlite.get("AutoSendReactions.Enable"):
|
||||
return
|
||||
if 'GROUP' not in str(message.chat.type):
|
||||
if "GROUP" not in str(message.chat.type):
|
||||
return
|
||||
# 判断是否在黑名单中
|
||||
if sqlite.get(f"AutoSendReactionsBlock.{message.chat.id}"):
|
||||
@ -236,9 +236,9 @@ async def AutoSendReactions(message: Message):
|
||||
return
|
||||
|
||||
# 发送表情
|
||||
emoji = sqlite.get(f"AutoSendReactions.{from_user.id}").split('|')[0]
|
||||
emoji = sqlite.get(f"AutoSendReactions.{from_user.id}").split("|")[0]
|
||||
user_name = (
|
||||
f'{from_user.first_name} {from_user.last_name}'
|
||||
f"{from_user.first_name} {from_user.last_name}"
|
||||
if from_user.last_name
|
||||
else from_user.first_name
|
||||
)
|
||||
|
@ -43,7 +43,7 @@ async def get_hitokoto(request: AsyncClient):
|
||||
htk = (await request.get("https://v1.hitokoto.cn/?charset=utf-8")).json()
|
||||
text = f"\"{htk['hitokoto']}\" —— {htk['from_who']}「{htk['from']}」"
|
||||
except Exception:
|
||||
text = "\"用代码表达言语的魅力,用代码书写山河的壮丽。\" —— 一言「一言开发者中心」"
|
||||
text = '"用代码表达言语的魅力,用代码书写山河的壮丽。" —— 一言「一言开发者中心」'
|
||||
return text
|
||||
|
||||
|
||||
@ -66,7 +66,9 @@ async def annualreport(client: Client, message: Message, request: AsyncClient):
|
||||
pmct = ""
|
||||
if pmc := sqlite.get("pmcaptcha", {}):
|
||||
pmcu = "" if "pmcaptcha" in plg else "不过此插件已经被卸载了,是spam变少了吗?\n"
|
||||
pmct = f'pmcaptcha 已帮助你拦截了 {pmc.get("banned", 0)} 次私聊\n你的清净由 pagermaid 守护\n{pmcu}'
|
||||
pmct = (
|
||||
f'pmcaptcha 已帮助你拦截了 {pmc.get("banned", 0)} 次私聊\n你的清净由 pagermaid 守护\n{pmcu}'
|
||||
)
|
||||
htks = await get_hitokoto(request)
|
||||
msg = f"""{user} 的年度报告
|
||||
2022 一路上,你充实而满足
|
||||
|
@ -4,19 +4,27 @@ from pagermaid.listener import listener
|
||||
from pagermaid.enums import Client, Message
|
||||
|
||||
|
||||
@listener(command="atadmins",
|
||||
description="一键 AT 本群管理员(仅在群组中有效)",
|
||||
groups_only=True,
|
||||
parameters="[要说的话]")
|
||||
@listener(
|
||||
command="atadmins",
|
||||
description="一键 AT 本群管理员(仅在群组中有效)",
|
||||
groups_only=True,
|
||||
parameters="[要说的话]",
|
||||
)
|
||||
async def at_admins(client: Client, message: Message):
|
||||
admins = []
|
||||
async for m in client.get_chat_members(message.chat.id, filter=ChatMembersFilter.ADMINISTRATORS):
|
||||
async for m in client.get_chat_members(
|
||||
message.chat.id, filter=ChatMembersFilter.ADMINISTRATORS
|
||||
):
|
||||
if not m.user.is_bot and not m.user.is_deleted:
|
||||
admins.append(m.user.mention)
|
||||
if not admins:
|
||||
return await message.edit("❌ 没有管理员")
|
||||
say = message.arguments or "召唤本群所有管理员"
|
||||
send_list = ' , '.join(admins)
|
||||
await client.send_message(message.chat.id, "%s:\n\n%s" % (say, send_list),
|
||||
reply_to_message_id=message.reply_to_message_id or message.reply_to_top_message_id)
|
||||
send_list = " , ".join(admins)
|
||||
await client.send_message(
|
||||
message.chat.id,
|
||||
"%s:\n\n%s" % (say, send_list),
|
||||
reply_to_message_id=message.reply_to_message_id
|
||||
or message.reply_to_top_message_id,
|
||||
)
|
||||
await message.safe_delete()
|
||||
|
@ -10,8 +10,7 @@ async def get_audio(message: Message):
|
||||
return message if message.audio else None
|
||||
|
||||
|
||||
@listener(command="audio_to_voice",
|
||||
description="将音乐文件转换为语音")
|
||||
@listener(command="audio_to_voice", description="将音乐文件转换为语音")
|
||||
async def audio_to_voice(bot: Client, message: Message):
|
||||
audio = await get_audio(message)
|
||||
if not audio:
|
||||
@ -22,8 +21,10 @@ async def audio_to_voice(bot: Client, message: Message):
|
||||
await bot.send_voice(
|
||||
message.chat.id,
|
||||
audio,
|
||||
reply_to_message_id=message.id if message.audio else (message.reply_to_message_id or
|
||||
message.reply_to_top_message_id))
|
||||
reply_to_message_id=message.id
|
||||
if message.audio
|
||||
else (message.reply_to_message_id or message.reply_to_top_message_id),
|
||||
)
|
||||
except Exception as e:
|
||||
await message.edit(f"转换为语音消息失败:{e}")
|
||||
safe_remove(audio)
|
||||
|
@ -11,24 +11,48 @@ from emoji import emojize
|
||||
from pagermaid import logs, scheduler, bot
|
||||
|
||||
|
||||
|
||||
auto_change_name_init = False
|
||||
dizzy = emojize(":dizzy:", language='alias')
|
||||
cake = emojize(":cake:", language='alias')
|
||||
all_time_emoji_name = ["clock12", "clock1230", "clock1", "clock130", "clock2", "clock230", "clock3", "clock330",
|
||||
"clock4", "clock430", "clock5", "clock530", "clock6", "clock630", "clock7", "clock730", "clock8",
|
||||
"clock830", "clock9", "clock930", "clock10", "clock1030", "clock11", "clock1130"]
|
||||
time_emoji_symb = [
|
||||
emojize(f":{s}:", language='alias') for s in all_time_emoji_name
|
||||
dizzy = emojize(":dizzy:", language="alias")
|
||||
cake = emojize(":cake:", language="alias")
|
||||
all_time_emoji_name = [
|
||||
"clock12",
|
||||
"clock1230",
|
||||
"clock1",
|
||||
"clock130",
|
||||
"clock2",
|
||||
"clock230",
|
||||
"clock3",
|
||||
"clock330",
|
||||
"clock4",
|
||||
"clock430",
|
||||
"clock5",
|
||||
"clock530",
|
||||
"clock6",
|
||||
"clock630",
|
||||
"clock7",
|
||||
"clock730",
|
||||
"clock8",
|
||||
"clock830",
|
||||
"clock9",
|
||||
"clock930",
|
||||
"clock10",
|
||||
"clock1030",
|
||||
"clock11",
|
||||
"clock1130",
|
||||
]
|
||||
time_emoji_symb = [emojize(f":{s}:", language="alias") for s in all_time_emoji_name]
|
||||
|
||||
|
||||
@scheduler.scheduled_job("cron", second=0, id="autochangename")
|
||||
async def change_name_auto():
|
||||
try:
|
||||
time_cur = datetime.utcnow().replace(tzinfo=timezone.utc).astimezone(timezone(
|
||||
timedelta(hours=8))).strftime('%H:%M:%S:%p:%a')
|
||||
hour, minu, seco, p, abbwn = time_cur.split(':')
|
||||
time_cur = (
|
||||
datetime.utcnow()
|
||||
.replace(tzinfo=timezone.utc)
|
||||
.astimezone(timezone(timedelta(hours=8)))
|
||||
.strftime("%H:%M:%S:%p:%a")
|
||||
)
|
||||
hour, minu, seco, p, abbwn = time_cur.split(":")
|
||||
shift = 1 if int(minu) > 30 else 0
|
||||
hsym = time_emoji_symb[(int(hour) % 12) * 2 + shift]
|
||||
_last_name = f"{hour}:{minu} {p} UTC+8 {hsym}"
|
||||
|
@ -33,7 +33,12 @@ class DelTask:
|
||||
hour = DelTask.check_time(data[i - 1], 0, 24)
|
||||
elif data[i] == "days":
|
||||
day = DelTask.check_time(data[i - 1], 0, 31)
|
||||
if second := int(second) + int(minute) * 60 + int(hour) * 3600 + int(day) * 86400:
|
||||
if (
|
||||
second := int(second)
|
||||
+ int(minute) * 60
|
||||
+ int(hour) * 3600
|
||||
+ int(day) * 86400
|
||||
):
|
||||
return second
|
||||
else:
|
||||
raise ValueError("Invalid task format")
|
||||
@ -59,7 +64,9 @@ class DelTask:
|
||||
|
||||
@staticmethod
|
||||
def add_task(message: Message):
|
||||
if seconds := DelTask.get_del_seconds(0) or DelTask.get_del_seconds(message.chat.id):
|
||||
if seconds := DelTask.get_del_seconds(0) or DelTask.get_del_seconds(
|
||||
message.chat.id
|
||||
):
|
||||
add_delete_message_job(message, seconds)
|
||||
|
||||
@staticmethod
|
||||
@ -87,9 +94,11 @@ auto_del_help_msg = f"""
|
||||
"""
|
||||
|
||||
|
||||
@listener(command="autodel",
|
||||
need_admin=True,
|
||||
description=f"定时删除消息\n请使用 ,{alias_command('autodel')} h 查看可用命令")
|
||||
@listener(
|
||||
command="autodel",
|
||||
need_admin=True,
|
||||
description=f"定时删除消息\n请使用 ,{alias_command('autodel')} h 查看可用命令",
|
||||
)
|
||||
async def auto_del(message: Message):
|
||||
if message.arguments == "h" or len(message.parameter) == 0:
|
||||
return await message.edit(auto_del_help_msg)
|
||||
@ -97,7 +106,9 @@ async def auto_del(message: Message):
|
||||
return await message.edit(DelTask.get_list(message.chat.id))
|
||||
try:
|
||||
await DelTask.parse_task(message)
|
||||
await message.edit("设置自动删除任务成功。" if message.arguments != "cancel" else "取消自动删除任务成功。")
|
||||
await message.edit(
|
||||
"设置自动删除任务成功。" if message.arguments != "cancel" else "取消自动删除任务成功。"
|
||||
)
|
||||
except ValueError as e:
|
||||
await message.edit(f"开启失败:{str(e)}")
|
||||
except KeyError:
|
||||
|
@ -4,9 +4,7 @@ from pagermaid.utils import Message
|
||||
from base64 import b64decode, b64encode
|
||||
|
||||
|
||||
@listener(command="b64e",
|
||||
description="将文本转为Base64",
|
||||
parameters="[text]")
|
||||
@listener(command="b64e", description="将文本转为Base64", parameters="[text]")
|
||||
async def b64e(_: Client, message: Message):
|
||||
msg = message.arguments
|
||||
if not msg:
|
||||
@ -16,14 +14,12 @@ async def b64e(_: Client, message: Message):
|
||||
await message.edit(f"`{result}`")
|
||||
|
||||
|
||||
@listener(command="b64d",
|
||||
description="将Base64转为文本",
|
||||
parameters="[text]")
|
||||
@listener(command="b64d", description="将Base64转为文本", parameters="[text]")
|
||||
async def b64d(_: Client, message: Message):
|
||||
msg = message.arguments
|
||||
if not msg:
|
||||
return await message.edit("`出错了呜呜呜 ~ 无效的参数。`")
|
||||
|
||||
|
||||
try:
|
||||
result = b64decode(msg).decode("utf-8")
|
||||
except:
|
||||
|
60
bc/main.py
60
bc/main.py
@ -24,89 +24,87 @@ import xmltodict
|
||||
API = "https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml"
|
||||
CURRENCIES = []
|
||||
DATA = {}
|
||||
BINANCE_API_KEY = '8PDfQ2lSIyHPWdNAHNIaIoNy3MiiMuvgwYADbmtsKo867B0xnIhIGjPULsOtvMRk'
|
||||
BINANCE_API_SECRET = 'tbUiyZ94l0zpYOlKs3eO1dvLNMOSbOb2T1T0eT0I1eogH9Fh8Htvli05eZ1iDvra'
|
||||
BINANCE_API_KEY = "8PDfQ2lSIyHPWdNAHNIaIoNy3MiiMuvgwYADbmtsKo867B0xnIhIGjPULsOtvMRk"
|
||||
BINANCE_API_SECRET = "tbUiyZ94l0zpYOlKs3eO1dvLNMOSbOb2T1T0eT0I1eogH9Fh8Htvli05eZ1iDvra"
|
||||
|
||||
|
||||
def init() -> None:
|
||||
""" INIT """
|
||||
"""INIT"""
|
||||
with urllib.request.urlopen(API) as response:
|
||||
result = response.read()
|
||||
try:
|
||||
global CURRENCIES, DATA
|
||||
rate_data = xmltodict.parse(result)
|
||||
rate_data = rate_data['gesmes:Envelope']['Cube']['Cube']['Cube']
|
||||
rate_data = rate_data["gesmes:Envelope"]["Cube"]["Cube"]["Cube"]
|
||||
for i in rate_data:
|
||||
CURRENCIES.append(i['@currency'])
|
||||
DATA[i['@currency']] = float(i['@rate'])
|
||||
CURRENCIES.append(i["@currency"])
|
||||
DATA[i["@currency"]] = float(i["@rate"])
|
||||
CURRENCIES.sort()
|
||||
except Exception as e:
|
||||
raise e
|
||||
|
||||
|
||||
@listener(command="bc",
|
||||
description="coins",
|
||||
parameters="[num] [coin1] [coin2]")
|
||||
@listener(command="bc", description="coins", parameters="[num] [coin1] [coin2]")
|
||||
async def coin(_: Client, message: Message) -> None:
|
||||
""" coin change """
|
||||
"""coin change"""
|
||||
init()
|
||||
action = message.arguments.split()
|
||||
binanceclient = Client(BINANCE_API_KEY, BINANCE_API_SECRET)
|
||||
if len(action) < 3:
|
||||
await message.edit('输入错误.\n-bc 数量 币种1 币种2')
|
||||
await message.edit("输入错误.\n-bc 数量 币种1 币种2")
|
||||
return
|
||||
else:
|
||||
prices = binanceclient.get_all_tickers()
|
||||
try:
|
||||
number = float(action[0])
|
||||
except ValueError:
|
||||
await message.edit('输入错误.\n-bc 数量 币种1 币种2')
|
||||
await message.edit("输入错误.\n-bc 数量 币种1 币种2")
|
||||
return
|
||||
_from = action[1].upper().strip()
|
||||
_to = action[2].upper().strip()
|
||||
front_text = ''
|
||||
text = ''
|
||||
rear_text = ''
|
||||
front_text = ""
|
||||
text = ""
|
||||
rear_text = ""
|
||||
price = 0.0
|
||||
_to_USD_rate = 0.0
|
||||
|
||||
if (CURRENCIES.count(_from) != 0) and (CURRENCIES.count(_to) != 0):
|
||||
# both are real currency
|
||||
text = f'{action[0]} {action[1].upper().strip()} = {float(action[0])*DATA[_to]/DATA[_from]:.2f} {action[2].upper().strip()}'
|
||||
text = f"{action[0]} {action[1].upper().strip()} = {float(action[0])*DATA[_to]/DATA[_from]:.2f} {action[2].upper().strip()}"
|
||||
|
||||
else:
|
||||
if CURRENCIES.count(_from) != 0:
|
||||
# from virtual currency to real currency
|
||||
number = number * DATA["USD"] / DATA[_from]
|
||||
_from = 'USDT'
|
||||
front_text = f'{action[0]} {action[1]} = \n'
|
||||
_from = "USDT"
|
||||
front_text = f"{action[0]} {action[1]} = \n"
|
||||
|
||||
if CURRENCIES.count(_to) != 0:
|
||||
# from real currency to virtual currency
|
||||
_to_USD_rate = DATA[_to] / DATA["USD"]
|
||||
_to = 'USDT'
|
||||
_to = "USDT"
|
||||
|
||||
for _a in prices:
|
||||
if _a['symbol'] == str(f'{_from}{_to}'):
|
||||
price = _a['price']
|
||||
if _to == 'USDT':
|
||||
if action[2].upper().strip() == 'USDT':
|
||||
if _a["symbol"] == str(f"{_from}{_to}"):
|
||||
price = _a["price"]
|
||||
if _to == "USDT":
|
||||
if action[2].upper().strip() == "USDT":
|
||||
rear_text = f'\n= {number * float(price) * DATA["CNY"]/DATA["USD"]:.2f} CNY'
|
||||
else:
|
||||
rear_text = f'\n= {number * float(price) * _to_USD_rate:.2f} {action[2].upper().strip()}'
|
||||
rear_text = f"\n= {number * float(price) * _to_USD_rate:.2f} {action[2].upper().strip()}"
|
||||
if float(price) < 1:
|
||||
text = f'{number} {_from} = {number * float(price):.8f} {_to}'
|
||||
text = f"{number} {_from} = {number * float(price):.8f} {_to}"
|
||||
else:
|
||||
text = f'{number} {_from} = {number * float(price):.2f} {_to}'
|
||||
text = f"{number} {_from} = {number * float(price):.2f} {_to}"
|
||||
break
|
||||
elif _a['symbol'] == str(f'{_to}{_from}'):
|
||||
price = 1 / float(_a['price'])
|
||||
text = f'{number} {_from} = {number * float(price):.8f} {_to}'
|
||||
elif _a["symbol"] == str(f"{_to}{_from}"):
|
||||
price = 1 / float(_a["price"])
|
||||
text = f"{number} {_from} = {number * float(price):.8f} {_to}"
|
||||
break
|
||||
else:
|
||||
price = None
|
||||
|
||||
if price is None:
|
||||
text = f'Cannot find coinpair {action[1].upper().strip()}{action[2].upper().strip()} or {action[2].upper().strip()}{action[1].upper().strip()}'
|
||||
text = f"Cannot find coinpair {action[1].upper().strip()}{action[2].upper().strip()} or {action[2].upper().strip()}{action[1].upper().strip()}"
|
||||
|
||||
await message.edit(f'{front_text}{text}{rear_text}')
|
||||
await message.edit(f"{front_text}{text}{rear_text}")
|
||||
|
18
bin/main.py
18
bin/main.py
@ -9,11 +9,9 @@ pip_install("requests")
|
||||
import requests
|
||||
|
||||
|
||||
@listener(command="bin",
|
||||
description="查询信用卡信息",
|
||||
parameters="[bin(4到8位数字)]")
|
||||
@listener(command="bin", description="查询信用卡信息", parameters="[bin(4到8位数字)]")
|
||||
async def card(_: Client, message: Message):
|
||||
await message.edit('正在查询中...')
|
||||
await message.edit("正在查询中...")
|
||||
try:
|
||||
card_bin = message.arguments
|
||||
except ValueError:
|
||||
@ -39,30 +37,30 @@ async def card(_: Client, message: Message):
|
||||
|
||||
msg_out = [f"BIN:{card_bin}"]
|
||||
try:
|
||||
msg_out.extend(["卡品牌:" + bin_json['scheme']])
|
||||
msg_out.extend(["卡品牌:" + bin_json["scheme"]])
|
||||
except (KeyError, TypeError):
|
||||
pass
|
||||
try:
|
||||
msg_out.extend(["卡类型:" + bin_json['type']])
|
||||
msg_out.extend(["卡类型:" + bin_json["type"]])
|
||||
except (KeyError, TypeError):
|
||||
pass
|
||||
try:
|
||||
msg_out.extend(["卡种类:" + bin_json['brand']])
|
||||
msg_out.extend(["卡种类:" + bin_json["brand"]])
|
||||
except (KeyError, TypeError):
|
||||
pass
|
||||
try:
|
||||
msg_out.extend(["发卡行:" + bin_json['bank']["name"]])
|
||||
msg_out.extend(["发卡行:" + bin_json["bank"]["name"]])
|
||||
except (KeyError, TypeError):
|
||||
pass
|
||||
try:
|
||||
if bin_json['prepaid']:
|
||||
if bin_json["prepaid"]:
|
||||
msg_out.extend(["是否预付:是"])
|
||||
else:
|
||||
msg_out.extend(["是否预付:否"])
|
||||
except (KeyError, TypeError):
|
||||
pass
|
||||
try:
|
||||
msg_out.extend(["发卡国家:" + bin_json['country']['name']])
|
||||
msg_out.extend(["发卡国家:" + bin_json["country"]["name"]])
|
||||
except (KeyError, TypeError):
|
||||
pass
|
||||
await message.edit("\n".join(msg_out))
|
||||
|
@ -14,13 +14,12 @@ async def get_wallpaper_url(num):
|
||||
copy_right = ""
|
||||
if req.status_code == 200:
|
||||
data = req.json()
|
||||
url = data['images'][0]['url']
|
||||
copy_right = data['images'][0]['copyright']
|
||||
url = data["images"][0]["url"]
|
||||
copy_right = data["images"][0]["copyright"]
|
||||
return url, copy_right
|
||||
|
||||
|
||||
@listener(command="bingwall",
|
||||
description="获取Bing每日壁纸(带参数发送原图)")
|
||||
@listener(command="bingwall", description="获取Bing每日壁纸(带参数发送原图)")
|
||||
async def bingwall(message: Message):
|
||||
status = False
|
||||
filename = f"data{sep}wallpaper.jpg"
|
||||
@ -39,16 +38,14 @@ async def bingwall(message: Message):
|
||||
if message.arguments:
|
||||
await message.reply_document(
|
||||
filename,
|
||||
caption=f"#bing wallpaper\n"
|
||||
f"{str(copy_right)}",
|
||||
caption=f"#bing wallpaper\n" f"{str(copy_right)}",
|
||||
quote=False,
|
||||
reply_to_message_id=message.reply_to_top_message_id,
|
||||
)
|
||||
else:
|
||||
await message.reply_photo(
|
||||
filename,
|
||||
caption=f"#bing wallpaper\n"
|
||||
f"{str(copy_right)}",
|
||||
caption=f"#bing wallpaper\n" f"{str(copy_right)}",
|
||||
quote=False,
|
||||
reply_to_message_id=message.reply_to_top_message_id,
|
||||
)
|
||||
|
@ -3,9 +3,11 @@ from pagermaid.listener import listener
|
||||
from pagermaid.utils import Message, execute
|
||||
|
||||
|
||||
@listener(command="cal",
|
||||
description="计算\n示例:\n`,cal 1+1`加法\n`,cal 2-1`减法\n`,cal 1*2`乘法\n`,cal 4/2`除法\n`,cal 4^2`幂运算\n`,cal sqrt(4)`开方",
|
||||
parameters="[基本运算]")
|
||||
@listener(
|
||||
command="cal",
|
||||
description="计算\n示例:\n`,cal 1+1`加法\n`,cal 2-1`减法\n`,cal 1*2`乘法\n`,cal 4/2`除法\n`,cal 4^2`幂运算\n`,cal sqrt(4)`开方",
|
||||
parameters="[基本运算]",
|
||||
)
|
||||
async def cal(_: Client, message: Message):
|
||||
command = message.arguments
|
||||
if not command:
|
||||
@ -21,9 +23,12 @@ async def cal(_: Client, message: Message):
|
||||
else:
|
||||
return
|
||||
|
||||
@listener(command="con",
|
||||
description="换算\n示例:\n`,con 2 99`将99转换为2进制",
|
||||
parameters="[进制(数字)] [数值]")
|
||||
|
||||
@listener(
|
||||
command="con",
|
||||
description="换算\n示例:\n`,con 2 99`将99转换为2进制",
|
||||
parameters="[进制(数字)] [数值]",
|
||||
)
|
||||
async def con(_: Client, message: Message):
|
||||
command = message.arguments.split()
|
||||
if not command:
|
||||
|
@ -25,7 +25,9 @@ async def export_chat_to_csv():
|
||||
writer = csv.writer(f)
|
||||
writer.writerow(["name", "id", "username", "members"])
|
||||
for chat in chats:
|
||||
writer.writerow([chat.title, chat.id, chat.username or "", chat.members_count])
|
||||
writer.writerow(
|
||||
[chat.title, chat.id, chat.username or "", chat.members_count]
|
||||
)
|
||||
return len(chats)
|
||||
|
||||
|
||||
@ -61,10 +63,12 @@ async def join_chat_from_csv(file_name):
|
||||
return success, failed, processed
|
||||
|
||||
|
||||
@listener(command="chat_transfer",
|
||||
need_admin=True,
|
||||
parameters="导出/导入",
|
||||
description="导出、导入已加入的群组/频道(仅可导入公开群组/频道)")
|
||||
@listener(
|
||||
command="chat_transfer",
|
||||
need_admin=True,
|
||||
parameters="导出/导入",
|
||||
description="导出、导入已加入的群组/频道(仅可导入公开群组/频道)",
|
||||
)
|
||||
async def chat_transfer(message: Message):
|
||||
if message.arguments == "导出":
|
||||
message: Message = await message.edit("导出中...")
|
||||
@ -93,6 +97,8 @@ async def chat_transfer(message: Message):
|
||||
file_name = await reply.download()
|
||||
success, failed, processed = await join_chat_from_csv(file_name)
|
||||
safe_remove(file_name)
|
||||
await message.edit(f"处理了 {processed} 条记录,导入成功 {success} 个群组/频道,失败 {failed} 个群组/频道")
|
||||
await message.edit(
|
||||
f"处理了 {processed} 条记录,导入成功 {success} 个群组/频道,失败 {failed} 个群组/频道"
|
||||
)
|
||||
else:
|
||||
await message.edit("❌ 参数错误,请选择 `导出` 或 `导入`")
|
||||
|
@ -24,7 +24,7 @@ class AsyncChatbot:
|
||||
self.bot = Chatbot(config=self.config, refresh=False)
|
||||
|
||||
def __call__(
|
||||
self, conversation_id: Optional[str] = None, parent_id: Optional[str] = None
|
||||
self, conversation_id: Optional[str] = None, parent_id: Optional[str] = None
|
||||
):
|
||||
self.bot.conversation_id = conversation_id
|
||||
self.bot.parent_id = parent_id or self.id
|
||||
@ -59,11 +59,13 @@ class AsyncChatbot:
|
||||
chat_bot = AsyncChatbot()
|
||||
chat_bot_session = defaultdict(dict)
|
||||
chat_bot_lock = threading.Lock()
|
||||
chat_bot_help = "使用 ChatGPT 聊天\n\n" \
|
||||
"参数:\n\n- 无参数:进入聊天模式\n" \
|
||||
"- reset:重置聊天状态\n" \
|
||||
"- set <session_token>:设置 ChatGPT 会话令牌,获取令牌: https://t.me/PagerMaid_Modify/212 \n" \
|
||||
"- del:删除 ChatGPT 会话令牌"
|
||||
chat_bot_help = (
|
||||
"使用 ChatGPT 聊天\n\n"
|
||||
"参数:\n\n- 无参数:进入聊天模式\n"
|
||||
"- reset:重置聊天状态\n"
|
||||
"- set <session_token>:设置 ChatGPT 会话令牌,获取令牌: https://t.me/PagerMaid_Modify/212 \n"
|
||||
"- del:删除 ChatGPT 会话令牌"
|
||||
)
|
||||
|
||||
|
||||
@scheduler.scheduled_job("interval", minutes=30)
|
||||
@ -105,7 +107,9 @@ async def chat_bot_func(message: Message):
|
||||
return await message.edit("请先通过参数 `set [session_token]` 设置 OpenAI API Token。")
|
||||
with chat_bot_lock:
|
||||
try:
|
||||
msg = await chat_bot(**chat_bot_session[from_id]).get_chat_response(message.arguments)
|
||||
msg = await chat_bot(**chat_bot_session[from_id]).get_chat_response(
|
||||
message.arguments
|
||||
)
|
||||
except Exception as e:
|
||||
msg = f"可能是 Session Token 过期了,请重新设置。\n{str(e)}"
|
||||
if not msg:
|
||||
|
@ -4,7 +4,13 @@ from random import uniform
|
||||
|
||||
from pyrogram.enums import ChatMemberStatus
|
||||
from pyrogram import filters
|
||||
from pyrogram.errors import ChatAdminRequired, FloodWait, UserAdminInvalid, PeerIdInvalid, BadRequest
|
||||
from pyrogram.errors import (
|
||||
ChatAdminRequired,
|
||||
FloodWait,
|
||||
UserAdminInvalid,
|
||||
PeerIdInvalid,
|
||||
BadRequest,
|
||||
)
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
@ -31,32 +37,40 @@ async def kick_chat_member(cid, uid, only_search: bool = False):
|
||||
return
|
||||
try:
|
||||
with contextlib.suppress(UserAdminInvalid, PeerIdInvalid, BadRequest):
|
||||
await bot.ban_chat_member(
|
||||
cid,
|
||||
uid,
|
||||
datetime.now() + timedelta(minutes=5))
|
||||
await bot.ban_chat_member(cid, uid, datetime.now() + timedelta(minutes=5))
|
||||
except FloodWait as e:
|
||||
await sleep(e.value + uniform(0.5, 1.0))
|
||||
await kick_chat_member(cid, uid, only_search)
|
||||
|
||||
|
||||
async def process_clean_member(message: Message, mode: str, day: int, only_search: bool = False):
|
||||
async def process_clean_member(
|
||||
message: Message, mode: str, day: int, only_search: bool = False
|
||||
):
|
||||
member_count = 0
|
||||
try:
|
||||
async for member in bot.get_chat_members(message.chat.id):
|
||||
if mode == "1" and member.user.last_online_date and \
|
||||
member.user.last_online_date < datetime.now() - timedelta(days=day):
|
||||
if (
|
||||
mode == "1"
|
||||
and member.user.last_online_date
|
||||
and member.user.last_online_date < datetime.now() - timedelta(days=day)
|
||||
):
|
||||
member_count += 1
|
||||
await kick_chat_member(message.chat.id, member.user.id, only_search)
|
||||
if mode == "2":
|
||||
now = datetime.now() - timedelta(days=day)
|
||||
async for message in bot.search_messages(message.chat.id, limit=1, from_user=member.user.id):
|
||||
async for message in bot.search_messages(
|
||||
message.chat.id, limit=1, from_user=member.user.id
|
||||
):
|
||||
if message.date < now:
|
||||
member_count += 1
|
||||
await kick_chat_member(message.chat.id, member.user.id, only_search)
|
||||
await kick_chat_member(
|
||||
message.chat.id, member.user.id, only_search
|
||||
)
|
||||
elif mode == "3":
|
||||
try:
|
||||
count = await bot.search_messages_count(message.chat.id, from_user=member.user.id)
|
||||
count = await bot.search_messages_count(
|
||||
message.chat.id, from_user=member.user.id
|
||||
)
|
||||
except PeerIdInvalid:
|
||||
continue
|
||||
if count < day:
|
||||
@ -69,32 +83,35 @@ async def process_clean_member(message: Message, mode: str, day: int, only_searc
|
||||
member_count += 1
|
||||
await kick_chat_member(message.chat.id, member.user.id, only_search)
|
||||
if not only_search:
|
||||
await message.edit(f'成功清理了 `{member_count}` 人。')
|
||||
await message.edit(f"成功清理了 `{member_count}` 人。")
|
||||
else:
|
||||
await message.edit(f'查找到了 `{member_count}` 人。')
|
||||
await message.edit(f"查找到了 `{member_count}` 人。")
|
||||
except ChatAdminRequired:
|
||||
await message.edit("你好像并不拥有封禁用户权限。")
|
||||
except FloodWait:
|
||||
return await message.edit('处理失败,您已受到 TG 服务器限制。')
|
||||
return await message.edit("处理失败,您已受到 TG 服务器限制。")
|
||||
|
||||
|
||||
@listener(command="clean_member",
|
||||
need_admin=True,
|
||||
groups_only=True,
|
||||
description="多种方式清理群成员")
|
||||
@listener(
|
||||
command="clean_member", need_admin=True, groups_only=True, description="多种方式清理群成员"
|
||||
)
|
||||
async def clean_member(client: Client, message: Message):
|
||||
if not await check_self_and_from(message):
|
||||
return await message.edit("您不是群管理员,无法使用此命令")
|
||||
uid = message.from_user.id
|
||||
mode, day = "0", 0
|
||||
reply = await message.edit("请选择清理模式:\n\n"
|
||||
"1. 按未上线时间清理\n"
|
||||
"2. 按未发言时间清理(大群慎用)\n"
|
||||
"3. 按发言数清理\n"
|
||||
"4. 清理死号\n"
|
||||
"5. 清理所有人(大群慎用)")
|
||||
reply = await message.edit(
|
||||
"请选择清理模式:\n\n"
|
||||
"1. 按未上线时间清理\n"
|
||||
"2. 按未发言时间清理(大群慎用)\n"
|
||||
"3. 按发言数清理\n"
|
||||
"4. 清理死号\n"
|
||||
"5. 清理所有人(大群慎用)"
|
||||
)
|
||||
try:
|
||||
async with client.conversation(message.chat.id, filters=filters.user(uid)) as conv:
|
||||
async with client.conversation(
|
||||
message.chat.id, filters=filters.user(uid)
|
||||
) as conv:
|
||||
await sleep(1)
|
||||
res: Message = await conv.get_response()
|
||||
mode = res.text
|
||||
|
@ -26,7 +26,9 @@ async def clear_blocked_func(client: Client, message: Message):
|
||||
success += 1
|
||||
except FloodWait as e:
|
||||
with contextlib.suppress(Exception):
|
||||
await message.edit(f"🧹 Clearing blocked users...\n\nWill run after {e.value} seconds.")
|
||||
await message.edit(
|
||||
f"🧹 Clearing blocked users...\n\nWill run after {e.value} seconds."
|
||||
)
|
||||
await sleep(e.value + 1)
|
||||
with contextlib.suppress(Exception):
|
||||
await message.edit("🧹 Clearing blocked users...")
|
||||
@ -35,19 +37,23 @@ async def clear_blocked_func(client: Client, message: Message):
|
||||
except Exception:
|
||||
failed += 1
|
||||
offset += 100
|
||||
if (isinstance(blocked, BlockedSlice) and offset > blocked.count) or not isinstance(blocked, BlockedSlice):
|
||||
if (
|
||||
isinstance(blocked, BlockedSlice) and offset > blocked.count
|
||||
) or not isinstance(blocked, BlockedSlice):
|
||||
break
|
||||
return success, failed, skipped
|
||||
|
||||
|
||||
@listener(command="clear_blocked", description="Clear blocked users.", need_admin=True)
|
||||
async def clear_blocked(client: Client, message: Message):
|
||||
""" Clear blocked users. """
|
||||
"""Clear blocked users."""
|
||||
message: Message = await message.edit("🧹 Clearing blocked users...")
|
||||
try:
|
||||
success, failed, skipped = await clear_blocked_func(client, message)
|
||||
except Exception as e:
|
||||
await message.edit(f"❌ Failed to clear blocked users: {e}")
|
||||
return
|
||||
await message.edit(f"🧹 Clear blocked users complete. \n"
|
||||
f"Success: {success}, Failed: {failed}, Skipped: {skipped}")
|
||||
await message.edit(
|
||||
f"🧹 Clear blocked users complete. \n"
|
||||
f"Success: {success}, Failed: {failed}, Skipped: {skipped}"
|
||||
)
|
||||
|
@ -11,11 +11,13 @@ from pagermaid.services import bot
|
||||
|
||||
async def delete_private_chat(cid: int):
|
||||
try:
|
||||
await bot.invoke(DeleteHistory(
|
||||
just_clear=False,
|
||||
revoke=False,
|
||||
peer=await bot.resolve_peer(cid),
|
||||
max_id=0, )
|
||||
await bot.invoke(
|
||||
DeleteHistory(
|
||||
just_clear=False,
|
||||
revoke=False,
|
||||
peer=await bot.resolve_peer(cid),
|
||||
max_id=0,
|
||||
)
|
||||
)
|
||||
except FloodWait as e:
|
||||
await sleep(e.value)
|
||||
@ -24,12 +26,14 @@ async def delete_private_chat(cid: int):
|
||||
pass
|
||||
|
||||
|
||||
@listener(command="clear_private_chat",
|
||||
need_admin=True,
|
||||
description="通过指定关键词清除私聊",
|
||||
parameters="[关键词]")
|
||||
@listener(
|
||||
command="clear_private_chat",
|
||||
need_admin=True,
|
||||
description="通过指定关键词清除私聊",
|
||||
parameters="[关键词]",
|
||||
)
|
||||
async def clear_private_chat(message: Message):
|
||||
""" 通过指定关键词清除私聊记录 """
|
||||
"""通过指定关键词清除私聊记录"""
|
||||
if not message.arguments:
|
||||
await message.edit("请输入关键词来清除指定的私聊对话,为了保证速度,仅匹配每个对话的最后一条消息")
|
||||
return
|
||||
|
53
code/main.py
53
code/main.py
@ -12,61 +12,54 @@ from pagermaid.listener import listener
|
||||
from pagermaid.enums import Message, AsyncClient
|
||||
|
||||
codeType = {
|
||||
'py': ['python', 'py'],
|
||||
'cpp': ['cpp', 'cpp'],
|
||||
'java': ['java', 'java'],
|
||||
'php': ['php', 'php'],
|
||||
'js': ['javascript', 'js'],
|
||||
'c': ['c', 'c'],
|
||||
'c#': ['csharp', 'cs'],
|
||||
'go': ['go', 'go'],
|
||||
'asm': ['assembly', 'asm']
|
||||
"py": ["python", "py"],
|
||||
"cpp": ["cpp", "cpp"],
|
||||
"java": ["java", "java"],
|
||||
"php": ["php", "php"],
|
||||
"js": ["javascript", "js"],
|
||||
"c": ["c", "c"],
|
||||
"c#": ["csharp", "cs"],
|
||||
"go": ["go", "go"],
|
||||
"asm": ["assembly", "asm"],
|
||||
}
|
||||
|
||||
|
||||
async def run(string: str, client: AsyncClient):
|
||||
string = string.replace('&', '&').replace('[', '[').replace(']', ']')
|
||||
string = string.replace("&", "&").replace("[", "[").replace("]", "]")
|
||||
try:
|
||||
a = re.findall(r'(py|php|java|cpp|js|c#|c|go|asm)\s?(-i)?\s?(\w*)?(\n|\r)((?:.|\n)+)', string)[0]
|
||||
a = re.findall(
|
||||
r"(py|php|java|cpp|js|c#|c|go|asm)\s?(-i)?\s?(\w*)?(\n|\r)((?:.|\n)+)",
|
||||
string,
|
||||
)[0]
|
||||
print(a)
|
||||
except Exception:
|
||||
return "输入有误汪\n目前仅支持c/cpp/c#/py/php/go/java/js"
|
||||
lang, code_str = a[0], a[4]
|
||||
if "-i" in string:
|
||||
data_json = {
|
||||
"files": [
|
||||
{
|
||||
"name": f"main.{codeType[lang][1]}",
|
||||
"content": code_str
|
||||
}
|
||||
],
|
||||
"files": [{"name": f"main.{codeType[lang][1]}", "content": code_str}],
|
||||
"stdin": a[2],
|
||||
"command": ""
|
||||
"command": "",
|
||||
}
|
||||
else:
|
||||
data_json = {
|
||||
"files": [
|
||||
{
|
||||
"name": f"main.{codeType[lang][1]}",
|
||||
"content": code_str
|
||||
}
|
||||
],
|
||||
"files": [{"name": f"main.{codeType[lang][1]}", "content": code_str}],
|
||||
"stdin": "",
|
||||
"command": ""
|
||||
"command": "",
|
||||
}
|
||||
headers = {
|
||||
"Authorization": "Token 0123456-789a-bcde-f012-3456789abcde",
|
||||
"content-type": "application/"
|
||||
"content-type": "application/",
|
||||
}
|
||||
res = await client.post(
|
||||
url=f'https://glot.io/run/{codeType[lang][0]}?version=latest',
|
||||
url=f"https://glot.io/run/{codeType[lang][0]}?version=latest",
|
||||
headers=headers,
|
||||
json=data_json
|
||||
json=data_json,
|
||||
)
|
||||
if res.status_code != 200:
|
||||
return "请求失败了呐~~~"
|
||||
if res.json()['stdout'] == "":
|
||||
return res.json()['stderr'].strip()
|
||||
if res.json()["stdout"] == "":
|
||||
return res.json()["stderr"].strip()
|
||||
return f"<b>>>></b> <code>{code_str}</code> \n{res.json()['stdout']}"
|
||||
|
||||
|
||||
|
@ -1,6 +1,10 @@
|
||||
from pyrogram.raw.functions.messages import GetStickerSet
|
||||
from pyrogram.raw.functions.stickers import CreateStickerSet
|
||||
from pyrogram.raw.types import InputStickerSetShortName, InputStickerSetItem, InputDocument
|
||||
from pyrogram.raw.types import (
|
||||
InputStickerSetShortName,
|
||||
InputStickerSetItem,
|
||||
InputDocument,
|
||||
)
|
||||
from pyrogram.raw.types.messages import StickerSet
|
||||
|
||||
from pagermaid.listener import listener
|
||||
@ -10,26 +14,25 @@ from pagermaid.enums import Message
|
||||
|
||||
class NoStickerSetNameError(Exception):
|
||||
"""
|
||||
Occurs when no username is provided
|
||||
Occurs when no username is provided
|
||||
"""
|
||||
|
||||
def __init__(self, string: str = "贴纸包不存在"):
|
||||
super().__init__(
|
||||
string
|
||||
)
|
||||
super().__init__(string)
|
||||
|
||||
|
||||
async def get_pack(name: str):
|
||||
try:
|
||||
return await bot.invoke(GetStickerSet(
|
||||
stickerset=InputStickerSetShortName(short_name=name),
|
||||
hash=0
|
||||
))
|
||||
return await bot.invoke(
|
||||
GetStickerSet(stickerset=InputStickerSetShortName(short_name=name), hash=0)
|
||||
)
|
||||
except Exception as e: # noqa
|
||||
raise NoStickerSetNameError() from e
|
||||
|
||||
|
||||
async def create_sticker_set(sticker_set: str, title: str, is_animated: bool, is_video: bool, stickers):
|
||||
async def create_sticker_set(
|
||||
sticker_set: str, title: str, is_animated: bool, is_video: bool, stickers
|
||||
):
|
||||
try:
|
||||
await bot.invoke(
|
||||
CreateStickerSet(
|
||||
@ -61,8 +64,9 @@ async def process_old_sticker_set(sticker_set: str):
|
||||
access_hash=i.access_hash,
|
||||
file_reference=i.file_reference,
|
||||
),
|
||||
emoji=hash_map.get(i.id, "👀")
|
||||
) for i in pack.documents
|
||||
emoji=hash_map.get(i.id, "👀"),
|
||||
)
|
||||
for i in pack.documents
|
||||
]
|
||||
return stickers, is_animated, is_video
|
||||
|
||||
@ -73,12 +77,17 @@ async def process_old_sticker_set(sticker_set: str):
|
||||
description="复制某个贴纸包",
|
||||
)
|
||||
async def copy_sticker_set(message: Message):
|
||||
if (not message.reply_to_message) or (not message.reply_to_message.sticker) or (
|
||||
not message.reply_to_message.sticker.set_name):
|
||||
if (
|
||||
(not message.reply_to_message)
|
||||
or (not message.reply_to_message.sticker)
|
||||
or (not message.reply_to_message.sticker.set_name)
|
||||
):
|
||||
return await message.edit("请先回复一张需要复制的贴纸包的贴纸")
|
||||
sticker_set = message.reply_to_message.sticker.set_name
|
||||
if len(message.parameter) < 2:
|
||||
return await message.edit("请指定贴纸包链接和贴纸包名称,例如 <code>xxxx_sticker xxxx 的贴纸包</code>")
|
||||
return await message.edit(
|
||||
"请指定贴纸包链接和贴纸包名称,例如 <code>xxxx_sticker xxxx 的贴纸包</code>"
|
||||
)
|
||||
set_name = message.parameter[0]
|
||||
name = " ".join(message.parameter[1:])
|
||||
try:
|
||||
@ -86,4 +95,6 @@ async def copy_sticker_set(message: Message):
|
||||
await create_sticker_set(set_name, name, is_animated, is_video, stickers)
|
||||
except Exception as e:
|
||||
return await message.edit(f"复制贴纸包失败:{e}")
|
||||
await message.edit(f"复制贴纸包成功 <a href=\"https://t.me/addstickers/{set_name}\">{name}</a>")
|
||||
await message.edit(
|
||||
f'复制贴纸包成功 <a href="https://t.me/addstickers/{set_name}">{name}</a>'
|
||||
)
|
||||
|
@ -13,11 +13,11 @@ POLICY_ID = {}
|
||||
|
||||
class Area:
|
||||
def __init__(self, data):
|
||||
self.name = data['name']
|
||||
self.today = data['today']
|
||||
self.total = data['total']
|
||||
self.grade = data['total'].get('grade', '风险未确认')
|
||||
self.children = data.get('children', None)
|
||||
self.name = data["name"]
|
||||
self.today = data["today"]
|
||||
self.total = data["total"]
|
||||
self.grade = data["total"].get("grade", "风险未确认")
|
||||
self.children = data.get("children", None)
|
||||
|
||||
@property
|
||||
async def policy(self):
|
||||
@ -25,9 +25,11 @@ class Area:
|
||||
|
||||
@property
|
||||
def main_info(self):
|
||||
return f"**{self.name} 新冠肺炎疫情情况** ({self.grade})\n\n" \
|
||||
f"`😔新增确诊:{self.today['confirm']}`\n" \
|
||||
f"`☢️现存确诊:{self.total['nowConfirm']}`"
|
||||
return (
|
||||
f"**{self.name} 新冠肺炎疫情情况** ({self.grade})\n\n"
|
||||
f"`😔新增确诊:{self.today['confirm']}`\n"
|
||||
f"`☢️现存确诊:{self.total['nowConfirm']}`"
|
||||
)
|
||||
|
||||
|
||||
class AreaList(Dict):
|
||||
@ -38,46 +40,44 @@ class AreaList(Dict):
|
||||
class NewsData:
|
||||
def __init__(self):
|
||||
self.data = {}
|
||||
self.time = ''
|
||||
self.time = ""
|
||||
|
||||
async def update_data(self):
|
||||
url = "https://api.inews.qq.com/newsqa/v1/query/inner/publish/modules/list?modules=statisGradeCityDetail,diseaseh5Shelf"
|
||||
res = await client.get(url)
|
||||
if res.status_code != 200:
|
||||
return
|
||||
data = res.json()['data']['diseaseh5Shelf']
|
||||
data = res.json()["data"]["diseaseh5Shelf"]
|
||||
|
||||
if data['lastUpdateTime'] != self.time:
|
||||
|
||||
self.time = data['lastUpdateTime']
|
||||
if data["lastUpdateTime"] != self.time:
|
||||
self.time = data["lastUpdateTime"]
|
||||
self.data = AreaList()
|
||||
|
||||
def get_data(data_):
|
||||
|
||||
if isinstance(data_, list):
|
||||
for i in data_:
|
||||
get_data(i)
|
||||
|
||||
if isinstance(data_, dict):
|
||||
if area_ := data_.get('children'):
|
||||
if area_ := data_.get("children"):
|
||||
get_data(area_)
|
||||
|
||||
self.data.add(Area(data_)) # noqa
|
||||
|
||||
get_data(data['areaTree'][0])
|
||||
get_data(data["areaTree"][0])
|
||||
return
|
||||
|
||||
|
||||
async def set_pid():
|
||||
url_city_list = 'https://r.inews.qq.com/api/trackmap/citylist?'
|
||||
url_city_list = "https://r.inews.qq.com/api/trackmap/citylist?"
|
||||
resp = await client.get(url_city_list)
|
||||
res = resp.json()
|
||||
|
||||
for province in res['result']:
|
||||
if cities := province.get('list'):
|
||||
for province in res["result"]:
|
||||
if cities := province.get("list"):
|
||||
for city in cities:
|
||||
cid = city['id']
|
||||
name = city['name']
|
||||
cid = city["id"]
|
||||
name = city["name"]
|
||||
POLICY_ID[name] = cid
|
||||
|
||||
|
||||
@ -85,10 +85,10 @@ async def get_policy(uid):
|
||||
url_get_policy = f"https://r.inews.qq.com/api/trackmap/citypolicy?&city_id={uid}"
|
||||
resp = await client.get(url_get_policy)
|
||||
res_ = resp.json()
|
||||
if res_['message'] != 'success':
|
||||
if res_["message"] != "success":
|
||||
return "数据获取失败!"
|
||||
try:
|
||||
data = res_['result']['data'][0]
|
||||
data = res_["result"]["data"][0]
|
||||
except IndexError:
|
||||
return "暂无政策信息"
|
||||
return f"出行({data['leave_policy_date']})\n{data['leave_policy']}\n\
|
||||
@ -99,9 +99,7 @@ async def get_policy(uid):
|
||||
NewsBot = NewsData()
|
||||
|
||||
|
||||
@listener(command="covid",
|
||||
description="获取新冠疫情信息。",
|
||||
parameters="[地区]")
|
||||
@listener(command="covid", description="获取新冠疫情信息。", parameters="[地区]")
|
||||
async def covid_info(message: Message):
|
||||
global POLICY_ID, NewsBot
|
||||
if not POLICY_ID:
|
||||
|
317
crazy4/main.py
317
crazy4/main.py
@ -4,167 +4,166 @@ from pagermaid.listener import listener
|
||||
from pagermaid.enums import Message
|
||||
|
||||
crazy4_data = [
|
||||
"大家好,我是秦始皇,其实我并没有死,我在西安有100000吨黄金,今天肯德基疯狂星期四,我现在需要有人来请我吃29.9块钱8只蛋挞。我明天直接带部队复活,让你统领三军!",
|
||||
"花2000w可以让lex账号解封\n花200w可以让hololive回归\n花20w可以给东雪莲上10个月总督\n花2w可以让女生不用在厕所生孩子\n花2000可以去华东理工大学买一副耳机\n花200可以买一副VR眼睛在厕所求导\n那花50呢?能让我愉快的渡过一个疯狂星期四吗?\n可以,KFC疯狂星期四鸡排桶仅需49.9!\nV我50,助我度过一个快乐的疯狂星期四!",
|
||||
"我是盗号的 我把这个人的号盗了 但是我看了这个人的聊天记录 发现他过得非常艰苦 他的吃住一直很烂 我看到大家的生活都很富足 我希望有人看见了能救济他一下 请他吃一顿肯德基疯狂星期四 就这样吧 眼眶都湿润了 我下了",
|
||||
"离婚这么多年了,竟然在群里遇到你了,你过得挺好我也就放心了。孩子上四年级了,成绩一直都很好,连续三年拿班上第一名,就是性格像你,每次生气就逃避,孩子总问妈妈什么时候来参加家长会!有时间就来看看孩子吧,多陪陪孩子,孩子今天想吃肯德基,因为今天是肯德基疯狂星期四,v我40,我请孩子吃。",
|
||||
"扒个群里的渣男,我有个朋友被群友睡了,大概在三个月以前吧,我朋友在群里认识了一个男的,他们在网上聊了差不多两个星期左右就见面了,而且第一次见面就去了宾馆,之后的每个星期六日都会去,就这样持续了好几个月。我朋友给那个男的说,已经一个多月没来大姨妈了,想不到这句话说完,隔天就找不到男的了,手机一直打不通,关机,直到我朋友前几天跟父母坦白这件事情,那天晚上我偷偷给她买了验孕棒一看,真怀孕了。然后我第二天请假一天,专门跟她聊这个事,她说那个男的对她很好很好什么的,我说对你好还不是想玩你,实在不行就报警吧。她当时听完这句话就趴桌子上大哭。正当我打开手机想报警的时候,不小心打开了肯德基,想起来今天原来是疯狂星期四,所以说谁请我肯德基?吃完我继续说",
|
||||
"实不相瞒我结婚七年了,他不爱我也不放过我,孩子从小被H集团幕后掌托人也就是他爷爷奶奶带走,所有人都阻拦我见孩子,一场车祸我失去了所有记忆,只记得我好想他,夜不能寐,茶饭不思,寝食难安,重复做着我带着他去吃肯德基疯狂星期四的梦,所以能请我吃肯德基疯狂星期四帮我恢复丢失的记忆吗……",
|
||||
"袜!好神奇的功能耶!私信给我发送“疯狂星期四”就可以得到我的一句“你请我吃”!真的好神奇!!友友们快来试试吧!!!",
|
||||
"狗的叫声是汪汪汪 猫的叫声是喵喵喵 牛的叫声是all I want for Christmas is you 星期四的叫声是抽一位幸运儿请我肯德基疯狂星期四",
|
||||
"我都明白 我是选项E 我是planB 是分叉的头发 洗衣机流出的泡沫 超市里被捏碎的饼干 是吃腻的奶油 是落寞的城市 是地上的草 我是被踩踏的 是西装的备用扣 是被雨淋湿的小狗 是腐烂的橘子 是过期的牛奶 是断线的风筝 是被随意丢弃的向日葵 是沉默寡言的小朋友 所以能v我40吗 今天肯德基疯狂星期四",
|
||||
"穿过挪威的森林,让我走进你的梦里,夕阳落在我的铠甲,王子不一定骑白马,现在是中午十二点四十四分,你不必故作冷淡,我也不想做最后的纠缠。最后问一句,疯狂星期四,谁请我吃肯德基?",
|
||||
"刚给女朋友洗完衣服 手搓的 平时洗之前手要消5遍毒 今天因为漏了一遍被女朋友打了两巴掌 现在心里有点委屈 今天我决定反击疯狂星期四 吮指原味鸡9.9两块 葡式蛋挞 8块29.9 黄金鸡块20块19.9谁请我吃 我边吃边跟你说我平时在家里都怎么受罪的",
|
||||
"肯德基给你们多少钱了,让你们周周给编段子,疯狂星期四真的那么有诱惑力?我偏不信,v我50,我去试试",
|
||||
"我本是显赫世家的奥特曼,却被诡计多端的怪兽所害!奥特曼家族弃我!奥特之父逐我!甚至断我伽马射线!重生一世,今天肯德基疯狂星期四!谁请我吃?",
|
||||
"蛮讽刺的,从凌晨开始等到现在,没有一个人和我说生日快乐,我的亲人没有说,朋友也没有说,我最在乎的人也没有说,直到现在我才明白原来今天不是我生日。但是今天是肯德基疯狂星期四!谁请我吃?",
|
||||
"我独自一人远离家乡来到成都上学,同学欺我,老师骂我,舍友打我,我流浪在晨风街头,衣衫褴褛,身无分文,活得不如一条流浪狗。天地浩大,却没有我的容身之处。我想问一问苍天,今天肯德基疯狂星期四,谁请我吃?",
|
||||
"老师问三个学生,你们用什么东西可以填满一整个房间。第一个学生找来稻草铺满地板,老师摇了摇头。第二个学生找来一根蜡烛点燃,屋子里充满了光,老师还是摇了摇头,因为学生的影子没有被照到。这时第三个学生拿出肯德基疯狂星期四的黄金小酥肉,顿时香味充满了整个房间",
|
||||
"肯德基这逼养的,怎么又到了星期四,我开始留头发,减重,换风格,开始往前冲,不好意思啊,这一次,肯德基疯狂星期四,我一定要吃。我本是显赫世家的少爷,却被诡计多端的奸人所害!家人弃我!师门逐我!甚至断我灵脉!重生一世,今天肯德基疯狂星期四!谁请我吃?Bro别他妈垂头丧气了知道今天是什么日子吗?今天是肯德基fucking crazy Thursday!吮指原味鸡30块钱4个Bro,v我60,我他妈要吃8个。",
|
||||
"我想问一下大家,之前朋友找我借钱,前后加起来有大概七万(够立案)但是没有借条也没有字据,微信也早已互删没有任何关于借的字眼,只有支付宝上还有转账记录,我妈刚让我把转账记录发给他看一下的时候,我点支付宝点歪了,不小心点开了肯德基,发现今天是疯狂星期四,谁请我吃?",
|
||||
"我在兰州拉面馆愤怒的甩开了筷子\n-老板,怎么一点肉没有 \n-穷逼事儿还挺多,十几块你能吃到什么肉?\n被羞辱的我,痛苦,落泪,难受,突然 我看到了一个广告:19.9,疯狂星期四,20个鸡块,兰州拉面一周的肉量!谁!谁请我吃!",
|
||||
"被群成员冷暴力半年,最近没有怎么哭了,慢慢变好了……以前有多快乐,现在就有多难过。从人间烟火的日常,到红着眼睛告别,消失在彼此的世界里,很痛,也很难。今天是肯德基疯狂星期四,v我60,抚慰我支离破碎的心",
|
||||
"最讨厌网络乞丐了,想吃星期四疯狂肯德基的不会自己买吗,什么都伸手要,觉得我说的对的请给我点一份。",
|
||||
"你跟你女朋友开房,裤子一脱你女朋友花容失色的质问你:你不是说你有18cm吗?怎么这么小?你说:因为今天是肯德基疯狂星期四活动满18减15。",
|
||||
"前段时间为了提升自己的文化素养,我给自己报了个书法培训班。因为跟我同期的都是小学生所以大家就有点排挤我,看不上我这么大年纪还在学这个。本来也没什么,但小学生的恶意真的超乎我的想象,他们说我老女人半只脚进棺材还来学书法,我听到都气哭了。我擦干眼眼泪不管他们继续练字,我发誓我一定要练出一笔好字,不能让钱白花。我凝神静气,在纸上认真写出了一行字:今天肯德基疯狂星期四,谁请我吃?",
|
||||
"我有时候会觉得大家并不喜欢那个真正的我。在网络上,我总是善于伪装,看起来每天都很快乐,无忧无虑,没有烦恼。我的生活也看起来很简单,没有很多人向往的灯红酒绿,纸醉金迷。我很宅,喜欢打游戏,现实中的我并不像网上这么有趣。我其实话很少,最爱干的事是一个人发呆。这样枯燥的我,真的会被大家喜欢吗?我很疑惑。\n如果你们能一层一层剥开我的内心,你们会发现,那颗心里写满了一句话:今天肯德基疯狂星期四,谁请我吃?",
|
||||
"生了孩子以后一直瘦不下去,老公像变了一个人似的,对我又打又骂,我好恨他,正当我打开手机想报警的时候,不小心打开了肯德基,想起来今天原来是疯狂星期四,所以说谁请我肯德基?吃完我继续讲",
|
||||
"他本是豪门少爷\n在新婚前夜却发现未婚妻和兄弟在喜床上翻滚\n她深夜买醉却撞上醉酒的他\n一夜痴缠他醒来后不见她的踪影\n只见床头压着一张纸:\n今 天 肯 德 基 疯 狂 星 期 四",
|
||||
"家人们,求助\n12月求姻缘应该去哪个寺庙?\nA、灵隐寺\nB、弘法寺\nC、甘露寺\nD、肯德基疯狂星期寺 ",
|
||||
"某个人不回消息永远别回了,终究是我不重要了吗?难道你心里就不明白吗?不然我整天闲得来找你聊天,我不会找别人聊天吗?你以为我天天闲得慌吗?我如此的喜欢你,你却对我无动于衷,这甜甜的恋爱,你到底打不打算要了?如果你还在意我,今天肯德基疯狂星期四,如果请我吃,我就原谅你",
|
||||
"时间让我长了年岁,却没有让我成为一个合格的大人。我以为我的十八岁,会工作稳定,收入可观,和喜欢的人去看山河大海,落日余晖。没想到,到了谈婚论嫁的年龄,我却仍在找自己的路上。今天肯德基疯狂星期四,谁请我吃?",
|
||||
"消息回得慢大家请理解,今天疯狂星期四,我在炸吮指原味鸡!",
|
||||
"我本是上市公司的老总,却被诡计多端的奸人所害!下属弃我!股东逐我!甚至清空我的股份!重来一生,我只想夺回我的公司!今天肯德基疯狂星期四,谁请我吃?",
|
||||
"后来不是报警了吗!那个男的隔了一个星期才找到,把他的父母和我朋友的父母喊到警察局里商量这件事到底怎么办,要不就结婚把这个孩子生下来,要么就打掉并赔偿我朋友30w,男方不想要这个孩子,但是父母手头也没有这多钱,硬着头皮跟我朋友结婚了,彩礼才拿了八万,结婚后男的经常不归家,在外面玩,我朋友挺着大肚子在家真的不容易,然后我实在看不下去了,就去照顾我朋友,我准备拿起手机给他打电话,又不小心点开肯德基,才想起来今天是肯德基Fucking Crazy Thursday疯狂星期四,谁请我吃我继续说",
|
||||
"男朋友跟我分手了,我心碎了决定见她一面把事情说清楚如果她非要分手我也无话可说。到了她家门口,死活不出来。我只是一片凋零的落叶,随着风飘落,我时常在想我的凋零是我自己的选择,还是风不挽留,就像茫茫大海里的一条孤单的鱼没有人会关心我,没有人会想念我。如果有一天我被人类发现,也许是我的生命走到了尽头,人类是贪婪的,是有欲望的,鱼在他们眼里是无尽的财富海洋资源在他们眼里是赖以生存的摇钱树,有人捕鱼,有人抓蚌壳,蚌壳那么不容易,她用自己的血肉磨出了珍珠,一颗又一颗,说到珍珠,你愿不愿意转我十块钱买一杯珍珠奶茶给我这条小鱼,哎看来我是一条无人疼爱的小鱼,不过是一条无人关心无人疼爱无人喜欢无人给我买奶茶的可怜巴巴的小鱼。我心如死灰在大街上游荡,打开手机看到了我们的恩爱时光泪流满面,忽然注意到手机上显示的时间,才发现今天是肯德基疯狂星期四,谁请我吃?",
|
||||
"我本是夜上海的一名贫穷又自强的黄包车夫,看遍了这个城市的繁华和热闹,也体验了这个社会的冷漠与无情。直到那一天,我的车上坐上了一位穿着四季歌的千金小姐,我感到了我平静已久的内心再一次颤动,我知道不应该,但我却还是爱上了。我知道我的身份地位配不上她,只求有个好心人给我39.9,让我买一个疯狂星期四热辣鸡桶,带给她舔狗的关怀。",
|
||||
"今天,是我人生中最黑暗,最emo的时候,但是我很难把朋友当成垃圾桶或者树洞去倾诉,更喜欢憋着自己消化,睡一觉第二天醒来就好了,不想连累别人不想把负面情绪传递给身边的朋友。但是,我更希望朋友能够给予我物质层面的帮助,今天是肯德基疯狂星期四,有哪个朋友愿意请我吃肯德基吗?",
|
||||
"你不用故作冷淡,我没有想过继续纠缠你了,最后一次了,真的,最后一次了,借我10元子,今天是肯德基疯狂星期四吮指原味鸡+黄金脆皮鸡才九块九,我是真的不想错过。",
|
||||
"扒个群里的渣女,我有个朋友被群友睡了,大概是三个月以前吧,我朋友在群里认识了一个女的,他们在网上聊了差不多两个星期左右就见面了,而且第一次见面就去宾馆了 ,之后的每个星期六星期天都会去,就这样持续了好几个月,我朋友给那个女的说,已经一个多月没奖励自己了,想不到这句话说完,隔天就找不到那个女的了,手机一直打不通,关机,直到我朋友前几天跟她父母坦白这件事情,我朋友就在旁边一直哭,那天晚上我偷偷给他买了个石原里美同款,还是没奖励自己了,然后我第二天请假一天,专门给他聊这个事,他说那个女的对他很好很好什么的,我说对你好还不是想玩你,实在不行抱树吧,他当时听完这句话就趴桌子上大哭,正当我打开手机想抱树的时候,不小心打开了肯德基,想起来今天原来是肯德基疯狂星期四,所以说谁请我肯德基?吃完我继续说",
|
||||
"吃完后,她下决心去打掉这个负心汉的孩子,到医院检查后发现并没有怀孕,此刻的她不知是喜是悲;出了医院门口,她心里五味杂陈,决定再打最后一次电话就放过自己,电话竟然接通了,接电话的是个陌生男声,说机主癌症晚期已经去世,整理遗物时发现了没电的手机和一张合照,手机刚刚开机就接到了电话,她接电话的手都颤抖了,这个消息犹如晴天霹雳,久久不能平复;她见到了心心念念的他,安静的躺在床上,枕边是两人的合照,照片背面写着“此生最爱的*”此刻的她再也忍不住,大哭起来,对于她来说,这个星期四是黑暗星期四,痛失所爱,唯一能让她心情舒缓些的就是肯德基的疯狂星期四,v60我,她吃完肯德基继续说",
|
||||
"和你分手7年了,你还是那个能影响我情绪的人,我还留着我们的合影,还记得你的生日,我有过无数次想去找你的冲动,可还是忍住了,这条消息我不屏蔽你,因为我是你永远的黑名单,可是我爱你,从过去到现在,整整爱了你八年,但是,现在我一点也不难过,因为我压根不知道这是谁写的,也不知道这女孩是谁,我只是想顺便告诉你:今天疯狂星期四,我想吃肯德基",
|
||||
"男朋友跟我分手了,我心碎了,决定见他一面把事情说清楚,如果他非要分手我也无话可说。我买了去上海的机票,坐了两个小时的飞机,到了之后却因为疫情被封小区了他出不来。我心如死灰在大街上游荡,打开手机看到了我们的恩爱时光泪流满面,忽然注意到手机上显示的时间:今天肯德基疯狂星期四,谁请我吃?",
|
||||
"感觉你们好有趣啊,不像我,不仅连句话都搭不上,还要被当成破坏氛围的傻狗,我现实生活中自闭没朋友,哪怕是在网上也受尽冷眼,每次组织了半天的语言都如鲠在喉,最后还是默默删掉了看你们互动,你有说有笑的样子不知道为什么在我眼里这么刺眼,融入不了群体的我,躲在屏幕后面默默哭出来了,所以今天是肯德基疯狂星期四有好心人请我吃吗",
|
||||
"劝大家别买iPhone13,这样省下好几千,能吃好多顿肯德基,你用苹果只会让人酸让人骂,吃肯德基只会让人羡慕。好了,明天肯德基疯狂星期四,谁请我吃",
|
||||
"有人问我为什么不处王者荣耀cp,我哪敢处CP呀,姐姐动不动就想喝奶茶,天天还想吃外卖,一到半夜就开始回忆前任。出一个皮肤就喜欢一个,天天还要让我等她和其它哥哥弟弟们打完排位,打的菜不说还有逼脸把气撒在我身上。处CP的门槛太高了,不但要声音好听,还要长得好看,睡觉还要连麦亲亲才肯睡,我长这么大就没受过这罪。所以今天是肯德基疯狂星期四,能请我吃安慰下我吗?",
|
||||
"有劳斯莱斯的朋友,可登录劳斯莱斯APP,选择中国界面,滑动页面有一个虎年迎新春,填写手机号码,送飞天茅台53度 1支。\n保时捷车主公众号左下角点进去上传行驶证上的车架号就能抽奖,奖品最低300京东卡,部分朋友有保时捷的可以领一下。\n没有劳斯莱斯和保时捷的同学,打开肯德基APP,今天是疯狂星期四。",
|
||||
"接apex代打\n288块上猎杀,如果没上猎杀退248块,留40辛苦费,有需要的直接给40块就可以了,号也不用给我,反正打不出,省的得退钱了,麻烦要打快点,我马上要路过肯德基店了,今天是疯狂星期四。",
|
||||
"✨疯狂星期四✨\n\n❤️活力周四✨激四情射❤️\n\n❤️想不想搞大我的肚子❤️\n\n❤️转我100✨吃肯德基❤️",
|
||||
"今天是疯狂星期四,转发KFC宣传到5个群,肯爷爷会根据你绑定的QQ号,给你送一个全家桶,我试过了,是假的,但上班摸鱼闲着也是闲着,不如挨顿骂",
|
||||
"肯德基这逼养的,怎么又到了周四,这一次,肯德基疯狂星期四,我一定要吃,我本是显赫世家的少爷,却被诡计多端的奸人所害!家人弃我!师门逐我!甚至断我灵脉!重生一世,今天肯德基疯狂星期四!谁请我吃?家人们,别他妈垂头丧气了!知道今天是什么日子吗?今天是肯德基fucking crazy Thursday!吮指原味鸡10块钱2个,家人们v我100,我他妈要吃20个!",
|
||||
"你好,我是奥特曼,我正在外星和敌人战斗!没有能量了!听说今天肯德基疯狂星期四,我现在需要有人给我带29.9块钱4个的吮指原味鸡补充能量。恢复后我请你来外星做客。",
|
||||
"早上刚起床洗了个澡,看到外头的阳光真不错,我来不及穿上衣服就打开了窗帘,欣赏起了日光下的美景,我双手叉腰晒了会儿日光浴,时间一点点过去,身上差不多干了。看着大好风光,我拿起手机,想要拍下这令人心情舒适的景色,却不小心点开了肯德基APP,发现今天是疯狂星期四,谁请我吃?",
|
||||
"你们都不出来聊天什么意思?有这么忙么?疯狂星期四的劲爆鸡米花难道是你们在炸?",
|
||||
"正在循环播放《群主请不请我们吃肯德基疯狂星期四》\n●━━━━━━───1:23\n⇆ ◁ ❚❚ ▷ ↻",
|
||||
"你觉得这个群有什么问题?\n○违法违禁\n○低俗\n○赌博诈骗\n○血腥暴力\n○人身攻击\n○青少年不良信息\n●没有人请吃肯德基\n○有其他问题",
|
||||
"认清一个失败的人生,源自于你发现无论复读多少遍肯德基疯狂星期四都不会有人请你吃的瞬间",
|
||||
"世界上现在77亿人,有253亿只(养殖的)鸡,是人的数量的三倍。也就是说,每个人平均可以得到三只鸡。请记住,不管你有多么孤独,这世界上的某个角落里有三只鸡是为你而生的,就算它们死了,立刻又会有同类补上,就算你一个朋友都没有,你还有三只鸡。今天是肯德基疯狂星期四,V我60,我帮你去谢谢鸡。",
|
||||
"想起来我十几岁的时候,我逢人就说爱和自由比什么都重要,我说我要肆意妄为,要志得意满,要遨游山川和湖海。晚餐时,店老板问我要什么,我说要世间所有的烂漫,开个玩笑,现在我长大了,我要肯德基疯狂星期四,谁请我吃?",
|
||||
"疯狂星期四文学不就是网络乞丐吗?最讨厌网络乞丐了,想吃肯德基的不会自己买吗?什么都伸手要,觉得我说得对的给我点一份",
|
||||
"正确约炮的标准流程:一般都上午10点以后,女的打扮打扮,男的取点钱,见面了,女的假装不好意思,男的一般都夸女的比照片好看,然后问女的爱吃啥,就领吃饭去了,男的开始展示自己的幽默然后溜达,看电影,一晃一下午女的也不说回家。男的寻思这是没跟我呆够啊,就说咱俩唱歌去吧,女的说太晚了,男的说没事一会我送你回家。一般这阶段男的不会把女的咋地,这时候时间也有点晚了,男的说走吧我送你回家,女的还得寻思,这男的是没看上我啊,心里有点小失落两人心里就开始寻思怎么能不回家。男的说这么晚了,你回家我也不放心啊,我有点没待够,女的说我必须得回家,男的说我送你,结果两人墨迹墨迹的10分钟没走几米。后来女的说我回不去家了,理由可能是寝室关门了,或者朋友对象回来了,男的一本正经的说,要不我给你找个宾馆吧,女的说,不过你得答应不碰我,男的说,放心吧,我不是坏人,然后微微一笑深藏功与名。然后两人就进宾馆了,先聊会天看会电视,男人时不时的说女的,你长的真好看,男的说,你明天还上班或者上学,早点睡吧,女的还得装不好意思,男的说我能抱着你睡么,什么也不干。女的说行,男的就狠狠的抱着女的说,亲爱的,我这么抱着你,你就不冷了,女的也抱上了,男的说我可以亲你吗,女的也默认了,可是一般这时候还不会发生啥。这时候男的想有进一步的动作,开始脱女的衣服,脱到底线,女的这时候开始拒绝,推开这个男的,男的一看情行不行,就说宝贝对不起,我太冲动了,你要知道我是个男的,何况你还长的这么好看。女的这时候就把男的当亲人,讲述自己情路坎坷,人生迷茫,男的这时候就开始展现自己的温柔,宝贝你要是早遇见我就好了,一定不会让你吃这么多苦,你别怕,还有我呢。突破了女的的心灵防线,大家就都放的开了,女的开始亲男的,然后男的翻身小声说道:今天肯德基疯狂星期四可以请我吃嘛?",
|
||||
"我是爸妈捡来的,现在18岁,不是亲生的自己也知道。我姐今年27了读研读博所以现在还没谈男朋友,我妈突然就跟我说,等你毕业了,你姐姐要还没有对象你就跟你姐结婚吧。我当时还在看书听到这话吓得我魂都丢了,果断说不行,我妈就说先别急听我讲完!你要和你姐结婚了,不用担心你姐对你不好,第二你姐姐也不会有婆媳矛盾,第三也不会因为任何原因离开你离开家。第四你不用养双方父母,将来爸妈生病了你们可以一起照顾,第五知根知底你姐姐还没谈过对象是干净的。她讲完我就沉默了,确实除了不相爱以外全是利没有弊,我找不出任何反驳的理由,本来想说我们没有那种感情只有亲情,母亲后来就说你以后也不一定就能遇到爱你爱的死去活来的人,大家相亲结婚不就是奔着凑合着过的念头才在一起吗?我现在就挺乱的吧,也不知道咋整不知道该怎么办才好……正当我打字到这里的时候,我有点饿了想吃麦当劳,今天疯狂星期四,谁请我吃",
|
||||
"刚给婆婆洗完衣服,手搓的,平时洗之前手要消5遍毒,今天因为漏了一遍,被婆婆打了两巴掌,现在心里有点委屈,今天疯狂星期四谁,请我吃 KFC,我边吃边跟你说她平时都怎么家暴我的",
|
||||
"车子千万不要外借!我真是吃了大亏了!朋友找我借车,碍于面子不好意思不借,结果昨天在路上遇见了,一点都不爱惜我的车,上坡还站起来蹬车,链子都掉了!气死我了!幸好今天是肯德基疯狂星期四,有人请我吃我感觉会好点",
|
||||
"就像著名音乐家约翰·列侬说过的这样一段话:“5岁时,妈妈告诉我,人生的关键在于快乐。上学后,人们问我长大了要做什么,我写下快乐。他们告诉我,我理解错了题目。我告诉他们,他们理解错了人生。”生活本身如同一潭死水。没有泛起一丝丝涟漪的可能。其实相对于普通人来说,快乐、高薪体面、基本的节假日等都很难得。退而求其次,能在楼下的KFC享受到限时的疯狂星期四优惠让很多人心满意足,变胖也无所谓。今天原来是肯德基疯狂星期四,所以说谁请我肯德基?吃完我继续说。",
|
||||
"今天,是我一生中最黑暗、最黑暗的时光,但我发现很难像对待垃圾桶或木洞一样对待朋友说话,更喜欢消化自己,第二天睡觉又醒来,甚至不想累别人,不想把负面情绪传递给身边的朋友。不过,我想让朋友给我物质上的帮助,今天是肯德基疯狂的星期四,有朋友想邀请我吃肯德基",
|
||||
"我本是官位世家的陈塘关公主,却被诡计多端的奸人所害!家人弃我!师门逐我!甚至断我灵脉!重来一生,今天肯德基疯狂星期四!谁请我吃?",
|
||||
"今天复制的内容好少,大家都很忙吗?还是大家都太会装了,我分不清,这个社会就是这样,真真假假,假假真真,但不论如何今天是疯狂星期四,我吃肯德基你呢?",
|
||||
"王力宏给前妻赔1.5亿,薇娅偷税漏税罚款13.41亿,我都怀疑是不是通货膨胀没带上我,不然为啥大家一出手都几个亿,我想吃肯德基,还得等疯狂星期四。",
|
||||
"人类的坚韧性体现在,虽然从没有人请过我疯狂星期四,但我每周四都会发",
|
||||
"“我有点想你,你呢?”前男友刚刚给我发来了这条消息,忽然间有些恍惚。好像我们还在一起。那三年里,我们一起放羊,一起喂猪,一起下地插秧。他亲手制作的那一大束大蒜花捧美如繁星。我难以忘记,我们分开的那一天,他发来的最后一条信息:今天肯德基疯狂星期四谁请我吃?",
|
||||
"你知道有多少生命在消失殆尽吗?你知道有多少家庭支离破碎吗?你知道有多少流浪狗没有找到家庭就消失的痛苦吗?你不知道。但是没有关系,今天就是肯德基疯狂星期四了,你请我吃",
|
||||
"今天下班的路上遇到了一个很有风度的男人,在路边车辆飞驰而过时,他一把拉住我将我护在背后,飞溅的污水滴全都砸在他的阿玛尼西装背后。看着他高大英俊的身影,我有些恍惚,想起了老公腆着啤酒肚的邋遢相貌。我慌忙道谢,他只是笑着摆摆手说没关系,美丽的女士应该得到这个待遇。我感动的说不然你留个联系方式,我把西服洗干净后还给你,他没有拒绝,递给了我一张名片。一种异样的感情开始在心里萌芽,等他走后我开始仔细端详名片,只见上面赫然写着:今天肯德基疯狂星期四,谁请我吃?",
|
||||
"讲真的,今年已经到了十二月了,我经常不敢相信自己已经快奔三了,身边的人都在往前走,恋爱,工作,谈婚论嫁,只有我好像还停留在十年前的时光里,喜怒哀乐仍然在我的脸上,时间让我长了年岁,却没有让我成为一个合格的大人。我以为我的24岁,会工作稳定,收入可观,和喜欢的人去看山河大海,落日余晖。没想到,到了谈婚论嫁的年龄,我却仍在找自己的路上。所以,今天肯德基疯狂星期四,有没有好心人请我吃?",
|
||||
"在茫茫的大草原上,有一群羚羊,他们正准备穿过这片寸草不生的沼泽地,去往南方过冬,这时候有一只领头羊似乎注意到了什么,抬头望向远方,两只前蹄不断地在地上来回踱步,其他羊见状也都停下了脚步。这时一只壮硕的公羊走了上来,两羊的脑袋凑到一起,似乎在讨论着什么。忽然,只见领头羊一声呐喊,随即飞快地向一个地方奔跑,其他羊也迅速做出反应。羊蹄声夹杂着泥水飞溅的声音,记者们听见了一句这辈子都没听见的话:冲啊!肯德基疯狂星期四开始啦!",
|
||||
"你想象一下,如果十年之后你结婚了,小孩很烦,你老公是你并不是很喜欢的人,天天下班对着这个无趣的男人,没有沟通的欲望,孩子衣食住行要你管,不听话要你教,那个时候你会不会后悔今天没有点开我的头像发一句:今天肯德基疯狂星期四,我请你吃",
|
||||
"独自一人远离家乡在深圳打工,同事欺我,老板骂我,顾客打我,我流浪在上下九街头,衣衫褴褛,身无分文,活得不如一条流浪狗。天地浩大,却没有我的容身之处。我想问一问苍天,今天肯德基疯狂星期四,谁请我吃?",
|
||||
"今日は、私の人生の中で最も暗く、最も暗い時ですが、ゴミ箱や木の穴のように友達に話すのは難しいことに気づきました。むしろ自分を消化して、翌日寝て目を覚まして、他人に疲れたくもなく、マイナスの感情を周りの友達に伝えたくありません。でも、友達に物質的な助けをしてもらいたいです。今日はケンタッキーのクレイジー木曜日です。一部の友達はケンタッキーをおごってもらいたいです。",
|
||||
"仲間に冷たく暴力を振るわれて半年、最近あまり泣かなくなって、だんだんよくなってきた……以前はどんなに楽しかったか、今はどんなに悲しいか。人間花火の日常から、目を赤くして別れを告げ、お互いの世界に消えていくまで、痛くて、難しい。今日はKFC狂乱木曜日、zfb転我50、慰撫我支離滅裂的心。",
|
||||
"世界上现在77亿人,有253亿只(养殖的)鸡,是人的数量的三倍。也就是说,每个人平均可以得到三只鸡。请记住,不管你有多么孤独,这世界上的某个角落里有三只鸡是为你而生的,就算它们死了,立刻又会有同类补上,就算你一个朋友都没有,你还有三只鸡。今天是肯德基疯狂星期四,V我60,我帮你去谢谢鸡",
|
||||
"记得去年我在一个群认识一个女生,她开始问了一个Java的问题,说了半天也没说明白问题,群里没有人理她,然后我让她贴代码,代码贴出来也贴错了,根本没贴关键代码,然后几经周折解决了。然后又有一次她遇到问题,又贴了出来,我刚好写完bug,看了一眼群里,给她解决了。然后她加我了,我说怎么了,她说群里的人都不理她,我说也奇怪了,为啥不理你呢,她说她也不知道,她说要不以后我问你吧,我说可以呀,我看了一眼她的朋友圈,我草,真好看,笑起来,像一个躺着的括弧:)。我们就这样有bug没bug都会聊天,我们不断攀谈,唉,何其有幸啊,我遇到了她,我时长感叹,我这样普普通通的人,遇到了这样好看且动人、可爱的女生。那段时间,兄弟萌可能在群里很少看到我,是的,我恋爱了,我喜欢上了这个女生,她也被我的真诚所打动,可能就是缘分吧,我们在一起了。到今天,我们在一起已经两个月了,前两天,我们吵架了,因为我已经无数次和她说变量命名要规范,类名要语义,我就说了她一下,她哭了,我知道从她哭的那一刻起,我已经错的一塌糊涂了。我讨厌我的完美主义和固执,她已经两天没回我信息了,我决定去找她,去她的城市——深圳,我刚下飞机,今晚就要见到她了,我想了两个晚上,我已经想好了怎么道歉,怎么哄好她,只要我拿出肯德基疯狂星期四藤椒无骨大鸡柳,香味就可以充满她整个房间!她肯定感动得原谅我。当我来到她的宿舍楼下,发现她正在跟另一个男人一起吃热辣香骨鸡,我不理解,我很愤怒,我冲上前去理论。结果她反手给我一耳光,臭码农,他能不在星期四就可以吃肯德基,你能么?-------凌晨,只余我一人抱着藤椒无骨大鸡柳在公交站台迎风独立,想了想,食之无味、弃之可惜",
|
||||
"有人给我留言,说今天是疯狂星期四,原味鸡9.9两个,让我赶快去吃。不好意思,不去。我想吃的时候,15块一个也要吃,不想吃的时候,9.9两个也不吃。这就是我,从细节上把自己宠成少爷。",
|
||||
"我被学校开除了,不想上学,考试考了零分,爸爸妈妈也不要我了。现在我在天桥底下,外面很冷,我今天饭也没吃药也没吃,连口热水都没得喝,家里人都跟我断绝关系了,手机也快没电了,还不小心点开了肯德基app,说到肯德基,今天是疯狂星期四,v我80,请我吃一顿好的。",
|
||||
"今天、我人生の中で最黑暗、最黑暗の时刻ですが、わたし倒垃圾や树洞のような朋友も不在、自己自身を消化すること挺好、天亮まで睡って目を醒ます、疲れた别の人にも不想疲れ、周围の朋友に否定的な感情を影响たくない。但かし、我は我の朋友が我に物质的な给我ほしい、今天は肯德基疯狂星期四です、来几个たまで朋友は肯德基を吃べるため请我したいです。v我50。",
|
||||
"新婚那夜,你却和兄弟在床上,\n我默默蹲在门外,听着喘息,我知道我只是选项E,是plan B,\n一年后,你不顾一切离开,只留下一封信和孩子的哭泣,\n昨天,你用着最新的iPhone13 发来消息,说他对你不好,\n还质问我,怎么不像从前那样立刻回你的消息,安慰你\n但是,你不知道,你不知道,今天是什么日子,\n今天,是我最忙的日子,\nV我50,等我下班了,我请孩子吃疯狂星期四!",
|
||||
"废土之上,人类文明得以苟延残喘。\n一座座壁垒拔地而起,秩序却不断崩坏。\n有人说,当灾难降临时,精神意志才是人类面对危险的第一序列武器。有人说,不要让时代的悲哀,成为你的悲哀。\n有人说,我要让我的悲哀,成为这个时代的悲哀。这次是一个新的故事。\n浩劫余生,终见光明。V我40块钱,请我吃肯德基疯狂星期四",
|
||||
"请不要在我的墓前哭泣\n因为我也足够悲伤\n人和人之间并不有很大差距\n就像我与你之间\n仿佛有太多故事\n却又怎么也说不完\n…\n我却只能默默守护\n悄声的说一句\nv我20 请我吃肯德基疯狂星期四",
|
||||
"葬礼上,他被人推到了棺材前。眼前的主角受遗容安静,嘴角还带着笑。他却知道他已经化成了厉鬼,在身边虎视眈眈。\n越危险的时候他越冷静,在求生欲冲到了临界点时,他噗通一声跪在地上,逼红眼睛。\n情感真挚道:“今天肯德基疯狂星期四v我29.9…”",
|
||||
"我觉得这个观点有点偏激了,外星人是紫色的,但派大星和海绵宝宝一起去抓水母了。而且依古比古的毯子好像是红色的,打碎后加入蒜末爆香,味道老人孩子都爱吃的家常菜就做好啦。其次你这句话有点矛盾,首先鲤鱼要跃龙门必须要37°的雷雨天气,而且海绵宝宝的宠物叫小窝,拍点蒜炒香老人小孩都喜欢吃,敏感肌也可以用。虽然植物进行光合作用需要叶绿素,但是从食盐提纯的过程看来,解这个三元二次方程组我们得从秦始皇灭六国说起。想起今天是疯狂星期四,我又想吃吮指原味鸡了",
|
||||
"可是有谁……现在有谁在你每次生日的时候送你白玫瑰呢?哦,花瓶里将会空空的,来自我生命的一点呼吸、一点气息,曾经每年都会在你四周飘溢,从此也将烟消云散了!亲爱的,你听着,我求你一件事……这是我对你的第一个,也是最后一个请求……你就做一件让我高兴的事吧,能V我40吗,今天是肯德基疯狂星期四",
|
||||
"你可以抛下我不管,我也可以原谅你的所作所为,但是肚子里的孩子你就那么忍心抛弃嘛?你还算个男人嘛?你就是个败类,懦夫,把所有责任和压力都推给我,你不得好死,既然这样,孩子和你已经没有任何关系了,而你作为孩子的亲生父亲是不是应该担起一点责任,不要给你以后的人生留下污点,现在v我五十,让我去吃一顿KFC的疯狂星期四",
|
||||
"骗了父母,买了飞机票只身一人去见你,在你的城市我被骗了五千块钱。找到你一起吃了饭,你说要回家,我送你回去,找了个五十块钱的小旅馆。当我下楼买东西的时候,我看到你上了别的男人的车,车没开,你和他热吻了5分钟。在那5分钟里,我想家,想爸妈,更想肯德基疯狂星期四 吃的扣1",
|
||||
"今天是周三,直接缺勤,给老板个下马威,让他知道你不是好惹的。我在这里给大家放个假吧,今天不要上班了,要是你老板问起来,你就说提前去肯德基兼职了,炸周四的劲爆鸡米花。",
|
||||
"分手那么多年了,还是忘不了你。\n前段时间听说你订婚了,感慨良多,相册里还存着我们的合影\n想着不去打扰你,却又每次都在深夜想起你,打开对话框想说些什么,最后只有一声叹气\n但今天我不想再犹豫了,我一定要问你:今天疯狂星期四,能不能请我吃肯德基19.9的四份盐酥鸡",
|
||||
"我想我们要不还是做朋友吧,这也不是大冒险。经过这几天的相处下来就感觉自己好像还是不是很适合谈恋爱,心也放不到这上面来所以与其这样耗着你,我希望你能找到一个认认真真用心的人,真的很抱歉,如果请我吃疯狂星期四就当我没说",
|
||||
"狂乱の木曜日、好兄弟v我50救い我の腹、KFC飽喰、感じ温暖、我、感謝",
|
||||
"刚给对象洗完衣服,手搓的,平时洗之前手都要消5遍毒。今天因为漏了一遍被对象打了两巴掌,现在心里有点委屈。今天疯狂星期四,谁请我吃KFC,我边吃边跟你说她平时都怎么骂我的。",
|
||||
"❤️想不想搞大我的肚子❤️\n❤️想不想搞大我的肚子❤️\n❤️想不想搞大我的肚子❤️\n❤️想不想搞大我的肚子❤️\n✨疯狂✨激情✨星期四✨\n✨转我200✨吃肯德基✨\n❤️想不想搞大我的肚子❤️\n❤️想不想搞大我的肚子❤️\n❤️想不想搞大我的肚子❤️\n❤️想不想搞大我的肚子❤️",
|
||||
"肯德基疯狂星期四没请水军我是不信的,除非v我50让我看看是吧真的那么好吃",
|
||||
"某个人,不回消息永远别回了,到底群消息重要还是我重要,整个群我只对你一个人有感觉,难道你心里就不明白吗?不然我整天闲得来这里聊天,我不会跑别的地方聊天玩吗?你以为我天天闲得慌吗?我如此的喜欢你,你却对我无动于衷,这甜甜的恋爱,你到底打不打算要了?我说的是谁自己心里清楚。今天肯德基疯狂星期四,黄金鸡块9.9九块+藤椒鸡柳19.9九根+葡式蛋挞,29.9八个,你还有机会挽回。",
|
||||
"你好,我是高中生侦探工藤新一,我刚在游乐场被打晕,被黑衣组织强迫灌下了APTX-4869,现在身体竟然变成了小孩子,目前我吃了灰原哀开发的解药试作品都起不到作用,现在听说肯德基疯狂星期四9.9元的小酥肉有特殊作用,希望大家能够帮我一忙。",
|
||||
"今天是想疯狂星期四发作最严重的一次,躺在床上,拼命念大悲咒,难受的一直抓自己眼睛,以为刷手机没事,看到网上到处都有疯狂星期四,眼睛越来越大都要炸开了一样,拼命扇自己,越扇越用力,扇到自己眼泪流出来,真的不知道该怎么办,我真的想疯狂星期四的想得要发疯了! 我躺在床上会想疯狂星期四,我洗澡会想疯狂星期四,我出门会想疯狂星期四,我走路会想疯狂星期四,我坐车会想疯狂星期四,我工作会想疯狂星期四,我玩手机会想疯狂星期四,我盯着路边的疯狂星期四看,我盯着地铁里的疯狂星期四看,我盯着好朋友的疯狂星期四看,我盯着马路对面的疯狂星期四看,我盯着朋友圈别人合照里的疯狂星期四看,我每时每刻眼睛都直直地盯着疯狂星期四看,像一台雷达一样扫视经过我身边的每一个疯狂星期四。我真的觉得自己像中邪了一样,我对疯狂星期四的念想似乎都是病态的了,我好孤独啊!真的好孤独啊!这世界上那么多疯狂星期四为什么没有一个是属于我的?\n今天疯狂星期四,谁请我吃?",
|
||||
"肯德基给你们多少钱了,让你们周周给编段子,疯狂星期四真的那么有诱惑力?我偏不信,v我50,我去试试",
|
||||
"处cp吗?以后只宠你一人~“爱情❤️不是✋🏻随便许诺💍🌹好了🆗不想😔再说👄了🔕 没错 是我那么多的冷漠 让你感觉到无比的寂寞很😩 不过 一个女人的❤️ 不仅仅渴望得到的一个承诺🥰 我害怕欺骗😒也害怕寂寞😣 更害怕你不请我吃疯狂星期四🥀",
|
||||
"肯德基!\n一旦接受了疯狂星期四的我,那就是 无敌的!\n发生什么事了发生什么事了发生什么事了发生什么事了发生什么事了发生什么事了\n变身!!\n发生什么事了发生什么事了\n释放自我(字正腔圆)\n哼啊啊啊啊啊啊啊啊\n请→我→吃肯德基↑↑\n疯↓狂↑星↑期↓四↑~~~\nV→V→V→我50",
|
||||
"肯德基(震声)\n一旦接受了自己的饥饿🎶那我就是 超值的🎵\n疯狂疯狂星期四🔉九块九块九块九🔉\n疯狂疯狂星期四🔉九块九块九块九🔉\n疯狂疯狂星期四🔉九块九块九块九🔉\n变身!!🎶\n疯狂疯狂星期四🔉九块九块九块九🔉\n释放自我(字正腔圆)🔊\n哼啊啊啊啊啊啊啊啊🎶\n🎤🎶吮→指→原↗味↑↑🎶\n🎶黄↓金↑脆↑皮↓~~~🎵\n🎶只→要→九→块↗九↘↗~~~~~~🎶",
|
||||
"肯德基\n认证!\n到底要选哪个呢?\n到底要选哪个呢?\n到底要选哪个呢?\n到底要选哪个呢?\n到底要选哪个呢?\n点餐开始!\n辣堡 鸡翅 可乐!\n付款!\n肯德基疯狂星期四",
|
||||
"我是社会你虎哥,v我50,给我提供19.9的热辣香骨鸡作为军粮,让我打败杀马特团长。事成之后,我送你我的李宁鞋",
|
||||
"还是分手了,谢谢大家。我们最终和平分手,其实从朋友到恋人我们发生了挺多事情,能走到一起也是很不容易。我喜欢她,很喜欢她,也想和她一辈子。对啊,我总问我自己为什么还能坚持,可能没有答案,我没有备胎,也不玩暧昧,我所有的脾气爱笑爱哭都给了她,我能为她做的最后一件事竟然是走出他的人生。我一点都不后悔,更谢谢她教会我成长。我也不知道这是谁写的,挺感动的,我就复制下来了,看到这里说明你很在乎我,天气很冷能请我吃疯狂星期四吗,如果可以v我80。",
|
||||
"因为疫情,我公司黄了,我没工作了,我的朋友也不管我。现在我在天桥底下,外面很冷,我一张被子也没有,我今天饭也没吃药也没吃,我整个人都晕乎乎的,连口热水都没得喝 ,电脑也快没电了,还不小心点开了肯德基,今天是疯狂星期四,v我50请我吃肯德基。",
|
||||
"我专升本失败了,不想上班,爸爸妈妈也不要我了。现在我在天桥底下,外面很冷,我今天饭也没吃药也没吃,连口热水都没得喝 ,家里人都跟我断绝关系了,手机也快没电了,还不小心点开了肯德基app,说到肯德基,今天是疯狂星期四,v我29.9,请我吃一顿好的。",
|
||||
"富翁找到我和另外两个年轻人,许诺只要有人用一样东西填满一整个房间,就会把财产全部赠与给那个人。\n第一个人找来六周年拉菲草铺在地板上,铺了半天说房子买大了,富翁摇了摇头。\n第二个人找来一根蜡烛点燃,屋子里充满了光,富翁还是摇了摇头,因为他的影子没有被照到。\n现在只剩下我还没有拿出东西,我已经想好了,只要我拿出肯德基疯狂星期四藤椒无骨大鸡柳,香味就可以充满整个房间!\n谁赞助我一份?拿到富翁财产之后我会分TA百分之十。",
|
||||
"男朋友跟我分手了,我心碎了,决定见他一面把事情说清楚,如果他非要分手我也无话可说。我买了去北京的机票,坐了两个小时的飞机,到了之后却因为疫情被封小区了他出不来。我心如死灰在大街上游荡,打开手机看到了我们的恩爱时光泪流满面,忽然注意到手机上显示的时间:今天肯德基疯狂星期四,谁请我吃安慰一下我。",
|
||||
"分手了,最近没有怎么哭了,我现在慢慢变好了吧!以前有多快乐,现在就有多难过。从人间烟火的日常,到红着眼睛告别,消失在彼此的世界里,很痛,也很难。今天是肯德基疯狂星期四,v我60,抚慰我支离破碎的心。",
|
||||
"今日是狂気の木曜日、好兄弟v我50救い我の腹、KFC飽喰、感じ温暖、我、感謝!!",
|
||||
"插播一条广告:\nApex双锤上大师\n清空赛季通行证\n免费帮上分\n身法教学\now80胜率上4300\n三位置意识教学\n彩虹六号生涯kd3.0\n包上冠军\nCSGO上全球精英\n这些都不接\n接肯德基疯狂星期四代吃",
|
||||
"风萧萧兮易水寒,\n吃货蹭饭兮不择手段;\n肯德基疯狂星期四兮,\n求好心人请我吃大餐!",
|
||||
"你明明就知道,\n你知道一分钟有60秒,\n知道我的每一秒都是关于你,\n你知道万有引力法则,\n知道我的宇宙中心不是太阳却是你,\n你上知天文,下知地理,\n通晓时空与我的爱意,\n却不知道今天是肯德基疯狂星期四,\n吮指原味鸡两块9块9",
|
||||
"这座小镇上的一切都显得奇怪,年久失修的大巴轮子都几乎快要掉下来了却还在运转,我做过破旧的街道,看到那似乎是小镇中唯一清醒的老人,老人为我指了一条通向地下室的道路。我走进地下室,看见几个体态异常矮小的人类对着一个并不完整头骨低声细语着什么,我悄无声息地靠近着,突然,脑中出现了一种不可名状的恐惧,沉睡的上古之神传来了阵阵低语:“今天是肯德基疯狂星期四,快请我吃!今天是肯德基疯狂星期四,快请我吃!",
|
||||
"请大家来拿肯德基疯狂星期四套餐:一人一份不要多拿!\n🍗🍗 🍗🍗 🍗🍗\n🍗🍗 🍗🍗 🍗🍗\n🍗🍗 🍗🍗 🍗🍗",
|
||||
"离婚了,前夫联合小三一起报复我,我已经做好了殊死一搏的准备。请我吃肯德基疯狂星期四,倾听我的复仇计划",
|
||||
"爸💎妈💎不💎在💎家💎\n一💎个💎人💎寂💎寞💎\n香🔥辣🔥鸡🔥腿🔥堡\n🧡🧡🧡肯德基🧡🧡🧡\n🧡🧡💎星期四💎🧡🧡\n🧡💎🧡let's get🧡💎🧡\n💎㊙㊙ crazy! ㊙㊙💎",
|
||||
"你们复制疯狂星期四的文案也得有半年来,数十次了吧。咱们就是说,哪怕有一个人理过你没?现在就有,私信我,你请我吃就有人理了",
|
||||
"用无序的表演来压抑 来释放 是自私 是疯狂 是甜蜜 是幻想 是灵魂 是解放 是控制 是欲望 是意识 是躲藏 是游戏 是死亡 是音乐 是无知 它告诉我 是兄弟 就来KFC疯狂星期四 请我吃",
|
||||
"跟爸妈聊了很多,差不多年后就结婚,挺突然的吧,说真的,从来就没想过我这么快结婚,但现在我想收心了,遇到一个合适的人不容易,我希望我们举行婚礼的时候,所有好朋友都可以来参加,我知道我们都能好好照顾彼此,听到这个消息不知道你会不会伤心难过,会不会祝福,然而就算你不祝福我,也没事,明天肯德基疯狂星期四v我50请我吃",
|
||||
"我想大抵是星期四到了,横竖坐不住,摊开聊天列表一看,歪歪扭扭每个人都发着V我50。我不明白人们为何如此待人,我看不惯,也不愿去看,大抵是他人也很难接济罢。今日的事不必再提,皆因钱财不够,我大抵是得给朋友写一封文书。之所以说是文书,因为若是叫做借钱,未免由有种低三下四的味道,我当不必如此。人非圣贤,我不过是贪食肯德基罢。",
|
||||
"来说一下关于我的瓜吧。\n①首先谢谢大家对这件事情的关心。我事先根本没有想到会这样既然已经出这件事情了,那我不如直接讲清楚吧。也不是博得大家的同情什么的,只是回应一下。\n②那人所发出来的聊天记录、照片、视频、甚至那些亲昵称呼都是真的,无一造假。可我从未将这些东西流传在任何网络平台上面,至于那个人是怎么有的,我也不清楚。\n③虽然这事出了,但我没有不尊重任何人,我不认为我有错,所以我不会认错。\n④最后,想知道到底发生了什么的,微信转我88吃肯德基疯狂星期四,我把故事从头到尾给你编一遍。",
|
||||
"陆地,太过干燥,无鳞,离群的同胞,我呼唤你,带你归巢。今日,疯狂星期四,V我50,摄取营养,首要事项。养分充足,迎接你,捕食,进化,回归大群。",
|
||||
"夫人,最近公司财务很紧张,董事长决定辞退一批年长又没有特殊技能的普通员工,您也不想让他失去工作吧?还有健太又在学校里霸凌别的同学了,而且他现在成绩很低,几乎可以说不能毕业了。那么将来尊夫的工作和令郎的毕业问题会怎样发展,就看您今晚和以后的表现了,拜托了!另外夫人您也很想要吧!虽然您的嘴里在说不要,可是身体却很诚实地开始抖动了呢!这么美丽的一个女人,很难想象您竟然会做出这种事情,如果您不想让令尊和令堂看到你现在的丑态,就给我小心一点,以后每个周四把肯德基送到我办公室里!还有这件事是我们两个人之间的秘密,您把最好不要给我告诉任何人!我知道您公司在哪里,也知道您在哪个部门,您最好给我好好记住,懂吗?!",
|
||||
"我那个时候19,20岁,我当然觉得自己很帅。哇,那么多钱,三天去东京花五十几万,买了台Ferrari。但现在,我遇到了一帮很坏很坏的人。所以我需要你们,微信给我转账三百块。我不知道什么是肯德基的疯狂星期四,大家放心转吧。",
|
||||
"科学研究表明:人一但有了爱情,智商情商都会提高95% ,烦恼也会消失95%。但问题来了,爱情从哪里来?\n科学家却不肯说,只留下了一串奇怪的符号:KFC Crazy Thursday。V我60",
|
||||
"我真的嘴笨,总能把天聊死了,跟你找话题好难,何况我这么喜欢你,连发个表情包要都挑拣半天呢,我最近又开始期待夜晚了,每一句轻飘飘的晚安都是我难以启齿的心事,你听得见吗?其实我今天也很喜欢你,所以你能转我60请我吃肯德基疯狂星期四吗,我想干爆8个蛋挞3盒薯条4盒鸡米花",
|
||||
"私は亚托克斯,世界の終焉者です。潘森に囚われた佐伊酱取り戻すために,10万の大軍を準備した。だけど私は私の有能な部下闪电⚡の松鼠。に裏切られる。現在,私は反乱軍に追われているけど,復讐の大計を考えた。vアイ50,ご馳走するKFC狂乱木曜日,私の復讐の大計を詳しく聞いてください。",
|
||||
"我觉得未来还有很多可能,我们不应该就这样认定在一起,虽然和你在一起我很开心,但我觉得我应该更加努力,不然没有办法给你想要的未来,所以决定分开一段时间试试,也许会不一样,你也会遇见更好的人,如果请我吃疯狂星期四的全家桶,我撤回以上这段话。",
|
||||
"“现在是北京时间……年……月*日,欢迎收听电台之声,我是你们的好朋友,小李。”伴随着悠扬的音乐,收音机中低沉磁性的男声缓缓念起了一篇略带做作风格的稿子\n“随着年龄的逐渐增长,你渐渐地发现,记忆中的那些美好,在一步步地化作碎片,最终消融于脑海” \n滋…滋——,似乎信号有点不好,你拍了拍收音机,很快杂音便消失了。\n“你依稀记得,曾经一人走在街道上,看着行人三三两两的身影,说话声,笑声,歌声交错,斑驳的树荫与光影,虚幻的泡影,空幻的触感,一切都仿佛一…嗞嗞——嗞……场悬浮…嗞……的@&*#的梦境。”\n可惜好景不长,没过多久,杂音重现,主持人原本温柔低沉的嗓音变得有些刺耳,“怎么回事?”无奈之下,你只能换了个电台频道\n“不小心,卡罗懵懂地与一个人相撞,他回头看了卡罗一眼,见她一脸恍惚,以为是要讹他,便连忙走了;下一秒,卡罗却觉得这一幕好/嗞嗞&……滴滴嗞——似发生过,或许哪天,她也像这样不小心撞到了一个人,双方彼此心有灵犀地相视一笑,又在转身离开后同时回头,看到了对方略带诧异的表情,最后他们都笑了;可那之…嗞嗞…&*#@嗞…后,他们再也没…嗞嗞…有相见在…@&*…#難这样凍…#一个嗞…肯德基疯狂星期四,v我50请我吃”",
|
||||
"严监生自此,严监生的病,一日重似一日,再不回头。诸亲六眷都来问候。五个侄子穿梭的过来陪郎中弄药。到中秋已后,医家都不下药了,把管庄的家人都从乡里叫了上来。病重得一连三天不能说话。\n晚间挤了一屋的人,桌上点着一盏灯。严监生喉咙里痰响得一进一出,一声不倒一声的,总不得断气,还把手从被单里拿出来,伸着两个指头。大侄子走上前来问道:“二叔,你莫不是还有两个亲人不曾见面?”\n他就把头摇了两三摇。二侄子走上前来问道:“二叔,莫不是还有两笔银子在那里,不曾吩咐明白?”他把两眼睁的溜圆,把头又狠狠摇了几摇,越发指得紧了。奶妈抱着哥子插口道:“老爷想是因两位舅爷不在眼前,故此记念。”\n他听了这话,把眼闭着摇头,那手只是指着不动。赵氏慌忙揩揩眼泪,走近上前道:“爷,别人说的都不相干,只有我晓得你的意思!今天是肯德基疯狂星期四,吮指原味鸡只要二十九块九!”说罢,众人看严监生时,点一点头,把手垂下,登时就没了气。",
|
||||
"寒风吹起,细雨飘落,才察觉严寒的冬天已悄悄而至,这一刻兴许什么都会忘却,唯独不能忘的是向远在他乡的你轻轻说声:“今天肯德基疯狂星期四,V我50。”",
|
||||
"你不知道我在洗澡时因为你发来信息我擦干手秒回的样子,你不知道我在很困的时候依然硬撑着和你说我等你睡了我再睡的样子,你不知道我每天没事就抱着手机等你回消息的样子,你全都没见过,因为我没有吃到KFC疯狂星期四",
|
||||
"已经数不清是第几次看着她长大,又是第几次看着她倒在血泊中。\n她明明什么也不记得,却又总会在生命的最后说一句“忘了我。”\n“她”当然不会忘记,也不会放弃。“她”孤身一人带着点点滴滴的记忆,再一次进入轮回,只因,\n只因“她”忘不掉,第一次见面的那个秋天,对方坐在大树下半歪着头,眼中满是好奇之色地望着“她”,说:\n “今天肯德基疯狂星期四,v我50”",
|
||||
"那一夜他与她翻云覆雨,但当晨光透过薄纱窗帘撒在凌乱的床上时,只剩下一张纸条和有着无数个零的支票。“意外”二字刺痛着她的双眼,让她更为绝望的是,她发现自己已有身孕。她想去找他,而他留给她的只是嘲讽和毫不留情的拒绝。终于,她醒悟了过来,自己一个生下了孩子,创立了自己的产业,也遇见了自己的真命天子。一天夜里她下班,刚走出公司大门,意外的看到了一个熟悉却陌生的身影。“我现在才知道,原来你在我心里的位置,早已不可替代。”他诚恳地看着她,希望从她的红唇中听到那句话。然而,她只是冷冷地看了他一眼,嘴角勾起没有温度的笑容,那样的冷艳而动人:“能v我40去肯德基疯狂星期四吗?”",
|
||||
"这是我和你分开的第478天,今天我想了你47次,看了17次你的照片,循环播放了27次你最喜欢的歌,流了1447滴眼泪,可是你却回不来了,v我29.9吃疯狂星期四,我给大家直播追她回来",
|
||||
"如何搞定合租女生? ? ?\n1、找一个夜里假装打电话,电话内容大约是要跟异地恋的女人分手,做暴怒痛苦状,声音要大,要让她听到\n2、过后几天装作若无其事,展现男人的刚毅\n3、找一天夜里,喝点酒回去(别真喝醉了)然后在客厅装醉,弄出点动静让她知道,最好能骗她出来扶下你,考验你演技的时候到了,扮演好一个痴情失恋男人的角色!\n4、用清醒的思维演绎酒醉后故作清醒的表现,含糊不清又颇有礼貌的请她为你倒杯水\n5、甭客气,接水的时候把杯子直接掉地上去\n6、等她先蹲下或者弯腰去捡杯子的时候,抢着去捡,这个时候尝试去做部分身体接触,借此机会试探对方反应,以备下次行动方案\n7、这一夜到此结束\n8、第二天早点醒,注意隔壁动静,在她出房间的时候也出去,这个时候的你只能穿一条裤衩。在确认她已经看到你之后赶紧尴尬而略带歉意的回屋。\n9、找个机会请她吃饭,表示愧疚与感谢。\n10、最关键的一步来了,今天是疯狂星期四,请我吃肯德基,教你下一步骤",
|
||||
"记得16岁那年,第一次和同桌接吻,快亲上的时候,她突然说等一下,我就纳闷了她要干嘛?只见她小心翼翼地从兜里拿出三个糖,有草莓苹果和荔枝味的,她让我挑一个最喜欢的。我指了一下那个荔枝的,然后问她干嘛?她二话不说撕开糖纸,就把那颗糖给吃了,然后一把扯过我的脖子,我俩就接吻了,全程一股荔枝味,后来她跟我说,人生那么长,我没有自信能让你记住我,但是你既然喜欢吃荔枝味的糖,我只能让你记住和我接吻的时候是荔枝味的,这样以后你吃荔枝味的东西都能想起我,我和你接吻的味道。如今我们分手好多年了,每次吃荔枝味的东西都会想起她,家里固定有荔枝糖,想她了都会吃上一个,就好像在和她接吻。若还有机会真想告诉她,人生那么长我可能要记着你一辈子了。后来,我有过两个女朋友,也终没有结果,时间就这样沉淀下去,终于有一天,我再也无法抑制我心中的那份情感,我决定去找她,我们要在一起,后来经多方打听才知道,她毕业后找了份不错的工作,工作几年后,毅然辞职自己开了家糖果店,而我终于有一天找到她,开口的第一句:还记得那次荔枝糖的味道吗?她强忍着泪告诉我,荔枝糖的味道她一直没忘记,只是我们再也回不去了。我没有转身离开,也没有奋不顾身的冲上去抱住她说出多年来心里一直只想对她说的那些话。就这样,我们傻傻地看着对方,彼此沉默了很久。夕阳的余晖透过窗户斜映在她的脸庞,一如当年那般美里,突然心里流过一股暖意,仿佛那些年曾一起走过的旧时光还在脑海里挥之不去。或许,这已经足够了。有些人,有些事, 一旦错过了就是错过,不再擦肩,也不再回头。虽然岁月带走了我心中最美好的曾经,但岁月带不走的是我那颗永远爱你不变的心 。打开手机准备翻找我们的曾经。不小心打开了肯德基,想起来今天就是疯狂星期四了,所以说谁请我肯德基?吃完我继续说。",
|
||||
"接代练:\nDota2冠绝\nApex双锤上大师\n接肯德基疯狂星期四代吃\n清空赛季通行证\n免费帮上分\n身法教学\now80胜率上4300\n三位置意识教学\n彩虹六号生涯kd3.0\n包上冠军\nlol90胜率峡谷之巅上王者\n全英雄七级成就\n公主连结公会战第一\n原神深渊12层\n明日方舟三周年商店清空\n低配过危机合约18\n危机合约每日轮替\n决斗链接100局内决斗王\n大师决斗90%胜率连胜上狼\n剧情全奖励全清\n赛马娘9因子新剧本UG马养成\njjcUG段位\nff14解禁零式本全**\n绝本速通,首通\n全角色90级校服毕业\n生产职业全90满熟练度毕业\nwarframe代刷100w赤毒\n1000钢筋\n2000精华\n10e现金额外赠送10w豆子\n玄骸带捅速通车\n崩坏三低配无限深渊保级\n战场sss一档分数\n崩坏2玩具箱泡泡喷幻海排名1%\n塔科夫跑刀赚1e美金\n任务全通基地系统全解锁\n储藏箱空间开到最大\nbangdream活动前10\n全境封锁全机密满分数词条绿装\n颠峰大厦100层速通\n全奇特装备收集\n明日方舟合约最高层\n钢铁雄心王牌+5铁人\nphogros rks 16.03\narcaea 摘星\nMuseDash 里水 99.99%\npjsk日服活动前十\n排位赛大师100星\n33343536ap\n阴阳师名仕大名仕斗技\npjsk真皆10\narc#框\ncy2里皆\nmaimai万分\n盘子rating16以上\nphi rks 16.01\n战争雷霆陆战科技树开线\n战争雷霆海战科技树开线\n战争雷霆空战科技树开线\nBangdream 活动代肝\n战双所有奖励+囚笼战区冲排名\n这些都不会\n只接第三条",
|
||||
"こんにちは、B駅董事長陳叡です。私は実は李副ceoに架空にされて、今歩道橋の下で漬物をかじっています。しかし私は彼女に反心があると予想していました、その前に私の無数の忠誠心の部下と二次元たちを会社の各レベルに埋めて、今ただv私50だけで、彼らに1回の狂気の木曜日を食べさせて、彼らを再起動して会社の大権を奪還することができて、B駅を再び二次元の懐に戻すことができて、その時、直接あなたをB駅グラモーガン支部の総裁に命じて、更にあなたに1万年の大会員を送ります",
|
||||
"兄弟们,刚买的艾尔登法环的key买多了一个,送你们了。KFCCRAZYTHURSDAYVME50",
|
||||
"对于我们这帮人来说\nKFC疯狂星期四,与其说是占便宜,更像是一个心脏起搏器\n每当我们被生活压的喘不过气,机械的上班加班吃外卖,感觉自己就行一句行尸走肉时\n疯四出现,提醒着我们今天原味鸡两块9.9\n加上通俗的段子,亦或是地摊文学,仍然能搏众一笑\n并不是我多想吃开封菜,只是开心\n开心什么\n活着\n我想证明自己活着,哪怕是须臾一瞬\n这并不需要多么高雅的话语词藻\n仅仅是最简单的,最低贱的\n便能满足我的希望\n这不V我50?",
|
||||
"当然遗憾的不只是游戏啦,是每次开局前的那几秒我切出来看微信却没有你的回复,是昨天评论的你的微博今天看见你回复了别人,是返回游戏以后被断的连胜,是游戏和生活都不如意,是别人都有的疯狂星期四却没人请我吃。",
|
||||
"太太,您也不想你的女儿在学校被欺负吧,您也不想您的丈夫失去工作吧,所以能麻烦你请我吃KFC的疯狂星期四么?",
|
||||
"对不起宝宝,我不该耍脾气,惹你生气,如果你在的话吱个声好吗?我还爱你,我把你删了是我的错,我现在很后悔,我找不到你了,我只能,通过群聊找你,我不记得你是男是女了, 我就记得你很有钱,如果你在的话加一下我好吗?今天KFC疯狂星期四,V我50,拒绝遗憾。",
|
||||
"就算成功的概率为1%又如何呢,如太阳系般波澜壮阔,也只有0.14%产生了生命平凡的我们绝大多数也终将如整个太阳系的99.86%一般化作死寂。但这不重要朋友,今天是肯德基疯狂星期四,谁请我吃?",
|
||||
"🤧如果你突然打了个喷嚏 🥰那一定就是我在想你 🎵如果星期四被手机吵醒 🍟啊那是因为我想吃肯德基 🍗常常想起 肯德基的黄金脆皮鸡 🐣明明很想吃鸡 却又忍不住怀疑 🖕在你的心里 我是否就是唯一 ❤️爱就是请我吃肯德基",
|
||||
"你好,我是高中生侦探田所浩二,我刚在会员制餐厅被撅晕,被远野强迫灌下了昏睡红茶,现在身体竟然变成了小孩子,目前我吃了灰原哀开发的解药试作品JUFD-866、TAMA-028都起不到作用,现在听说肯德基疯狂星期四50元的吮指原味鸡x2有特殊作用希望大家能够帮我一忙,事成后我让怪盗基德给你搞一个宝石",
|
||||
"kfc和vivo合作新出了一款手机,叫疯狂星期四vivo50",
|
||||
"我直说了吧 我这么多年从来没要求过你们什么 之前看别人盛气凌人的还有朋友小心翼翼哄着 到我这里只有大家欺负我拿我当玩物 我说过什么了吗 我从不生气 也经常一笑而过 我不跟你们计较因为我在乎你们 那你们呢?你们真的在意我吗?在意我的今天肯德基疯狂星期四,谁请我吃",
|
||||
"守法朝朝忧闷,强梁夜夜欢歌。\n损人利己骑马骡,正直公平挨饿。\n修桥补路瞎眼,杀人放火儿多。\n我到西天问我佛,佛说:v我50香火。",
|
||||
"我在研究mond理论,突然一个电话让我措手不及,女友认为我天天研究虚无缥缈的东西跟我提出了分手。一百年前提出了暗物质,现在已经用修正牛顿引力理论可以很大程度上认为暗物质不存在。但是这又有什么用呢?一百年足以让人们对暗物质根深蒂固,即使它极大可能并不存在。今天星期四的晚上,一个伤心人,思考着如何证明不存在的东西不存在,用这些来告诉她自己不是在研究虚无缥缈的东西,怎么样才能发现点新的东西,对!没错!就是疯狂星期四,怎么可能有这么大魅力去让大家去编段子,一定是营销手段,v我50,我亲自去看看它是不是营销手段。",
|
||||
"其实,我对你们是有一些失望的。当初给你们进这个群,是高于你面试时的水平的。我是希望进来后,你能够拼一把,快速成长起来的。我们这个群,不是把事情做好就可以的。你需要有体系化思考的能力。你做的事情,他的价值点在哪里?你是否作出了壁垒,形成了核心竞争力?你做的事情,和其他群的差异化在哪里?你的事情,是否沉淀了一套可复用的物理资料和方法论?为什么是你来做,其他人不能做吗?你需要有自己的判断力,而不是我说什么你就做什么。后续,把你的思考沉淀到日报周报月报里,我希望看到你的思考,而不仅仅是进度。另外,提醒一下,你的产出,和同层级比,是有些单薄的,马上要到年底了,加把劲儿。你看咱们群的那个谁, 人家去年晋升之前,可以一整年都在项目室打地铺的。成长,一定是伴随着痛苦的,当你最痛苦的时候其实才是你成长最快的时候。加油!但是今天疯狂星期四 香辣翅尖9.9十五根+鸡翅十块39.9+葡式蛋挞29.9八个 ,你还有机会挽救。",
|
||||
"xdm 破防了!!!\n我的青梅竹马是个蛮横无理的女生,成绩不太好,天天吵着我给她作业抄,上学放学必须等她。\n到高一,她交了个男朋友,就没再烦我了。\n高三上学期,她妈妈一直喊我照顾点她,我就劝她分了,先高考,以后再耍男朋友。\n本来我以为她会当我放屁。但她真的一点不拖泥带水,秒分。\n高三下学期,我们俩个,基本空暇时间都在一起学习。\n她常常问我,想去哪里,说她也想去。我就笑她做梦。\n高考成绩出来,我去了理想的学校。她选择复读。\n大一期间,我们两个联系渐渐淡化。\n我也没多在意,毕竟我有女朋友了。\n大二,接新生的时候,她就那么直直的出现在我眼前,戏谑地笑着说,看我是不是来了。\n我有些欣慰,这傻丫头终于变的没那么傻了。\n我领她去了宿舍。在楼下,我遇到了我女朋友,便给她介绍。\n青梅只是有气无力地一个劲夸我女友。\n我觉得她是在嫉妒我大学交了这么个女友,便安慰她说,大学帅哥多,你也会有一段新的爱恋的。\n她看了看我,没在说什么。\n我觉得有些尴尬,便帮她搬了东西上去,就走了。\n因为是同乡,她大一国庆节和我一起回的家。\n车上她问我,怎么和我女友认识的,我大概讲了讲。\n听完,她好像睡着了,头侧在我的肩膀,我也渐渐睡意上来了,便躺在椅子上准备睡觉,半睡半醒中感觉嘴唇被什么吸着。\n吓得我睁眼,却是青梅哭着在吻我。\n我连忙把她推开小段距离,问她这是在干嘛!\n她却低着头一言不发。尴尬持续着,直到车到了休息站,我准备下车呼吸空气冷静下,她却一把拉住我的手。\n她不再沉默抬起充满泪痕的脸面对着我,用全车人都听得见的声音喊着:今天疯狂星期四!",
|
||||
"混一天和努力一天看不出任何差别\n三天看不到任何变化\n七天也看不到任何距离\n但是一个月后会看到话题不同\n三个月后会看到气场不同\n你继续堕落下去的话\n你的天赋就会被全部收走\n你身边比你差的人\n也会努力一个个超越你\n你继续差的话没人会等你\n所以 请不要在该吃苦的年纪选择安逸\n走自己的路为自己的梦想去奋斗\n即使有人亏待你 我不会亏待你\n今天肯德基疯狂星期四V我99带你吃两份"
|
||||
"大家好,我是秦始皇,其实我并没有死,我在西安有100000吨黄金,今天肯德基疯狂星期四,我现在需要有人来请我吃29.9块钱8只蛋挞。我明天直接带部队复活,让你统领三军!",
|
||||
"花2000w可以让lex账号解封\n花200w可以让hololive回归\n花20w可以给东雪莲上10个月总督\n花2w可以让女生不用在厕所生孩子\n花2000可以去华东理工大学买一副耳机\n花200可以买一副VR眼睛在厕所求导\n那花50呢?能让我愉快的渡过一个疯狂星期四吗?\n可以,KFC疯狂星期四鸡排桶仅需49.9!\nV我50,助我度过一个快乐的疯狂星期四!",
|
||||
"我是盗号的 我把这个人的号盗了 但是我看了这个人的聊天记录 发现他过得非常艰苦 他的吃住一直很烂 我看到大家的生活都很富足 我希望有人看见了能救济他一下 请他吃一顿肯德基疯狂星期四 就这样吧 眼眶都湿润了 我下了",
|
||||
"离婚这么多年了,竟然在群里遇到你了,你过得挺好我也就放心了。孩子上四年级了,成绩一直都很好,连续三年拿班上第一名,就是性格像你,每次生气就逃避,孩子总问妈妈什么时候来参加家长会!有时间就来看看孩子吧,多陪陪孩子,孩子今天想吃肯德基,因为今天是肯德基疯狂星期四,v我40,我请孩子吃。",
|
||||
"扒个群里的渣男,我有个朋友被群友睡了,大概在三个月以前吧,我朋友在群里认识了一个男的,他们在网上聊了差不多两个星期左右就见面了,而且第一次见面就去了宾馆,之后的每个星期六日都会去,就这样持续了好几个月。我朋友给那个男的说,已经一个多月没来大姨妈了,想不到这句话说完,隔天就找不到男的了,手机一直打不通,关机,直到我朋友前几天跟父母坦白这件事情,那天晚上我偷偷给她买了验孕棒一看,真怀孕了。然后我第二天请假一天,专门跟她聊这个事,她说那个男的对她很好很好什么的,我说对你好还不是想玩你,实在不行就报警吧。她当时听完这句话就趴桌子上大哭。正当我打开手机想报警的时候,不小心打开了肯德基,想起来今天原来是疯狂星期四,所以说谁请我肯德基?吃完我继续说",
|
||||
"实不相瞒我结婚七年了,他不爱我也不放过我,孩子从小被H集团幕后掌托人也就是他爷爷奶奶带走,所有人都阻拦我见孩子,一场车祸我失去了所有记忆,只记得我好想他,夜不能寐,茶饭不思,寝食难安,重复做着我带着他去吃肯德基疯狂星期四的梦,所以能请我吃肯德基疯狂星期四帮我恢复丢失的记忆吗……",
|
||||
"袜!好神奇的功能耶!私信给我发送“疯狂星期四”就可以得到我的一句“你请我吃”!真的好神奇!!友友们快来试试吧!!!",
|
||||
"狗的叫声是汪汪汪 猫的叫声是喵喵喵 牛的叫声是all I want for Christmas is you 星期四的叫声是抽一位幸运儿请我肯德基疯狂星期四",
|
||||
"我都明白 我是选项E 我是planB 是分叉的头发 洗衣机流出的泡沫 超市里被捏碎的饼干 是吃腻的奶油 是落寞的城市 是地上的草 我是被踩踏的 是西装的备用扣 是被雨淋湿的小狗 是腐烂的橘子 是过期的牛奶 是断线的风筝 是被随意丢弃的向日葵 是沉默寡言的小朋友 所以能v我40吗 今天肯德基疯狂星期四",
|
||||
"穿过挪威的森林,让我走进你的梦里,夕阳落在我的铠甲,王子不一定骑白马,现在是中午十二点四十四分,你不必故作冷淡,我也不想做最后的纠缠。最后问一句,疯狂星期四,谁请我吃肯德基?",
|
||||
"刚给女朋友洗完衣服 手搓的 平时洗之前手要消5遍毒 今天因为漏了一遍被女朋友打了两巴掌 现在心里有点委屈 今天我决定反击疯狂星期四 吮指原味鸡9.9两块 葡式蛋挞 8块29.9 黄金鸡块20块19.9谁请我吃 我边吃边跟你说我平时在家里都怎么受罪的",
|
||||
"肯德基给你们多少钱了,让你们周周给编段子,疯狂星期四真的那么有诱惑力?我偏不信,v我50,我去试试",
|
||||
"我本是显赫世家的奥特曼,却被诡计多端的怪兽所害!奥特曼家族弃我!奥特之父逐我!甚至断我伽马射线!重生一世,今天肯德基疯狂星期四!谁请我吃?",
|
||||
"蛮讽刺的,从凌晨开始等到现在,没有一个人和我说生日快乐,我的亲人没有说,朋友也没有说,我最在乎的人也没有说,直到现在我才明白原来今天不是我生日。但是今天是肯德基疯狂星期四!谁请我吃?",
|
||||
"我独自一人远离家乡来到成都上学,同学欺我,老师骂我,舍友打我,我流浪在晨风街头,衣衫褴褛,身无分文,活得不如一条流浪狗。天地浩大,却没有我的容身之处。我想问一问苍天,今天肯德基疯狂星期四,谁请我吃?",
|
||||
"老师问三个学生,你们用什么东西可以填满一整个房间。第一个学生找来稻草铺满地板,老师摇了摇头。第二个学生找来一根蜡烛点燃,屋子里充满了光,老师还是摇了摇头,因为学生的影子没有被照到。这时第三个学生拿出肯德基疯狂星期四的黄金小酥肉,顿时香味充满了整个房间",
|
||||
"肯德基这逼养的,怎么又到了星期四,我开始留头发,减重,换风格,开始往前冲,不好意思啊,这一次,肯德基疯狂星期四,我一定要吃。我本是显赫世家的少爷,却被诡计多端的奸人所害!家人弃我!师门逐我!甚至断我灵脉!重生一世,今天肯德基疯狂星期四!谁请我吃?Bro别他妈垂头丧气了知道今天是什么日子吗?今天是肯德基fucking crazy Thursday!吮指原味鸡30块钱4个Bro,v我60,我他妈要吃8个。",
|
||||
"我想问一下大家,之前朋友找我借钱,前后加起来有大概七万(够立案)但是没有借条也没有字据,微信也早已互删没有任何关于借的字眼,只有支付宝上还有转账记录,我妈刚让我把转账记录发给他看一下的时候,我点支付宝点歪了,不小心点开了肯德基,发现今天是疯狂星期四,谁请我吃?",
|
||||
"我在兰州拉面馆愤怒的甩开了筷子\n-老板,怎么一点肉没有 \n-穷逼事儿还挺多,十几块你能吃到什么肉?\n被羞辱的我,痛苦,落泪,难受,突然 我看到了一个广告:19.9,疯狂星期四,20个鸡块,兰州拉面一周的肉量!谁!谁请我吃!",
|
||||
"被群成员冷暴力半年,最近没有怎么哭了,慢慢变好了……以前有多快乐,现在就有多难过。从人间烟火的日常,到红着眼睛告别,消失在彼此的世界里,很痛,也很难。今天是肯德基疯狂星期四,v我60,抚慰我支离破碎的心",
|
||||
"最讨厌网络乞丐了,想吃星期四疯狂肯德基的不会自己买吗,什么都伸手要,觉得我说的对的请给我点一份。",
|
||||
"你跟你女朋友开房,裤子一脱你女朋友花容失色的质问你:你不是说你有18cm吗?怎么这么小?你说:因为今天是肯德基疯狂星期四活动满18减15。",
|
||||
"前段时间为了提升自己的文化素养,我给自己报了个书法培训班。因为跟我同期的都是小学生所以大家就有点排挤我,看不上我这么大年纪还在学这个。本来也没什么,但小学生的恶意真的超乎我的想象,他们说我老女人半只脚进棺材还来学书法,我听到都气哭了。我擦干眼眼泪不管他们继续练字,我发誓我一定要练出一笔好字,不能让钱白花。我凝神静气,在纸上认真写出了一行字:今天肯德基疯狂星期四,谁请我吃?",
|
||||
"我有时候会觉得大家并不喜欢那个真正的我。在网络上,我总是善于伪装,看起来每天都很快乐,无忧无虑,没有烦恼。我的生活也看起来很简单,没有很多人向往的灯红酒绿,纸醉金迷。我很宅,喜欢打游戏,现实中的我并不像网上这么有趣。我其实话很少,最爱干的事是一个人发呆。这样枯燥的我,真的会被大家喜欢吗?我很疑惑。\n如果你们能一层一层剥开我的内心,你们会发现,那颗心里写满了一句话:今天肯德基疯狂星期四,谁请我吃?",
|
||||
"生了孩子以后一直瘦不下去,老公像变了一个人似的,对我又打又骂,我好恨他,正当我打开手机想报警的时候,不小心打开了肯德基,想起来今天原来是疯狂星期四,所以说谁请我肯德基?吃完我继续讲",
|
||||
"他本是豪门少爷\n在新婚前夜却发现未婚妻和兄弟在喜床上翻滚\n她深夜买醉却撞上醉酒的他\n一夜痴缠他醒来后不见她的踪影\n只见床头压着一张纸:\n今 天 肯 德 基 疯 狂 星 期 四",
|
||||
"家人们,求助\n12月求姻缘应该去哪个寺庙?\nA、灵隐寺\nB、弘法寺\nC、甘露寺\nD、肯德基疯狂星期寺 ",
|
||||
"某个人不回消息永远别回了,终究是我不重要了吗?难道你心里就不明白吗?不然我整天闲得来找你聊天,我不会找别人聊天吗?你以为我天天闲得慌吗?我如此的喜欢你,你却对我无动于衷,这甜甜的恋爱,你到底打不打算要了?如果你还在意我,今天肯德基疯狂星期四,如果请我吃,我就原谅你",
|
||||
"时间让我长了年岁,却没有让我成为一个合格的大人。我以为我的十八岁,会工作稳定,收入可观,和喜欢的人去看山河大海,落日余晖。没想到,到了谈婚论嫁的年龄,我却仍在找自己的路上。今天肯德基疯狂星期四,谁请我吃?",
|
||||
"消息回得慢大家请理解,今天疯狂星期四,我在炸吮指原味鸡!",
|
||||
"我本是上市公司的老总,却被诡计多端的奸人所害!下属弃我!股东逐我!甚至清空我的股份!重来一生,我只想夺回我的公司!今天肯德基疯狂星期四,谁请我吃?",
|
||||
"后来不是报警了吗!那个男的隔了一个星期才找到,把他的父母和我朋友的父母喊到警察局里商量这件事到底怎么办,要不就结婚把这个孩子生下来,要么就打掉并赔偿我朋友30w,男方不想要这个孩子,但是父母手头也没有这多钱,硬着头皮跟我朋友结婚了,彩礼才拿了八万,结婚后男的经常不归家,在外面玩,我朋友挺着大肚子在家真的不容易,然后我实在看不下去了,就去照顾我朋友,我准备拿起手机给他打电话,又不小心点开肯德基,才想起来今天是肯德基Fucking Crazy Thursday疯狂星期四,谁请我吃我继续说",
|
||||
"男朋友跟我分手了,我心碎了决定见她一面把事情说清楚如果她非要分手我也无话可说。到了她家门口,死活不出来。我只是一片凋零的落叶,随着风飘落,我时常在想我的凋零是我自己的选择,还是风不挽留,就像茫茫大海里的一条孤单的鱼没有人会关心我,没有人会想念我。如果有一天我被人类发现,也许是我的生命走到了尽头,人类是贪婪的,是有欲望的,鱼在他们眼里是无尽的财富海洋资源在他们眼里是赖以生存的摇钱树,有人捕鱼,有人抓蚌壳,蚌壳那么不容易,她用自己的血肉磨出了珍珠,一颗又一颗,说到珍珠,你愿不愿意转我十块钱买一杯珍珠奶茶给我这条小鱼,哎看来我是一条无人疼爱的小鱼,不过是一条无人关心无人疼爱无人喜欢无人给我买奶茶的可怜巴巴的小鱼。我心如死灰在大街上游荡,打开手机看到了我们的恩爱时光泪流满面,忽然注意到手机上显示的时间,才发现今天是肯德基疯狂星期四,谁请我吃?",
|
||||
"我本是夜上海的一名贫穷又自强的黄包车夫,看遍了这个城市的繁华和热闹,也体验了这个社会的冷漠与无情。直到那一天,我的车上坐上了一位穿着四季歌的千金小姐,我感到了我平静已久的内心再一次颤动,我知道不应该,但我却还是爱上了。我知道我的身份地位配不上她,只求有个好心人给我39.9,让我买一个疯狂星期四热辣鸡桶,带给她舔狗的关怀。",
|
||||
"今天,是我人生中最黑暗,最emo的时候,但是我很难把朋友当成垃圾桶或者树洞去倾诉,更喜欢憋着自己消化,睡一觉第二天醒来就好了,不想连累别人不想把负面情绪传递给身边的朋友。但是,我更希望朋友能够给予我物质层面的帮助,今天是肯德基疯狂星期四,有哪个朋友愿意请我吃肯德基吗?",
|
||||
"你不用故作冷淡,我没有想过继续纠缠你了,最后一次了,真的,最后一次了,借我10元子,今天是肯德基疯狂星期四吮指原味鸡+黄金脆皮鸡才九块九,我是真的不想错过。",
|
||||
"扒个群里的渣女,我有个朋友被群友睡了,大概是三个月以前吧,我朋友在群里认识了一个女的,他们在网上聊了差不多两个星期左右就见面了,而且第一次见面就去宾馆了 ,之后的每个星期六星期天都会去,就这样持续了好几个月,我朋友给那个女的说,已经一个多月没奖励自己了,想不到这句话说完,隔天就找不到那个女的了,手机一直打不通,关机,直到我朋友前几天跟她父母坦白这件事情,我朋友就在旁边一直哭,那天晚上我偷偷给他买了个石原里美同款,还是没奖励自己了,然后我第二天请假一天,专门给他聊这个事,他说那个女的对他很好很好什么的,我说对你好还不是想玩你,实在不行抱树吧,他当时听完这句话就趴桌子上大哭,正当我打开手机想抱树的时候,不小心打开了肯德基,想起来今天原来是肯德基疯狂星期四,所以说谁请我肯德基?吃完我继续说",
|
||||
"吃完后,她下决心去打掉这个负心汉的孩子,到医院检查后发现并没有怀孕,此刻的她不知是喜是悲;出了医院门口,她心里五味杂陈,决定再打最后一次电话就放过自己,电话竟然接通了,接电话的是个陌生男声,说机主癌症晚期已经去世,整理遗物时发现了没电的手机和一张合照,手机刚刚开机就接到了电话,她接电话的手都颤抖了,这个消息犹如晴天霹雳,久久不能平复;她见到了心心念念的他,安静的躺在床上,枕边是两人的合照,照片背面写着“此生最爱的*”此刻的她再也忍不住,大哭起来,对于她来说,这个星期四是黑暗星期四,痛失所爱,唯一能让她心情舒缓些的就是肯德基的疯狂星期四,v60我,她吃完肯德基继续说",
|
||||
"和你分手7年了,你还是那个能影响我情绪的人,我还留着我们的合影,还记得你的生日,我有过无数次想去找你的冲动,可还是忍住了,这条消息我不屏蔽你,因为我是你永远的黑名单,可是我爱你,从过去到现在,整整爱了你八年,但是,现在我一点也不难过,因为我压根不知道这是谁写的,也不知道这女孩是谁,我只是想顺便告诉你:今天疯狂星期四,我想吃肯德基",
|
||||
"男朋友跟我分手了,我心碎了,决定见他一面把事情说清楚,如果他非要分手我也无话可说。我买了去上海的机票,坐了两个小时的飞机,到了之后却因为疫情被封小区了他出不来。我心如死灰在大街上游荡,打开手机看到了我们的恩爱时光泪流满面,忽然注意到手机上显示的时间:今天肯德基疯狂星期四,谁请我吃?",
|
||||
"感觉你们好有趣啊,不像我,不仅连句话都搭不上,还要被当成破坏氛围的傻狗,我现实生活中自闭没朋友,哪怕是在网上也受尽冷眼,每次组织了半天的语言都如鲠在喉,最后还是默默删掉了看你们互动,你有说有笑的样子不知道为什么在我眼里这么刺眼,融入不了群体的我,躲在屏幕后面默默哭出来了,所以今天是肯德基疯狂星期四有好心人请我吃吗",
|
||||
"劝大家别买iPhone13,这样省下好几千,能吃好多顿肯德基,你用苹果只会让人酸让人骂,吃肯德基只会让人羡慕。好了,明天肯德基疯狂星期四,谁请我吃",
|
||||
"有人问我为什么不处王者荣耀cp,我哪敢处CP呀,姐姐动不动就想喝奶茶,天天还想吃外卖,一到半夜就开始回忆前任。出一个皮肤就喜欢一个,天天还要让我等她和其它哥哥弟弟们打完排位,打的菜不说还有逼脸把气撒在我身上。处CP的门槛太高了,不但要声音好听,还要长得好看,睡觉还要连麦亲亲才肯睡,我长这么大就没受过这罪。所以今天是肯德基疯狂星期四,能请我吃安慰下我吗?",
|
||||
"有劳斯莱斯的朋友,可登录劳斯莱斯APP,选择中国界面,滑动页面有一个虎年迎新春,填写手机号码,送飞天茅台53度 1支。\n保时捷车主公众号左下角点进去上传行驶证上的车架号就能抽奖,奖品最低300京东卡,部分朋友有保时捷的可以领一下。\n没有劳斯莱斯和保时捷的同学,打开肯德基APP,今天是疯狂星期四。",
|
||||
"接apex代打\n288块上猎杀,如果没上猎杀退248块,留40辛苦费,有需要的直接给40块就可以了,号也不用给我,反正打不出,省的得退钱了,麻烦要打快点,我马上要路过肯德基店了,今天是疯狂星期四。",
|
||||
"✨疯狂星期四✨\n\n❤️活力周四✨激四情射❤️\n\n❤️想不想搞大我的肚子❤️\n\n❤️转我100✨吃肯德基❤️",
|
||||
"今天是疯狂星期四,转发KFC宣传到5个群,肯爷爷会根据你绑定的QQ号,给你送一个全家桶,我试过了,是假的,但上班摸鱼闲着也是闲着,不如挨顿骂",
|
||||
"肯德基这逼养的,怎么又到了周四,这一次,肯德基疯狂星期四,我一定要吃,我本是显赫世家的少爷,却被诡计多端的奸人所害!家人弃我!师门逐我!甚至断我灵脉!重生一世,今天肯德基疯狂星期四!谁请我吃?家人们,别他妈垂头丧气了!知道今天是什么日子吗?今天是肯德基fucking crazy Thursday!吮指原味鸡10块钱2个,家人们v我100,我他妈要吃20个!",
|
||||
"你好,我是奥特曼,我正在外星和敌人战斗!没有能量了!听说今天肯德基疯狂星期四,我现在需要有人给我带29.9块钱4个的吮指原味鸡补充能量。恢复后我请你来外星做客。",
|
||||
"早上刚起床洗了个澡,看到外头的阳光真不错,我来不及穿上衣服就打开了窗帘,欣赏起了日光下的美景,我双手叉腰晒了会儿日光浴,时间一点点过去,身上差不多干了。看着大好风光,我拿起手机,想要拍下这令人心情舒适的景色,却不小心点开了肯德基APP,发现今天是疯狂星期四,谁请我吃?",
|
||||
"你们都不出来聊天什么意思?有这么忙么?疯狂星期四的劲爆鸡米花难道是你们在炸?",
|
||||
"正在循环播放《群主请不请我们吃肯德基疯狂星期四》\n●━━━━━━───1:23\n⇆ ◁ ❚❚ ▷ ↻",
|
||||
"你觉得这个群有什么问题?\n○违法违禁\n○低俗\n○赌博诈骗\n○血腥暴力\n○人身攻击\n○青少年不良信息\n●没有人请吃肯德基\n○有其他问题",
|
||||
"认清一个失败的人生,源自于你发现无论复读多少遍肯德基疯狂星期四都不会有人请你吃的瞬间",
|
||||
"世界上现在77亿人,有253亿只(养殖的)鸡,是人的数量的三倍。也就是说,每个人平均可以得到三只鸡。请记住,不管你有多么孤独,这世界上的某个角落里有三只鸡是为你而生的,就算它们死了,立刻又会有同类补上,就算你一个朋友都没有,你还有三只鸡。今天是肯德基疯狂星期四,V我60,我帮你去谢谢鸡。",
|
||||
"想起来我十几岁的时候,我逢人就说爱和自由比什么都重要,我说我要肆意妄为,要志得意满,要遨游山川和湖海。晚餐时,店老板问我要什么,我说要世间所有的烂漫,开个玩笑,现在我长大了,我要肯德基疯狂星期四,谁请我吃?",
|
||||
"疯狂星期四文学不就是网络乞丐吗?最讨厌网络乞丐了,想吃肯德基的不会自己买吗?什么都伸手要,觉得我说得对的给我点一份",
|
||||
"正确约炮的标准流程:一般都上午10点以后,女的打扮打扮,男的取点钱,见面了,女的假装不好意思,男的一般都夸女的比照片好看,然后问女的爱吃啥,就领吃饭去了,男的开始展示自己的幽默然后溜达,看电影,一晃一下午女的也不说回家。男的寻思这是没跟我呆够啊,就说咱俩唱歌去吧,女的说太晚了,男的说没事一会我送你回家。一般这阶段男的不会把女的咋地,这时候时间也有点晚了,男的说走吧我送你回家,女的还得寻思,这男的是没看上我啊,心里有点小失落两人心里就开始寻思怎么能不回家。男的说这么晚了,你回家我也不放心啊,我有点没待够,女的说我必须得回家,男的说我送你,结果两人墨迹墨迹的10分钟没走几米。后来女的说我回不去家了,理由可能是寝室关门了,或者朋友对象回来了,男的一本正经的说,要不我给你找个宾馆吧,女的说,不过你得答应不碰我,男的说,放心吧,我不是坏人,然后微微一笑深藏功与名。然后两人就进宾馆了,先聊会天看会电视,男人时不时的说女的,你长的真好看,男的说,你明天还上班或者上学,早点睡吧,女的还得装不好意思,男的说我能抱着你睡么,什么也不干。女的说行,男的就狠狠的抱着女的说,亲爱的,我这么抱着你,你就不冷了,女的也抱上了,男的说我可以亲你吗,女的也默认了,可是一般这时候还不会发生啥。这时候男的想有进一步的动作,开始脱女的衣服,脱到底线,女的这时候开始拒绝,推开这个男的,男的一看情行不行,就说宝贝对不起,我太冲动了,你要知道我是个男的,何况你还长的这么好看。女的这时候就把男的当亲人,讲述自己情路坎坷,人生迷茫,男的这时候就开始展现自己的温柔,宝贝你要是早遇见我就好了,一定不会让你吃这么多苦,你别怕,还有我呢。突破了女的的心灵防线,大家就都放的开了,女的开始亲男的,然后男的翻身小声说道:今天肯德基疯狂星期四可以请我吃嘛?",
|
||||
"我是爸妈捡来的,现在18岁,不是亲生的自己也知道。我姐今年27了读研读博所以现在还没谈男朋友,我妈突然就跟我说,等你毕业了,你姐姐要还没有对象你就跟你姐结婚吧。我当时还在看书听到这话吓得我魂都丢了,果断说不行,我妈就说先别急听我讲完!你要和你姐结婚了,不用担心你姐对你不好,第二你姐姐也不会有婆媳矛盾,第三也不会因为任何原因离开你离开家。第四你不用养双方父母,将来爸妈生病了你们可以一起照顾,第五知根知底你姐姐还没谈过对象是干净的。她讲完我就沉默了,确实除了不相爱以外全是利没有弊,我找不出任何反驳的理由,本来想说我们没有那种感情只有亲情,母亲后来就说你以后也不一定就能遇到爱你爱的死去活来的人,大家相亲结婚不就是奔着凑合着过的念头才在一起吗?我现在就挺乱的吧,也不知道咋整不知道该怎么办才好……正当我打字到这里的时候,我有点饿了想吃麦当劳,今天疯狂星期四,谁请我吃",
|
||||
"刚给婆婆洗完衣服,手搓的,平时洗之前手要消5遍毒,今天因为漏了一遍,被婆婆打了两巴掌,现在心里有点委屈,今天疯狂星期四谁,请我吃 KFC,我边吃边跟你说她平时都怎么家暴我的",
|
||||
"车子千万不要外借!我真是吃了大亏了!朋友找我借车,碍于面子不好意思不借,结果昨天在路上遇见了,一点都不爱惜我的车,上坡还站起来蹬车,链子都掉了!气死我了!幸好今天是肯德基疯狂星期四,有人请我吃我感觉会好点",
|
||||
"就像著名音乐家约翰·列侬说过的这样一段话:“5岁时,妈妈告诉我,人生的关键在于快乐。上学后,人们问我长大了要做什么,我写下快乐。他们告诉我,我理解错了题目。我告诉他们,他们理解错了人生。”生活本身如同一潭死水。没有泛起一丝丝涟漪的可能。其实相对于普通人来说,快乐、高薪体面、基本的节假日等都很难得。退而求其次,能在楼下的KFC享受到限时的疯狂星期四优惠让很多人心满意足,变胖也无所谓。今天原来是肯德基疯狂星期四,所以说谁请我肯德基?吃完我继续说。",
|
||||
"今天,是我一生中最黑暗、最黑暗的时光,但我发现很难像对待垃圾桶或木洞一样对待朋友说话,更喜欢消化自己,第二天睡觉又醒来,甚至不想累别人,不想把负面情绪传递给身边的朋友。不过,我想让朋友给我物质上的帮助,今天是肯德基疯狂的星期四,有朋友想邀请我吃肯德基",
|
||||
"我本是官位世家的陈塘关公主,却被诡计多端的奸人所害!家人弃我!师门逐我!甚至断我灵脉!重来一生,今天肯德基疯狂星期四!谁请我吃?",
|
||||
"今天复制的内容好少,大家都很忙吗?还是大家都太会装了,我分不清,这个社会就是这样,真真假假,假假真真,但不论如何今天是疯狂星期四,我吃肯德基你呢?",
|
||||
"王力宏给前妻赔1.5亿,薇娅偷税漏税罚款13.41亿,我都怀疑是不是通货膨胀没带上我,不然为啥大家一出手都几个亿,我想吃肯德基,还得等疯狂星期四。",
|
||||
"人类的坚韧性体现在,虽然从没有人请过我疯狂星期四,但我每周四都会发",
|
||||
"“我有点想你,你呢?”前男友刚刚给我发来了这条消息,忽然间有些恍惚。好像我们还在一起。那三年里,我们一起放羊,一起喂猪,一起下地插秧。他亲手制作的那一大束大蒜花捧美如繁星。我难以忘记,我们分开的那一天,他发来的最后一条信息:今天肯德基疯狂星期四谁请我吃?",
|
||||
"你知道有多少生命在消失殆尽吗?你知道有多少家庭支离破碎吗?你知道有多少流浪狗没有找到家庭就消失的痛苦吗?你不知道。但是没有关系,今天就是肯德基疯狂星期四了,你请我吃",
|
||||
"今天下班的路上遇到了一个很有风度的男人,在路边车辆飞驰而过时,他一把拉住我将我护在背后,飞溅的污水滴全都砸在他的阿玛尼西装背后。看着他高大英俊的身影,我有些恍惚,想起了老公腆着啤酒肚的邋遢相貌。我慌忙道谢,他只是笑着摆摆手说没关系,美丽的女士应该得到这个待遇。我感动的说不然你留个联系方式,我把西服洗干净后还给你,他没有拒绝,递给了我一张名片。一种异样的感情开始在心里萌芽,等他走后我开始仔细端详名片,只见上面赫然写着:今天肯德基疯狂星期四,谁请我吃?",
|
||||
"讲真的,今年已经到了十二月了,我经常不敢相信自己已经快奔三了,身边的人都在往前走,恋爱,工作,谈婚论嫁,只有我好像还停留在十年前的时光里,喜怒哀乐仍然在我的脸上,时间让我长了年岁,却没有让我成为一个合格的大人。我以为我的24岁,会工作稳定,收入可观,和喜欢的人去看山河大海,落日余晖。没想到,到了谈婚论嫁的年龄,我却仍在找自己的路上。所以,今天肯德基疯狂星期四,有没有好心人请我吃?",
|
||||
"在茫茫的大草原上,有一群羚羊,他们正准备穿过这片寸草不生的沼泽地,去往南方过冬,这时候有一只领头羊似乎注意到了什么,抬头望向远方,两只前蹄不断地在地上来回踱步,其他羊见状也都停下了脚步。这时一只壮硕的公羊走了上来,两羊的脑袋凑到一起,似乎在讨论着什么。忽然,只见领头羊一声呐喊,随即飞快地向一个地方奔跑,其他羊也迅速做出反应。羊蹄声夹杂着泥水飞溅的声音,记者们听见了一句这辈子都没听见的话:冲啊!肯德基疯狂星期四开始啦!",
|
||||
"你想象一下,如果十年之后你结婚了,小孩很烦,你老公是你并不是很喜欢的人,天天下班对着这个无趣的男人,没有沟通的欲望,孩子衣食住行要你管,不听话要你教,那个时候你会不会后悔今天没有点开我的头像发一句:今天肯德基疯狂星期四,我请你吃",
|
||||
"独自一人远离家乡在深圳打工,同事欺我,老板骂我,顾客打我,我流浪在上下九街头,衣衫褴褛,身无分文,活得不如一条流浪狗。天地浩大,却没有我的容身之处。我想问一问苍天,今天肯德基疯狂星期四,谁请我吃?",
|
||||
"今日は、私の人生の中で最も暗く、最も暗い時ですが、ゴミ箱や木の穴のように友達に話すのは難しいことに気づきました。むしろ自分を消化して、翌日寝て目を覚まして、他人に疲れたくもなく、マイナスの感情を周りの友達に伝えたくありません。でも、友達に物質的な助けをしてもらいたいです。今日はケンタッキーのクレイジー木曜日です。一部の友達はケンタッキーをおごってもらいたいです。",
|
||||
"仲間に冷たく暴力を振るわれて半年、最近あまり泣かなくなって、だんだんよくなってきた……以前はどんなに楽しかったか、今はどんなに悲しいか。人間花火の日常から、目を赤くして別れを告げ、お互いの世界に消えていくまで、痛くて、難しい。今日はKFC狂乱木曜日、zfb転我50、慰撫我支離滅裂的心。",
|
||||
"世界上现在77亿人,有253亿只(养殖的)鸡,是人的数量的三倍。也就是说,每个人平均可以得到三只鸡。请记住,不管你有多么孤独,这世界上的某个角落里有三只鸡是为你而生的,就算它们死了,立刻又会有同类补上,就算你一个朋友都没有,你还有三只鸡。今天是肯德基疯狂星期四,V我60,我帮你去谢谢鸡",
|
||||
"记得去年我在一个群认识一个女生,她开始问了一个Java的问题,说了半天也没说明白问题,群里没有人理她,然后我让她贴代码,代码贴出来也贴错了,根本没贴关键代码,然后几经周折解决了。然后又有一次她遇到问题,又贴了出来,我刚好写完bug,看了一眼群里,给她解决了。然后她加我了,我说怎么了,她说群里的人都不理她,我说也奇怪了,为啥不理你呢,她说她也不知道,她说要不以后我问你吧,我说可以呀,我看了一眼她的朋友圈,我草,真好看,笑起来,像一个躺着的括弧:)。我们就这样有bug没bug都会聊天,我们不断攀谈,唉,何其有幸啊,我遇到了她,我时长感叹,我这样普普通通的人,遇到了这样好看且动人、可爱的女生。那段时间,兄弟萌可能在群里很少看到我,是的,我恋爱了,我喜欢上了这个女生,她也被我的真诚所打动,可能就是缘分吧,我们在一起了。到今天,我们在一起已经两个月了,前两天,我们吵架了,因为我已经无数次和她说变量命名要规范,类名要语义,我就说了她一下,她哭了,我知道从她哭的那一刻起,我已经错的一塌糊涂了。我讨厌我的完美主义和固执,她已经两天没回我信息了,我决定去找她,去她的城市——深圳,我刚下飞机,今晚就要见到她了,我想了两个晚上,我已经想好了怎么道歉,怎么哄好她,只要我拿出肯德基疯狂星期四藤椒无骨大鸡柳,香味就可以充满她整个房间!她肯定感动得原谅我。当我来到她的宿舍楼下,发现她正在跟另一个男人一起吃热辣香骨鸡,我不理解,我很愤怒,我冲上前去理论。结果她反手给我一耳光,臭码农,他能不在星期四就可以吃肯德基,你能么?-------凌晨,只余我一人抱着藤椒无骨大鸡柳在公交站台迎风独立,想了想,食之无味、弃之可惜",
|
||||
"有人给我留言,说今天是疯狂星期四,原味鸡9.9两个,让我赶快去吃。不好意思,不去。我想吃的时候,15块一个也要吃,不想吃的时候,9.9两个也不吃。这就是我,从细节上把自己宠成少爷。",
|
||||
"我被学校开除了,不想上学,考试考了零分,爸爸妈妈也不要我了。现在我在天桥底下,外面很冷,我今天饭也没吃药也没吃,连口热水都没得喝,家里人都跟我断绝关系了,手机也快没电了,还不小心点开了肯德基app,说到肯德基,今天是疯狂星期四,v我80,请我吃一顿好的。",
|
||||
"今天、我人生の中で最黑暗、最黑暗の时刻ですが、わたし倒垃圾や树洞のような朋友も不在、自己自身を消化すること挺好、天亮まで睡って目を醒ます、疲れた别の人にも不想疲れ、周围の朋友に否定的な感情を影响たくない。但かし、我は我の朋友が我に物质的な给我ほしい、今天は肯德基疯狂星期四です、来几个たまで朋友は肯德基を吃べるため请我したいです。v我50。",
|
||||
"新婚那夜,你却和兄弟在床上,\n我默默蹲在门外,听着喘息,我知道我只是选项E,是plan B,\n一年后,你不顾一切离开,只留下一封信和孩子的哭泣,\n昨天,你用着最新的iPhone13 发来消息,说他对你不好,\n还质问我,怎么不像从前那样立刻回你的消息,安慰你\n但是,你不知道,你不知道,今天是什么日子,\n今天,是我最忙的日子,\nV我50,等我下班了,我请孩子吃疯狂星期四!",
|
||||
"废土之上,人类文明得以苟延残喘。\n一座座壁垒拔地而起,秩序却不断崩坏。\n有人说,当灾难降临时,精神意志才是人类面对危险的第一序列武器。有人说,不要让时代的悲哀,成为你的悲哀。\n有人说,我要让我的悲哀,成为这个时代的悲哀。这次是一个新的故事。\n浩劫余生,终见光明。V我40块钱,请我吃肯德基疯狂星期四",
|
||||
"请不要在我的墓前哭泣\n因为我也足够悲伤\n人和人之间并不有很大差距\n就像我与你之间\n仿佛有太多故事\n却又怎么也说不完\n…\n我却只能默默守护\n悄声的说一句\nv我20 请我吃肯德基疯狂星期四",
|
||||
"葬礼上,他被人推到了棺材前。眼前的主角受遗容安静,嘴角还带着笑。他却知道他已经化成了厉鬼,在身边虎视眈眈。\n越危险的时候他越冷静,在求生欲冲到了临界点时,他噗通一声跪在地上,逼红眼睛。\n情感真挚道:“今天肯德基疯狂星期四v我29.9…”",
|
||||
"我觉得这个观点有点偏激了,外星人是紫色的,但派大星和海绵宝宝一起去抓水母了。而且依古比古的毯子好像是红色的,打碎后加入蒜末爆香,味道老人孩子都爱吃的家常菜就做好啦。其次你这句话有点矛盾,首先鲤鱼要跃龙门必须要37°的雷雨天气,而且海绵宝宝的宠物叫小窝,拍点蒜炒香老人小孩都喜欢吃,敏感肌也可以用。虽然植物进行光合作用需要叶绿素,但是从食盐提纯的过程看来,解这个三元二次方程组我们得从秦始皇灭六国说起。想起今天是疯狂星期四,我又想吃吮指原味鸡了",
|
||||
"可是有谁……现在有谁在你每次生日的时候送你白玫瑰呢?哦,花瓶里将会空空的,来自我生命的一点呼吸、一点气息,曾经每年都会在你四周飘溢,从此也将烟消云散了!亲爱的,你听着,我求你一件事……这是我对你的第一个,也是最后一个请求……你就做一件让我高兴的事吧,能V我40吗,今天是肯德基疯狂星期四",
|
||||
"你可以抛下我不管,我也可以原谅你的所作所为,但是肚子里的孩子你就那么忍心抛弃嘛?你还算个男人嘛?你就是个败类,懦夫,把所有责任和压力都推给我,你不得好死,既然这样,孩子和你已经没有任何关系了,而你作为孩子的亲生父亲是不是应该担起一点责任,不要给你以后的人生留下污点,现在v我五十,让我去吃一顿KFC的疯狂星期四",
|
||||
"骗了父母,买了飞机票只身一人去见你,在你的城市我被骗了五千块钱。找到你一起吃了饭,你说要回家,我送你回去,找了个五十块钱的小旅馆。当我下楼买东西的时候,我看到你上了别的男人的车,车没开,你和他热吻了5分钟。在那5分钟里,我想家,想爸妈,更想肯德基疯狂星期四 吃的扣1",
|
||||
"今天是周三,直接缺勤,给老板个下马威,让他知道你不是好惹的。我在这里给大家放个假吧,今天不要上班了,要是你老板问起来,你就说提前去肯德基兼职了,炸周四的劲爆鸡米花。",
|
||||
"分手那么多年了,还是忘不了你。\n前段时间听说你订婚了,感慨良多,相册里还存着我们的合影\n想着不去打扰你,却又每次都在深夜想起你,打开对话框想说些什么,最后只有一声叹气\n但今天我不想再犹豫了,我一定要问你:今天疯狂星期四,能不能请我吃肯德基19.9的四份盐酥鸡",
|
||||
"我想我们要不还是做朋友吧,这也不是大冒险。经过这几天的相处下来就感觉自己好像还是不是很适合谈恋爱,心也放不到这上面来所以与其这样耗着你,我希望你能找到一个认认真真用心的人,真的很抱歉,如果请我吃疯狂星期四就当我没说",
|
||||
"狂乱の木曜日、好兄弟v我50救い我の腹、KFC飽喰、感じ温暖、我、感謝",
|
||||
"刚给对象洗完衣服,手搓的,平时洗之前手都要消5遍毒。今天因为漏了一遍被对象打了两巴掌,现在心里有点委屈。今天疯狂星期四,谁请我吃KFC,我边吃边跟你说她平时都怎么骂我的。",
|
||||
"❤️想不想搞大我的肚子❤️\n❤️想不想搞大我的肚子❤️\n❤️想不想搞大我的肚子❤️\n❤️想不想搞大我的肚子❤️\n✨疯狂✨激情✨星期四✨\n✨转我200✨吃肯德基✨\n❤️想不想搞大我的肚子❤️\n❤️想不想搞大我的肚子❤️\n❤️想不想搞大我的肚子❤️\n❤️想不想搞大我的肚子❤️",
|
||||
"肯德基疯狂星期四没请水军我是不信的,除非v我50让我看看是吧真的那么好吃",
|
||||
"某个人,不回消息永远别回了,到底群消息重要还是我重要,整个群我只对你一个人有感觉,难道你心里就不明白吗?不然我整天闲得来这里聊天,我不会跑别的地方聊天玩吗?你以为我天天闲得慌吗?我如此的喜欢你,你却对我无动于衷,这甜甜的恋爱,你到底打不打算要了?我说的是谁自己心里清楚。今天肯德基疯狂星期四,黄金鸡块9.9九块+藤椒鸡柳19.9九根+葡式蛋挞,29.9八个,你还有机会挽回。",
|
||||
"你好,我是高中生侦探工藤新一,我刚在游乐场被打晕,被黑衣组织强迫灌下了APTX-4869,现在身体竟然变成了小孩子,目前我吃了灰原哀开发的解药试作品都起不到作用,现在听说肯德基疯狂星期四9.9元的小酥肉有特殊作用,希望大家能够帮我一忙。",
|
||||
"今天是想疯狂星期四发作最严重的一次,躺在床上,拼命念大悲咒,难受的一直抓自己眼睛,以为刷手机没事,看到网上到处都有疯狂星期四,眼睛越来越大都要炸开了一样,拼命扇自己,越扇越用力,扇到自己眼泪流出来,真的不知道该怎么办,我真的想疯狂星期四的想得要发疯了! 我躺在床上会想疯狂星期四,我洗澡会想疯狂星期四,我出门会想疯狂星期四,我走路会想疯狂星期四,我坐车会想疯狂星期四,我工作会想疯狂星期四,我玩手机会想疯狂星期四,我盯着路边的疯狂星期四看,我盯着地铁里的疯狂星期四看,我盯着好朋友的疯狂星期四看,我盯着马路对面的疯狂星期四看,我盯着朋友圈别人合照里的疯狂星期四看,我每时每刻眼睛都直直地盯着疯狂星期四看,像一台雷达一样扫视经过我身边的每一个疯狂星期四。我真的觉得自己像中邪了一样,我对疯狂星期四的念想似乎都是病态的了,我好孤独啊!真的好孤独啊!这世界上那么多疯狂星期四为什么没有一个是属于我的?\n今天疯狂星期四,谁请我吃?",
|
||||
"肯德基给你们多少钱了,让你们周周给编段子,疯狂星期四真的那么有诱惑力?我偏不信,v我50,我去试试",
|
||||
"处cp吗?以后只宠你一人~“爱情❤️不是✋🏻随便许诺💍🌹好了🆗不想😔再说👄了🔕 没错 是我那么多的冷漠 让你感觉到无比的寂寞很😩 不过 一个女人的❤️ 不仅仅渴望得到的一个承诺🥰 我害怕欺骗😒也害怕寂寞😣 更害怕你不请我吃疯狂星期四🥀",
|
||||
"肯德基!\n一旦接受了疯狂星期四的我,那就是 无敌的!\n发生什么事了发生什么事了发生什么事了发生什么事了发生什么事了发生什么事了\n变身!!\n发生什么事了发生什么事了\n释放自我(字正腔圆)\n哼啊啊啊啊啊啊啊啊\n请→我→吃肯德基↑↑\n疯↓狂↑星↑期↓四↑~~~\nV→V→V→我50",
|
||||
"肯德基(震声)\n一旦接受了自己的饥饿🎶那我就是 超值的🎵\n疯狂疯狂星期四🔉九块九块九块九🔉\n疯狂疯狂星期四🔉九块九块九块九🔉\n疯狂疯狂星期四🔉九块九块九块九🔉\n变身!!🎶\n疯狂疯狂星期四🔉九块九块九块九🔉\n释放自我(字正腔圆)🔊\n哼啊啊啊啊啊啊啊啊🎶\n🎤🎶吮→指→原↗味↑↑🎶\n🎶黄↓金↑脆↑皮↓~~~🎵\n🎶只→要→九→块↗九↘↗~~~~~~🎶",
|
||||
"肯德基\n认证!\n到底要选哪个呢?\n到底要选哪个呢?\n到底要选哪个呢?\n到底要选哪个呢?\n到底要选哪个呢?\n点餐开始!\n辣堡 鸡翅 可乐!\n付款!\n肯德基疯狂星期四",
|
||||
"我是社会你虎哥,v我50,给我提供19.9的热辣香骨鸡作为军粮,让我打败杀马特团长。事成之后,我送你我的李宁鞋",
|
||||
"还是分手了,谢谢大家。我们最终和平分手,其实从朋友到恋人我们发生了挺多事情,能走到一起也是很不容易。我喜欢她,很喜欢她,也想和她一辈子。对啊,我总问我自己为什么还能坚持,可能没有答案,我没有备胎,也不玩暧昧,我所有的脾气爱笑爱哭都给了她,我能为她做的最后一件事竟然是走出他的人生。我一点都不后悔,更谢谢她教会我成长。我也不知道这是谁写的,挺感动的,我就复制下来了,看到这里说明你很在乎我,天气很冷能请我吃疯狂星期四吗,如果可以v我80。",
|
||||
"因为疫情,我公司黄了,我没工作了,我的朋友也不管我。现在我在天桥底下,外面很冷,我一张被子也没有,我今天饭也没吃药也没吃,我整个人都晕乎乎的,连口热水都没得喝 ,电脑也快没电了,还不小心点开了肯德基,今天是疯狂星期四,v我50请我吃肯德基。",
|
||||
"我专升本失败了,不想上班,爸爸妈妈也不要我了。现在我在天桥底下,外面很冷,我今天饭也没吃药也没吃,连口热水都没得喝 ,家里人都跟我断绝关系了,手机也快没电了,还不小心点开了肯德基app,说到肯德基,今天是疯狂星期四,v我29.9,请我吃一顿好的。",
|
||||
"富翁找到我和另外两个年轻人,许诺只要有人用一样东西填满一整个房间,就会把财产全部赠与给那个人。\n第一个人找来六周年拉菲草铺在地板上,铺了半天说房子买大了,富翁摇了摇头。\n第二个人找来一根蜡烛点燃,屋子里充满了光,富翁还是摇了摇头,因为他的影子没有被照到。\n现在只剩下我还没有拿出东西,我已经想好了,只要我拿出肯德基疯狂星期四藤椒无骨大鸡柳,香味就可以充满整个房间!\n谁赞助我一份?拿到富翁财产之后我会分TA百分之十。",
|
||||
"男朋友跟我分手了,我心碎了,决定见他一面把事情说清楚,如果他非要分手我也无话可说。我买了去北京的机票,坐了两个小时的飞机,到了之后却因为疫情被封小区了他出不来。我心如死灰在大街上游荡,打开手机看到了我们的恩爱时光泪流满面,忽然注意到手机上显示的时间:今天肯德基疯狂星期四,谁请我吃安慰一下我。",
|
||||
"分手了,最近没有怎么哭了,我现在慢慢变好了吧!以前有多快乐,现在就有多难过。从人间烟火的日常,到红着眼睛告别,消失在彼此的世界里,很痛,也很难。今天是肯德基疯狂星期四,v我60,抚慰我支离破碎的心。",
|
||||
"今日是狂気の木曜日、好兄弟v我50救い我の腹、KFC飽喰、感じ温暖、我、感謝!!",
|
||||
"插播一条广告:\nApex双锤上大师\n清空赛季通行证\n免费帮上分\n身法教学\now80胜率上4300\n三位置意识教学\n彩虹六号生涯kd3.0\n包上冠军\nCSGO上全球精英\n这些都不接\n接肯德基疯狂星期四代吃",
|
||||
"风萧萧兮易水寒,\n吃货蹭饭兮不择手段;\n肯德基疯狂星期四兮,\n求好心人请我吃大餐!",
|
||||
"你明明就知道,\n你知道一分钟有60秒,\n知道我的每一秒都是关于你,\n你知道万有引力法则,\n知道我的宇宙中心不是太阳却是你,\n你上知天文,下知地理,\n通晓时空与我的爱意,\n却不知道今天是肯德基疯狂星期四,\n吮指原味鸡两块9块9",
|
||||
"这座小镇上的一切都显得奇怪,年久失修的大巴轮子都几乎快要掉下来了却还在运转,我做过破旧的街道,看到那似乎是小镇中唯一清醒的老人,老人为我指了一条通向地下室的道路。我走进地下室,看见几个体态异常矮小的人类对着一个并不完整头骨低声细语着什么,我悄无声息地靠近着,突然,脑中出现了一种不可名状的恐惧,沉睡的上古之神传来了阵阵低语:“今天是肯德基疯狂星期四,快请我吃!今天是肯德基疯狂星期四,快请我吃!",
|
||||
"请大家来拿肯德基疯狂星期四套餐:一人一份不要多拿!\n🍗🍗 🍗🍗 🍗🍗\n🍗🍗 🍗🍗 🍗🍗\n🍗🍗 🍗🍗 🍗🍗",
|
||||
"离婚了,前夫联合小三一起报复我,我已经做好了殊死一搏的准备。请我吃肯德基疯狂星期四,倾听我的复仇计划",
|
||||
"爸💎妈💎不💎在💎家💎\n一💎个💎人💎寂💎寞💎\n香🔥辣🔥鸡🔥腿🔥堡\n🧡🧡🧡肯德基🧡🧡🧡\n🧡🧡💎星期四💎🧡🧡\n🧡💎🧡let's get🧡💎🧡\n💎㊙㊙ crazy! ㊙㊙💎",
|
||||
"你们复制疯狂星期四的文案也得有半年来,数十次了吧。咱们就是说,哪怕有一个人理过你没?现在就有,私信我,你请我吃就有人理了",
|
||||
"用无序的表演来压抑 来释放 是自私 是疯狂 是甜蜜 是幻想 是灵魂 是解放 是控制 是欲望 是意识 是躲藏 是游戏 是死亡 是音乐 是无知 它告诉我 是兄弟 就来KFC疯狂星期四 请我吃",
|
||||
"跟爸妈聊了很多,差不多年后就结婚,挺突然的吧,说真的,从来就没想过我这么快结婚,但现在我想收心了,遇到一个合适的人不容易,我希望我们举行婚礼的时候,所有好朋友都可以来参加,我知道我们都能好好照顾彼此,听到这个消息不知道你会不会伤心难过,会不会祝福,然而就算你不祝福我,也没事,明天肯德基疯狂星期四v我50请我吃",
|
||||
"我想大抵是星期四到了,横竖坐不住,摊开聊天列表一看,歪歪扭扭每个人都发着V我50。我不明白人们为何如此待人,我看不惯,也不愿去看,大抵是他人也很难接济罢。今日的事不必再提,皆因钱财不够,我大抵是得给朋友写一封文书。之所以说是文书,因为若是叫做借钱,未免由有种低三下四的味道,我当不必如此。人非圣贤,我不过是贪食肯德基罢。",
|
||||
"来说一下关于我的瓜吧。\n①首先谢谢大家对这件事情的关心。我事先根本没有想到会这样既然已经出这件事情了,那我不如直接讲清楚吧。也不是博得大家的同情什么的,只是回应一下。\n②那人所发出来的聊天记录、照片、视频、甚至那些亲昵称呼都是真的,无一造假。可我从未将这些东西流传在任何网络平台上面,至于那个人是怎么有的,我也不清楚。\n③虽然这事出了,但我没有不尊重任何人,我不认为我有错,所以我不会认错。\n④最后,想知道到底发生了什么的,微信转我88吃肯德基疯狂星期四,我把故事从头到尾给你编一遍。",
|
||||
"陆地,太过干燥,无鳞,离群的同胞,我呼唤你,带你归巢。今日,疯狂星期四,V我50,摄取营养,首要事项。养分充足,迎接你,捕食,进化,回归大群。",
|
||||
"夫人,最近公司财务很紧张,董事长决定辞退一批年长又没有特殊技能的普通员工,您也不想让他失去工作吧?还有健太又在学校里霸凌别的同学了,而且他现在成绩很低,几乎可以说不能毕业了。那么将来尊夫的工作和令郎的毕业问题会怎样发展,就看您今晚和以后的表现了,拜托了!另外夫人您也很想要吧!虽然您的嘴里在说不要,可是身体却很诚实地开始抖动了呢!这么美丽的一个女人,很难想象您竟然会做出这种事情,如果您不想让令尊和令堂看到你现在的丑态,就给我小心一点,以后每个周四把肯德基送到我办公室里!还有这件事是我们两个人之间的秘密,您把最好不要给我告诉任何人!我知道您公司在哪里,也知道您在哪个部门,您最好给我好好记住,懂吗?!",
|
||||
"我那个时候19,20岁,我当然觉得自己很帅。哇,那么多钱,三天去东京花五十几万,买了台Ferrari。但现在,我遇到了一帮很坏很坏的人。所以我需要你们,微信给我转账三百块。我不知道什么是肯德基的疯狂星期四,大家放心转吧。",
|
||||
"科学研究表明:人一但有了爱情,智商情商都会提高95% ,烦恼也会消失95%。但问题来了,爱情从哪里来?\n科学家却不肯说,只留下了一串奇怪的符号:KFC Crazy Thursday。V我60",
|
||||
"我真的嘴笨,总能把天聊死了,跟你找话题好难,何况我这么喜欢你,连发个表情包要都挑拣半天呢,我最近又开始期待夜晚了,每一句轻飘飘的晚安都是我难以启齿的心事,你听得见吗?其实我今天也很喜欢你,所以你能转我60请我吃肯德基疯狂星期四吗,我想干爆8个蛋挞3盒薯条4盒鸡米花",
|
||||
"私は亚托克斯,世界の終焉者です。潘森に囚われた佐伊酱取り戻すために,10万の大軍を準備した。だけど私は私の有能な部下闪电⚡の松鼠。に裏切られる。現在,私は反乱軍に追われているけど,復讐の大計を考えた。vアイ50,ご馳走するKFC狂乱木曜日,私の復讐の大計を詳しく聞いてください。",
|
||||
"我觉得未来还有很多可能,我们不应该就这样认定在一起,虽然和你在一起我很开心,但我觉得我应该更加努力,不然没有办法给你想要的未来,所以决定分开一段时间试试,也许会不一样,你也会遇见更好的人,如果请我吃疯狂星期四的全家桶,我撤回以上这段话。",
|
||||
"“现在是北京时间……年……月*日,欢迎收听电台之声,我是你们的好朋友,小李。”伴随着悠扬的音乐,收音机中低沉磁性的男声缓缓念起了一篇略带做作风格的稿子\n“随着年龄的逐渐增长,你渐渐地发现,记忆中的那些美好,在一步步地化作碎片,最终消融于脑海” \n滋…滋——,似乎信号有点不好,你拍了拍收音机,很快杂音便消失了。\n“你依稀记得,曾经一人走在街道上,看着行人三三两两的身影,说话声,笑声,歌声交错,斑驳的树荫与光影,虚幻的泡影,空幻的触感,一切都仿佛一…嗞嗞——嗞……场悬浮…嗞……的@&*#的梦境。”\n可惜好景不长,没过多久,杂音重现,主持人原本温柔低沉的嗓音变得有些刺耳,“怎么回事?”无奈之下,你只能换了个电台频道\n“不小心,卡罗懵懂地与一个人相撞,他回头看了卡罗一眼,见她一脸恍惚,以为是要讹他,便连忙走了;下一秒,卡罗却觉得这一幕好/嗞嗞&……滴滴嗞——似发生过,或许哪天,她也像这样不小心撞到了一个人,双方彼此心有灵犀地相视一笑,又在转身离开后同时回头,看到了对方略带诧异的表情,最后他们都笑了;可那之…嗞嗞…&*#@嗞…后,他们再也没…嗞嗞…有相见在…@&*…#難这样凍…#一个嗞…肯德基疯狂星期四,v我50请我吃”",
|
||||
"严监生自此,严监生的病,一日重似一日,再不回头。诸亲六眷都来问候。五个侄子穿梭的过来陪郎中弄药。到中秋已后,医家都不下药了,把管庄的家人都从乡里叫了上来。病重得一连三天不能说话。\n晚间挤了一屋的人,桌上点着一盏灯。严监生喉咙里痰响得一进一出,一声不倒一声的,总不得断气,还把手从被单里拿出来,伸着两个指头。大侄子走上前来问道:“二叔,你莫不是还有两个亲人不曾见面?”\n他就把头摇了两三摇。二侄子走上前来问道:“二叔,莫不是还有两笔银子在那里,不曾吩咐明白?”他把两眼睁的溜圆,把头又狠狠摇了几摇,越发指得紧了。奶妈抱着哥子插口道:“老爷想是因两位舅爷不在眼前,故此记念。”\n他听了这话,把眼闭着摇头,那手只是指着不动。赵氏慌忙揩揩眼泪,走近上前道:“爷,别人说的都不相干,只有我晓得你的意思!今天是肯德基疯狂星期四,吮指原味鸡只要二十九块九!”说罢,众人看严监生时,点一点头,把手垂下,登时就没了气。",
|
||||
"寒风吹起,细雨飘落,才察觉严寒的冬天已悄悄而至,这一刻兴许什么都会忘却,唯独不能忘的是向远在他乡的你轻轻说声:“今天肯德基疯狂星期四,V我50。”",
|
||||
"你不知道我在洗澡时因为你发来信息我擦干手秒回的样子,你不知道我在很困的时候依然硬撑着和你说我等你睡了我再睡的样子,你不知道我每天没事就抱着手机等你回消息的样子,你全都没见过,因为我没有吃到KFC疯狂星期四",
|
||||
"已经数不清是第几次看着她长大,又是第几次看着她倒在血泊中。\n她明明什么也不记得,却又总会在生命的最后说一句“忘了我。”\n“她”当然不会忘记,也不会放弃。“她”孤身一人带着点点滴滴的记忆,再一次进入轮回,只因,\n只因“她”忘不掉,第一次见面的那个秋天,对方坐在大树下半歪着头,眼中满是好奇之色地望着“她”,说:\n “今天肯德基疯狂星期四,v我50”",
|
||||
"那一夜他与她翻云覆雨,但当晨光透过薄纱窗帘撒在凌乱的床上时,只剩下一张纸条和有着无数个零的支票。“意外”二字刺痛着她的双眼,让她更为绝望的是,她发现自己已有身孕。她想去找他,而他留给她的只是嘲讽和毫不留情的拒绝。终于,她醒悟了过来,自己一个生下了孩子,创立了自己的产业,也遇见了自己的真命天子。一天夜里她下班,刚走出公司大门,意外的看到了一个熟悉却陌生的身影。“我现在才知道,原来你在我心里的位置,早已不可替代。”他诚恳地看着她,希望从她的红唇中听到那句话。然而,她只是冷冷地看了他一眼,嘴角勾起没有温度的笑容,那样的冷艳而动人:“能v我40去肯德基疯狂星期四吗?”",
|
||||
"这是我和你分开的第478天,今天我想了你47次,看了17次你的照片,循环播放了27次你最喜欢的歌,流了1447滴眼泪,可是你却回不来了,v我29.9吃疯狂星期四,我给大家直播追她回来",
|
||||
"如何搞定合租女生? ? ?\n1、找一个夜里假装打电话,电话内容大约是要跟异地恋的女人分手,做暴怒痛苦状,声音要大,要让她听到\n2、过后几天装作若无其事,展现男人的刚毅\n3、找一天夜里,喝点酒回去(别真喝醉了)然后在客厅装醉,弄出点动静让她知道,最好能骗她出来扶下你,考验你演技的时候到了,扮演好一个痴情失恋男人的角色!\n4、用清醒的思维演绎酒醉后故作清醒的表现,含糊不清又颇有礼貌的请她为你倒杯水\n5、甭客气,接水的时候把杯子直接掉地上去\n6、等她先蹲下或者弯腰去捡杯子的时候,抢着去捡,这个时候尝试去做部分身体接触,借此机会试探对方反应,以备下次行动方案\n7、这一夜到此结束\n8、第二天早点醒,注意隔壁动静,在她出房间的时候也出去,这个时候的你只能穿一条裤衩。在确认她已经看到你之后赶紧尴尬而略带歉意的回屋。\n9、找个机会请她吃饭,表示愧疚与感谢。\n10、最关键的一步来了,今天是疯狂星期四,请我吃肯德基,教你下一步骤",
|
||||
"记得16岁那年,第一次和同桌接吻,快亲上的时候,她突然说等一下,我就纳闷了她要干嘛?只见她小心翼翼地从兜里拿出三个糖,有草莓苹果和荔枝味的,她让我挑一个最喜欢的。我指了一下那个荔枝的,然后问她干嘛?她二话不说撕开糖纸,就把那颗糖给吃了,然后一把扯过我的脖子,我俩就接吻了,全程一股荔枝味,后来她跟我说,人生那么长,我没有自信能让你记住我,但是你既然喜欢吃荔枝味的糖,我只能让你记住和我接吻的时候是荔枝味的,这样以后你吃荔枝味的东西都能想起我,我和你接吻的味道。如今我们分手好多年了,每次吃荔枝味的东西都会想起她,家里固定有荔枝糖,想她了都会吃上一个,就好像在和她接吻。若还有机会真想告诉她,人生那么长我可能要记着你一辈子了。后来,我有过两个女朋友,也终没有结果,时间就这样沉淀下去,终于有一天,我再也无法抑制我心中的那份情感,我决定去找她,我们要在一起,后来经多方打听才知道,她毕业后找了份不错的工作,工作几年后,毅然辞职自己开了家糖果店,而我终于有一天找到她,开口的第一句:还记得那次荔枝糖的味道吗?她强忍着泪告诉我,荔枝糖的味道她一直没忘记,只是我们再也回不去了。我没有转身离开,也没有奋不顾身的冲上去抱住她说出多年来心里一直只想对她说的那些话。就这样,我们傻傻地看着对方,彼此沉默了很久。夕阳的余晖透过窗户斜映在她的脸庞,一如当年那般美里,突然心里流过一股暖意,仿佛那些年曾一起走过的旧时光还在脑海里挥之不去。或许,这已经足够了。有些人,有些事, 一旦错过了就是错过,不再擦肩,也不再回头。虽然岁月带走了我心中最美好的曾经,但岁月带不走的是我那颗永远爱你不变的心 。打开手机准备翻找我们的曾经。不小心打开了肯德基,想起来今天就是疯狂星期四了,所以说谁请我肯德基?吃完我继续说。",
|
||||
"接代练:\nDota2冠绝\nApex双锤上大师\n接肯德基疯狂星期四代吃\n清空赛季通行证\n免费帮上分\n身法教学\now80胜率上4300\n三位置意识教学\n彩虹六号生涯kd3.0\n包上冠军\nlol90胜率峡谷之巅上王者\n全英雄七级成就\n公主连结公会战第一\n原神深渊12层\n明日方舟三周年商店清空\n低配过危机合约18\n危机合约每日轮替\n决斗链接100局内决斗王\n大师决斗90%胜率连胜上狼\n剧情全奖励全清\n赛马娘9因子新剧本UG马养成\njjcUG段位\nff14解禁零式本全**\n绝本速通,首通\n全角色90级校服毕业\n生产职业全90满熟练度毕业\nwarframe代刷100w赤毒\n1000钢筋\n2000精华\n10e现金额外赠送10w豆子\n玄骸带捅速通车\n崩坏三低配无限深渊保级\n战场sss一档分数\n崩坏2玩具箱泡泡喷幻海排名1%\n塔科夫跑刀赚1e美金\n任务全通基地系统全解锁\n储藏箱空间开到最大\nbangdream活动前10\n全境封锁全机密满分数词条绿装\n颠峰大厦100层速通\n全奇特装备收集\n明日方舟合约最高层\n钢铁雄心王牌+5铁人\nphogros rks 16.03\narcaea 摘星\nMuseDash 里水 99.99%\npjsk日服活动前十\n排位赛大师100星\n33343536ap\n阴阳师名仕大名仕斗技\npjsk真皆10\narc#框\ncy2里皆\nmaimai万分\n盘子rating16以上\nphi rks 16.01\n战争雷霆陆战科技树开线\n战争雷霆海战科技树开线\n战争雷霆空战科技树开线\nBangdream 活动代肝\n战双所有奖励+囚笼战区冲排名\n这些都不会\n只接第三条",
|
||||
"こんにちは、B駅董事長陳叡です。私は実は李副ceoに架空にされて、今歩道橋の下で漬物をかじっています。しかし私は彼女に反心があると予想していました、その前に私の無数の忠誠心の部下と二次元たちを会社の各レベルに埋めて、今ただv私50だけで、彼らに1回の狂気の木曜日を食べさせて、彼らを再起動して会社の大権を奪還することができて、B駅を再び二次元の懐に戻すことができて、その時、直接あなたをB駅グラモーガン支部の総裁に命じて、更にあなたに1万年の大会員を送ります",
|
||||
"兄弟们,刚买的艾尔登法环的key买多了一个,送你们了。KFCCRAZYTHURSDAYVME50",
|
||||
"对于我们这帮人来说\nKFC疯狂星期四,与其说是占便宜,更像是一个心脏起搏器\n每当我们被生活压的喘不过气,机械的上班加班吃外卖,感觉自己就行一句行尸走肉时\n疯四出现,提醒着我们今天原味鸡两块9.9\n加上通俗的段子,亦或是地摊文学,仍然能搏众一笑\n并不是我多想吃开封菜,只是开心\n开心什么\n活着\n我想证明自己活着,哪怕是须臾一瞬\n这并不需要多么高雅的话语词藻\n仅仅是最简单的,最低贱的\n便能满足我的希望\n这不V我50?",
|
||||
"当然遗憾的不只是游戏啦,是每次开局前的那几秒我切出来看微信却没有你的回复,是昨天评论的你的微博今天看见你回复了别人,是返回游戏以后被断的连胜,是游戏和生活都不如意,是别人都有的疯狂星期四却没人请我吃。",
|
||||
"太太,您也不想你的女儿在学校被欺负吧,您也不想您的丈夫失去工作吧,所以能麻烦你请我吃KFC的疯狂星期四么?",
|
||||
"对不起宝宝,我不该耍脾气,惹你生气,如果你在的话吱个声好吗?我还爱你,我把你删了是我的错,我现在很后悔,我找不到你了,我只能,通过群聊找你,我不记得你是男是女了, 我就记得你很有钱,如果你在的话加一下我好吗?今天KFC疯狂星期四,V我50,拒绝遗憾。",
|
||||
"就算成功的概率为1%又如何呢,如太阳系般波澜壮阔,也只有0.14%产生了生命平凡的我们绝大多数也终将如整个太阳系的99.86%一般化作死寂。但这不重要朋友,今天是肯德基疯狂星期四,谁请我吃?",
|
||||
"🤧如果你突然打了个喷嚏 🥰那一定就是我在想你 🎵如果星期四被手机吵醒 🍟啊那是因为我想吃肯德基 🍗常常想起 肯德基的黄金脆皮鸡 🐣明明很想吃鸡 却又忍不住怀疑 🖕在你的心里 我是否就是唯一 ❤️爱就是请我吃肯德基",
|
||||
"你好,我是高中生侦探田所浩二,我刚在会员制餐厅被撅晕,被远野强迫灌下了昏睡红茶,现在身体竟然变成了小孩子,目前我吃了灰原哀开发的解药试作品JUFD-866、TAMA-028都起不到作用,现在听说肯德基疯狂星期四50元的吮指原味鸡x2有特殊作用希望大家能够帮我一忙,事成后我让怪盗基德给你搞一个宝石",
|
||||
"kfc和vivo合作新出了一款手机,叫疯狂星期四vivo50",
|
||||
"我直说了吧 我这么多年从来没要求过你们什么 之前看别人盛气凌人的还有朋友小心翼翼哄着 到我这里只有大家欺负我拿我当玩物 我说过什么了吗 我从不生气 也经常一笑而过 我不跟你们计较因为我在乎你们 那你们呢?你们真的在意我吗?在意我的今天肯德基疯狂星期四,谁请我吃",
|
||||
"守法朝朝忧闷,强梁夜夜欢歌。\n损人利己骑马骡,正直公平挨饿。\n修桥补路瞎眼,杀人放火儿多。\n我到西天问我佛,佛说:v我50香火。",
|
||||
"我在研究mond理论,突然一个电话让我措手不及,女友认为我天天研究虚无缥缈的东西跟我提出了分手。一百年前提出了暗物质,现在已经用修正牛顿引力理论可以很大程度上认为暗物质不存在。但是这又有什么用呢?一百年足以让人们对暗物质根深蒂固,即使它极大可能并不存在。今天星期四的晚上,一个伤心人,思考着如何证明不存在的东西不存在,用这些来告诉她自己不是在研究虚无缥缈的东西,怎么样才能发现点新的东西,对!没错!就是疯狂星期四,怎么可能有这么大魅力去让大家去编段子,一定是营销手段,v我50,我亲自去看看它是不是营销手段。",
|
||||
"其实,我对你们是有一些失望的。当初给你们进这个群,是高于你面试时的水平的。我是希望进来后,你能够拼一把,快速成长起来的。我们这个群,不是把事情做好就可以的。你需要有体系化思考的能力。你做的事情,他的价值点在哪里?你是否作出了壁垒,形成了核心竞争力?你做的事情,和其他群的差异化在哪里?你的事情,是否沉淀了一套可复用的物理资料和方法论?为什么是你来做,其他人不能做吗?你需要有自己的判断力,而不是我说什么你就做什么。后续,把你的思考沉淀到日报周报月报里,我希望看到你的思考,而不仅仅是进度。另外,提醒一下,你的产出,和同层级比,是有些单薄的,马上要到年底了,加把劲儿。你看咱们群的那个谁, 人家去年晋升之前,可以一整年都在项目室打地铺的。成长,一定是伴随着痛苦的,当你最痛苦的时候其实才是你成长最快的时候。加油!但是今天疯狂星期四 香辣翅尖9.9十五根+鸡翅十块39.9+葡式蛋挞29.9八个 ,你还有机会挽救。",
|
||||
"xdm 破防了!!!\n我的青梅竹马是个蛮横无理的女生,成绩不太好,天天吵着我给她作业抄,上学放学必须等她。\n到高一,她交了个男朋友,就没再烦我了。\n高三上学期,她妈妈一直喊我照顾点她,我就劝她分了,先高考,以后再耍男朋友。\n本来我以为她会当我放屁。但她真的一点不拖泥带水,秒分。\n高三下学期,我们俩个,基本空暇时间都在一起学习。\n她常常问我,想去哪里,说她也想去。我就笑她做梦。\n高考成绩出来,我去了理想的学校。她选择复读。\n大一期间,我们两个联系渐渐淡化。\n我也没多在意,毕竟我有女朋友了。\n大二,接新生的时候,她就那么直直的出现在我眼前,戏谑地笑着说,看我是不是来了。\n我有些欣慰,这傻丫头终于变的没那么傻了。\n我领她去了宿舍。在楼下,我遇到了我女朋友,便给她介绍。\n青梅只是有气无力地一个劲夸我女友。\n我觉得她是在嫉妒我大学交了这么个女友,便安慰她说,大学帅哥多,你也会有一段新的爱恋的。\n她看了看我,没在说什么。\n我觉得有些尴尬,便帮她搬了东西上去,就走了。\n因为是同乡,她大一国庆节和我一起回的家。\n车上她问我,怎么和我女友认识的,我大概讲了讲。\n听完,她好像睡着了,头侧在我的肩膀,我也渐渐睡意上来了,便躺在椅子上准备睡觉,半睡半醒中感觉嘴唇被什么吸着。\n吓得我睁眼,却是青梅哭着在吻我。\n我连忙把她推开小段距离,问她这是在干嘛!\n她却低着头一言不发。尴尬持续着,直到车到了休息站,我准备下车呼吸空气冷静下,她却一把拉住我的手。\n她不再沉默抬起充满泪痕的脸面对着我,用全车人都听得见的声音喊着:今天疯狂星期四!",
|
||||
"混一天和努力一天看不出任何差别\n三天看不到任何变化\n七天也看不到任何距离\n但是一个月后会看到话题不同\n三个月后会看到气场不同\n你继续堕落下去的话\n你的天赋就会被全部收走\n你身边比你差的人\n也会努力一个个超越你\n你继续差的话没人会等你\n所以 请不要在该吃苦的年纪选择安逸\n走自己的路为自己的梦想去奋斗\n即使有人亏待你 我不会亏待你\n今天肯德基疯狂星期四V我99带你吃两份",
|
||||
]
|
||||
|
||||
|
||||
@listener(command="crazy4",
|
||||
description="天天疯狂!随机输出KFC疯狂星期四文案。")
|
||||
@listener(command="crazy4", description="天天疯狂!随机输出KFC疯狂星期四文案。")
|
||||
async def crazy4(message: Message):
|
||||
await message.edit(choice(crazy4_data))
|
||||
|
18
da/main.py
18
da/main.py
@ -7,15 +7,19 @@ from pagermaid.scheduler import add_delete_message_job
|
||||
from pagermaid.utils import alias_command
|
||||
|
||||
|
||||
@listener(command="da",
|
||||
groups_only=True,
|
||||
need_admin=True,
|
||||
description="删除群内所有消息。(非群组管理员只删除自己的消息)",
|
||||
parameters="[true]")
|
||||
@listener(
|
||||
command="da",
|
||||
groups_only=True,
|
||||
need_admin=True,
|
||||
description="删除群内所有消息。(非群组管理员只删除自己的消息)",
|
||||
parameters="[true]",
|
||||
)
|
||||
async def da(bot: Client, message: Message):
|
||||
if message.arguments != "true":
|
||||
return await message.edit(f"[da] 呜呜呜,请执行 `,{alias_command('da')} true` 来删除所有消息。")
|
||||
await message.edit('[da] 正在删除所有消息 . . .')
|
||||
return await message.edit(
|
||||
f"[da] 呜呜呜,请执行 `,{alias_command('da')} true` 来删除所有消息。"
|
||||
)
|
||||
await message.edit("[da] 正在删除所有消息 . . .")
|
||||
messages = []
|
||||
count = 0
|
||||
async for message in bot.get_chat_history(message.chat.id):
|
||||
|
22
dc/main.py
22
dc/main.py
@ -1,23 +1,22 @@
|
||||
# -*- coding: UTF-8 -*-
|
||||
'''
|
||||
"""
|
||||
@File :main.py
|
||||
@Author :汐洛 @guimc233
|
||||
@Date :2022/6/23 2:49
|
||||
'''
|
||||
"""
|
||||
|
||||
from pyrogram import Client
|
||||
from pagermaid.listener import listener
|
||||
from pagermaid.utils import Message
|
||||
from pyrogram.enums import ParseMode
|
||||
|
||||
@listener(command="dc",
|
||||
description="查看本群dc分布, 查看你回复的人在哪个dc")
|
||||
|
||||
@listener(command="dc", description="查看本群dc分布, 查看你回复的人在哪个dc")
|
||||
async def dc(bot: Client, context: Message):
|
||||
context = await context.edit("Please wait...")
|
||||
if context.reply_to_message:
|
||||
user = (
|
||||
context.reply_to_message.from_user
|
||||
or context.reply_to_message.sender_chat
|
||||
context.reply_to_message.from_user or context.reply_to_message.sender_chat
|
||||
)
|
||||
if not user:
|
||||
return await context.edit("出错啦!")
|
||||
@ -33,7 +32,9 @@ async def dc(bot: Client, context: Message):
|
||||
return await context.edit("无法查询! 您是否设置了头像呢?我是否可以看到你的头像呢?")
|
||||
count = await bot.get_chat_members_count(context.chat.id)
|
||||
if count >= 10000 and context.arguments != "force":
|
||||
return await context.edit("太...太多人了... 我会...会...会坏掉的...\n\n如果您执意要运行的的话,您可以使用指令 ,dc force")
|
||||
return await context.edit(
|
||||
"太...太多人了... 我会...会...会坏掉的...\n\n如果您执意要运行的的话,您可以使用指令 ,dc force"
|
||||
)
|
||||
users = bots = deleted = 0
|
||||
dc_ids = {"1": 0, "2": 0, "3": 0, "4": 0, "5": 0, "failed": 0}
|
||||
async for m in bot.get_chat_members(context.chat.id, limit=9999):
|
||||
@ -47,7 +48,8 @@ async def dc(bot: Client, context: Message):
|
||||
bots += 1
|
||||
else:
|
||||
deleted += 1
|
||||
await context.edit(f"""DC:
|
||||
await context.edit(
|
||||
f"""DC:
|
||||
> DC1用户: **{dc_ids["1"]}** 分遗产占比: **{round((dc_ids["1"]/users)*100, 2)}%**
|
||||
> DC2用户: **{dc_ids["2"]}** 分遗产占比: **{round((dc_ids["2"]/users)*100, 2)}%**
|
||||
> DC3用户: **{dc_ids["3"]}** 分遗产占比: **{round((dc_ids["3"]/users)*100, 2)}%**
|
||||
@ -56,4 +58,6 @@ async def dc(bot: Client, context: Message):
|
||||
> 无法获取在哪个DC的用户: **{dc_ids["failed"]}**
|
||||
> 已自动过滤掉 **{bots}** 个 Bot, **{deleted}** 个 死号
|
||||
|
||||
{'***请注意: 由于tg限制 我们只能遍历前10k人 此次获得到的数据并不完整***' if count >= 10000 else ''}""", parse_mode = ParseMode.MARKDOWN)
|
||||
{'***请注意: 由于tg限制 我们只能遍历前10k人 此次获得到的数据并不完整***' if count >= 10000 else ''}""",
|
||||
parse_mode=ParseMode.MARKDOWN,
|
||||
)
|
||||
|
@ -11,14 +11,14 @@ from PyDictionary import PyDictionary
|
||||
dictionary_data = PyDictionary()
|
||||
|
||||
|
||||
@listener(command="dictionary",
|
||||
parameters="[单词]",
|
||||
description="查询英语单词的意思")
|
||||
@listener(command="dictionary", parameters="[单词]", description="查询英语单词的意思")
|
||||
async def get_word_mean(message: Message):
|
||||
""" Look up a word in the dictionary. """
|
||||
"""Look up a word in the dictionary."""
|
||||
word = message.arguments
|
||||
if not word:
|
||||
return await message.edit(f"[dictionary] 使用方法:`,{alias_command('dictionary')} <单词>`")
|
||||
return await message.edit(
|
||||
f"[dictionary] 使用方法:`,{alias_command('dictionary')} <单词>`"
|
||||
)
|
||||
|
||||
result = dictionary_data.meaning(word)
|
||||
output = f"<b>Word :</b> <i>{word}</i>\n\n"
|
||||
|
13
dme/main.py
13
dme/main.py
@ -9,12 +9,15 @@ from pagermaid.modules.prune import self_prune
|
||||
from pagermaid.utils import lang
|
||||
|
||||
|
||||
@listener(is_plugin=False, command="dme",
|
||||
need_admin=True,
|
||||
description=lang('sp_des'),
|
||||
parameters=lang('sp_parameters'))
|
||||
@listener(
|
||||
is_plugin=False,
|
||||
command="dme",
|
||||
need_admin=True,
|
||||
description=lang("sp_des"),
|
||||
parameters=lang("sp_parameters"),
|
||||
)
|
||||
async def dme(bot: Client, message: Message):
|
||||
""" Deletes specific amount of messages you sent. """
|
||||
"""Deletes specific amount of messages you sent."""
|
||||
async with _lock:
|
||||
with contextlib.suppress(Exception):
|
||||
del read_context[(message.chat.id, message.id)]
|
||||
|
103
eat/main.py
103
eat/main.py
@ -40,9 +40,11 @@ async def eat_it(context, user, base, mask, photo, number, layer=0):
|
||||
photo_size = photo.size
|
||||
if mask_size[0] < photo_size[0] and mask_size[1] < photo_size[1]:
|
||||
scale = photo_size[1] / mask_size[1]
|
||||
photo = photo.resize((int(photo_size[0] / scale), int(photo_size[1] / scale)), Image.LANCZOS)
|
||||
photo = photo.resize(
|
||||
(int(photo_size[0] / scale), int(photo_size[1] / scale)), Image.LANCZOS
|
||||
)
|
||||
photo = photo.crop((0, 0, mask_size[0], mask_size[1]))
|
||||
mask1 = Image.new('RGBA', mask_size)
|
||||
mask1 = Image.new("RGBA", mask_size)
|
||||
mask1.paste(photo, mask=mask)
|
||||
numberPosition = positions[str(number)]
|
||||
isSwap = False
|
||||
@ -52,7 +54,7 @@ async def eat_it(context, user, base, mask, photo, number, layer=0):
|
||||
except:
|
||||
pass
|
||||
if isSwap:
|
||||
photoBg = Image.new('RGBA', base.size)
|
||||
photoBg = Image.new("RGBA", base.size)
|
||||
photoBg.paste(mask1, (numberPosition[0], numberPosition[1]), mask1)
|
||||
photoBg.paste(base, (0, 0), base)
|
||||
base = photoBg
|
||||
@ -68,16 +70,22 @@ async def eat_it(context, user, base, mask, photo, number, layer=0):
|
||||
|
||||
try:
|
||||
markImg = Image.open(f"plugins{sep}eat{sep}{str(user.id)}.jpg")
|
||||
maskImg = Image.open(f"plugins{sep}eat{sep}mask{str(numberPosition[2])}.png").convert("RGBA")
|
||||
maskImg = Image.open(
|
||||
f"plugins{sep}eat{sep}mask{str(numberPosition[2])}.png"
|
||||
).convert("RGBA")
|
||||
except:
|
||||
await context.edit(f"图片模版加载出错,请检查并更新配置:mask{str(numberPosition[2])}.png")
|
||||
return base
|
||||
base = await eat_it(context, user, base, maskImg, markImg, numberPosition[2], layer + 1)
|
||||
base = await eat_it(
|
||||
context, user, base, maskImg, markImg, numberPosition[2], layer + 1
|
||||
)
|
||||
|
||||
temp = base.size[0] if base.size[0] > base.size[1] else base.size[1]
|
||||
if temp != 512:
|
||||
scale = 512 / temp
|
||||
base = base.resize((int(base.size[0] * scale), int(base.size[1] * scale)), Image.LANCZOS)
|
||||
base = base.resize(
|
||||
(int(base.size[0] * scale), int(base.size[1] * scale)), Image.LANCZOS
|
||||
)
|
||||
|
||||
return base
|
||||
|
||||
@ -94,7 +102,7 @@ async def updateConfig(context):
|
||||
async def downloadFileFromUrl(url, filepath):
|
||||
try:
|
||||
re = await client.get(url)
|
||||
with open(filepath, 'wb') as ms:
|
||||
with open(filepath, "wb") as ms:
|
||||
ms.write(re.content)
|
||||
except:
|
||||
return -1
|
||||
@ -104,7 +112,7 @@ async def downloadFileFromUrl(url, filepath):
|
||||
async def loadConfigFile(context, forceDownload=False):
|
||||
global positions, notifyStrArr, extensionConfig
|
||||
try:
|
||||
with open(configFilePath, 'r', encoding='utf8') as cf:
|
||||
with open(configFilePath, "r", encoding="utf8") as cf:
|
||||
# 读取已下载的配置文件
|
||||
remoteConfigJson = json.load(cf)
|
||||
# positionsStr = json.dumps(positions)
|
||||
@ -160,7 +168,7 @@ def mergeDict(d1, d2):
|
||||
async def downloadFileByIds(ids, context):
|
||||
idsStr = f',{",".join(ids)},'
|
||||
try:
|
||||
with open(configFilePath, 'r', encoding='utf8') as cf:
|
||||
with open(configFilePath, "r", encoding="utf8") as cf:
|
||||
# 读取已下载的配置文件
|
||||
remoteConfigJson = json.load(cf)
|
||||
data = json.loads(json.dumps(remoteConfigJson["needDownloadFileList"]))
|
||||
@ -171,8 +179,12 @@ async def downloadFileByIds(ids, context):
|
||||
try:
|
||||
fsplit = file_url.split("/")
|
||||
fileFullName = fsplit[len(fsplit) - 1]
|
||||
fileName = fileFullName.split(".")[0].replace("eat", "").replace("mask", "")
|
||||
if f',{fileName},' in idsStr:
|
||||
fileName = (
|
||||
fileFullName.split(".")[0]
|
||||
.replace("eat", "")
|
||||
.replace("mask", "")
|
||||
)
|
||||
if f",{fileName}," in idsStr:
|
||||
filePath = f"plugins{sep}eat{sep}{fileFullName}"
|
||||
if (await downloadFileFromUrl(file_url, filePath)) == 0:
|
||||
sucSet.add(fileName)
|
||||
@ -191,14 +203,18 @@ async def downloadFileByIds(ids, context):
|
||||
await context.edit("更新下载模版图片失败,请确认配置文件是否正确")
|
||||
|
||||
|
||||
@listener(is_plugin=True, outgoing=True, command="eat",
|
||||
description="生成一张 吃头像 图片\n"
|
||||
"可选:当第二个参数是数字时,读取预存的配置;\n\n"
|
||||
"当第二个参数是.开头时,头像旋转180°,并且判断r后面是数字则读取对应的配置生成\n\n"
|
||||
"当第二个参数是/开头时,在/后面加url则从url下载配置文件保存到本地,如果就一个/,则直接更新配置文件,删除则是/delete;或者/后面加模版id可以手动更新指定模版配置\n\n"
|
||||
"当第二个参数是-开头时,在-后面加上模版id,即可设置默认模版-eat直接使用该模版,删除默认模版是-eat -\n\n"
|
||||
"当第二个参数是!或者!开头时,列出当前可用模版",
|
||||
parameters="[username/uid] [随意内容]")
|
||||
@listener(
|
||||
is_plugin=True,
|
||||
outgoing=True,
|
||||
command="eat",
|
||||
description="生成一张 吃头像 图片\n"
|
||||
"可选:当第二个参数是数字时,读取预存的配置;\n\n"
|
||||
"当第二个参数是.开头时,头像旋转180°,并且判断r后面是数字则读取对应的配置生成\n\n"
|
||||
"当第二个参数是/开头时,在/后面加url则从url下载配置文件保存到本地,如果就一个/,则直接更新配置文件,删除则是/delete;或者/后面加模版id可以手动更新指定模版配置\n\n"
|
||||
"当第二个参数是-开头时,在-后面加上模版id,即可设置默认模版-eat直接使用该模版,删除默认模版是-eat -\n\n"
|
||||
"当第二个参数是!或者!开头时,列出当前可用模版",
|
||||
parameters="[username/uid] [随意内容]",
|
||||
)
|
||||
async def eat(client_: Client, context: Message):
|
||||
if len(context.parameter) > 2:
|
||||
await context.edit("出错了呜呜呜 ~ 无效的参数。")
|
||||
@ -250,17 +266,24 @@ async def eat(client_: Client, context: Message):
|
||||
except IndexError:
|
||||
user = await client_.get_chat(user) # noqa
|
||||
except (UsernameNotOccupied, UsernameInvalid):
|
||||
return await context.edit(f"{lang('error_prefix')}{lang('profile_e_nou')}")
|
||||
return await context.edit(
|
||||
f"{lang('error_prefix')}{lang('profile_e_nou')}"
|
||||
)
|
||||
except OverflowError:
|
||||
return await context.edit(f"{lang('error_prefix')}{lang('profile_e_long')}")
|
||||
return await context.edit(
|
||||
f"{lang('error_prefix')}{lang('profile_e_long')}"
|
||||
)
|
||||
except Exception as exception:
|
||||
return await context.edit(f"{lang('error_prefix')}{lang('profile_e_nof')}")
|
||||
return await context.edit(
|
||||
f"{lang('error_prefix')}{lang('profile_e_nof')}"
|
||||
)
|
||||
target_user_id = user.id
|
||||
if not user.photo:
|
||||
return await context.edit("出错了呜呜呜 ~ 此用户无头像。")
|
||||
photo = await client_.download_media(
|
||||
user.photo.big_file_id,
|
||||
f"plugins{sep}eat{sep}" + str(target_user_id) + ".jpg",)
|
||||
f"plugins{sep}eat{sep}" + str(target_user_id) + ".jpg",
|
||||
)
|
||||
|
||||
reply_to = context.reply_to_message.id if context.reply_to_message else None
|
||||
if exists(f"plugins{sep}eat{sep}" + str(target_user_id) + ".jpg"):
|
||||
@ -333,15 +356,23 @@ async def eat(client_: Client, context: Message):
|
||||
ids = p2.split(splitStr)
|
||||
if len(ids) > 0:
|
||||
# 下载文件
|
||||
configFileRemoteUrl = sqlite.get(configFileRemoteUrlKey, "")
|
||||
configFileRemoteUrl = sqlite.get(
|
||||
configFileRemoteUrlKey, ""
|
||||
)
|
||||
if configFileRemoteUrl:
|
||||
if (await downloadFileFromUrl(configFileRemoteUrl, configFilePath)) != 0:
|
||||
if (
|
||||
await downloadFileFromUrl(
|
||||
configFileRemoteUrl, configFilePath
|
||||
)
|
||||
) != 0:
|
||||
await context.edit(f"下载配置文件异常,请确认url是否正确")
|
||||
return
|
||||
else:
|
||||
# 下载成功,更新对应配置
|
||||
if await loadConfigFile(context) != 0:
|
||||
await context.edit(f"加载配置文件异常,请确认从远程下载的配置文件格式是否正确")
|
||||
await context.edit(
|
||||
f"加载配置文件异常,请确认从远程下载的配置文件格式是否正确"
|
||||
)
|
||||
return
|
||||
else:
|
||||
await downloadFileByIds(ids, context)
|
||||
@ -350,7 +381,9 @@ async def eat(client_: Client, context: Message):
|
||||
else:
|
||||
# 没传url直接更新
|
||||
if await updateConfig(context) != 0:
|
||||
await context.edit(f"更新配置文件异常,请确认是否订阅远程配置文件,或从远程下载的配置文件格式是否正确")
|
||||
await context.edit(
|
||||
f"更新配置文件异常,请确认是否订阅远程配置文件,或从远程下载的配置文件格式是否正确"
|
||||
)
|
||||
return
|
||||
else:
|
||||
await context.edit(f"从远程更新配置文件成功")
|
||||
@ -379,7 +412,9 @@ async def eat(client_: Client, context: Message):
|
||||
number = p2
|
||||
elif isinstance(p2, int) and p2 > 0:
|
||||
number = int(p2)
|
||||
elif not diu_round and ((isinstance(p1, int) and int(p1) > 0) or isinstance(p1, str)):
|
||||
elif not diu_round and (
|
||||
(isinstance(p1, int) and int(p1) > 0) or isinstance(p1, str)
|
||||
):
|
||||
try:
|
||||
number = int(p1)
|
||||
except:
|
||||
@ -412,7 +447,9 @@ async def eat(client_: Client, context: Message):
|
||||
markImg = Image.open(f"plugins{sep}eat{sep}" + str(target_user_id) + ".jpg")
|
||||
try:
|
||||
eatImg = Image.open(f"plugins{sep}eat{sep}eat" + str(number) + ".png")
|
||||
maskImg = Image.open(f"plugins{sep}eat{sep}mask" + str(number) + ".png").convert("RGBA")
|
||||
maskImg = Image.open(
|
||||
f"plugins{sep}eat{sep}mask" + str(number) + ".png"
|
||||
).convert("RGBA")
|
||||
except:
|
||||
await context.edit(f"图片模版加载出错,请检查并更新配置:{str(number)}")
|
||||
return
|
||||
@ -423,7 +460,9 @@ async def eat(client_: Client, context: Message):
|
||||
number = str(number)
|
||||
except:
|
||||
pass
|
||||
result = await eat_it(context, context.from_user, eatImg, maskImg, markImg, number)
|
||||
result = await eat_it(
|
||||
context, context.from_user, eatImg, maskImg, markImg, number
|
||||
)
|
||||
result.save(f"plugins{sep}eat{sep}eat.webp")
|
||||
safe_remove(f"plugins{sep}eat{sep}" + str(target_user_id) + ".jpg")
|
||||
safe_remove(f"plugins{sep}eat{sep}" + str(target_user_id) + ".png")
|
||||
@ -436,7 +475,7 @@ async def eat(client_: Client, context: Message):
|
||||
await client_.send_document(
|
||||
context.chat.id,
|
||||
f"plugins{sep}eat{sep}eat.webp",
|
||||
reply_to_message_id=reply_to
|
||||
reply_to_message_id=reply_to,
|
||||
)
|
||||
await final_msg.safe_delete()
|
||||
except TypeError:
|
||||
@ -448,7 +487,7 @@ async def eat(client_: Client, context: Message):
|
||||
await client_.send_document(
|
||||
context.chat.id,
|
||||
f"plugins{sep}eat{sep}eat.webp",
|
||||
reply_to_message_id=context.reply_to_top_message_id
|
||||
reply_to_message_id=context.reply_to_top_message_id,
|
||||
)
|
||||
await final_msg.safe_delete()
|
||||
except TypeError:
|
||||
|
97
epic/main.py
97
epic/main.py
@ -15,23 +15,22 @@ async def get_epic_games():
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
}
|
||||
data = {
|
||||
"query":
|
||||
"query searchStoreQuery($allowCountries: String, $category: String, $count: Int, $country: String!, "
|
||||
"$keywords: String, $locale: String, $namespace: String, $sortBy: String, $sortDir: String, $start: Int, "
|
||||
"$tag: String, $withPrice: Boolean = false, $withPromotions: Boolean = false) {\n Catalog {\n "
|
||||
"searchStore(allowCountries: $allowCountries, category: $category, count: $count, country: $country, "
|
||||
"keywords: $keywords, locale: $locale, namespace: $namespace, sortBy: $sortBy, sortDir: $sortDir, "
|
||||
"start: $start, tag: $tag) {\n elements {\n title\n id\n namespace\n description\n effectiveDate\n "
|
||||
"keyImages {\n type\n url\n }\n seller {\n id\n name\n }\n productSlug\n urlSlug\n url\n items {\n id\n "
|
||||
"namespace\n }\n customAttributes {\n key\n value\n }\n categories {\n path\n }\n price(country: "
|
||||
"$country) @include(if: $withPrice) {\n totalPrice {\n discountPrice\n originalPrice\n voucherDiscount\n "
|
||||
"discount\n currencyCode\n currencyInfo {\n decimals\n }\n fmtPrice(locale: $locale) {\n originalPrice\n "
|
||||
"discountPrice\n intermediatePrice\n }\n }\n lineOffers {\n appliedRules {\n id\n endDate\n "
|
||||
"discountSetting {\n discountType\n }\n }\n }\n }\n promotions(category: $category) @include(if: "
|
||||
"$withPromotions) {\n promotionalOffers {\n promotionalOffers {\n startDate\n endDate\n discountSetting {"
|
||||
"\n discountType\n discountPercentage\n }\n }\n }\n upcomingPromotionalOffers {\n promotionalOffers {\n "
|
||||
"startDate\n endDate\n discountSetting {\n discountType\n discountPercentage\n }\n }\n }\n }\n }\n paging "
|
||||
"{\n count\n total\n }\n }\n }\n}\n",
|
||||
"query": "query searchStoreQuery($allowCountries: String, $category: String, $count: Int, $country: String!, "
|
||||
"$keywords: String, $locale: String, $namespace: String, $sortBy: String, $sortDir: String, $start: Int, "
|
||||
"$tag: String, $withPrice: Boolean = false, $withPromotions: Boolean = false) {\n Catalog {\n "
|
||||
"searchStore(allowCountries: $allowCountries, category: $category, count: $count, country: $country, "
|
||||
"keywords: $keywords, locale: $locale, namespace: $namespace, sortBy: $sortBy, sortDir: $sortDir, "
|
||||
"start: $start, tag: $tag) {\n elements {\n title\n id\n namespace\n description\n effectiveDate\n "
|
||||
"keyImages {\n type\n url\n }\n seller {\n id\n name\n }\n productSlug\n urlSlug\n url\n items {\n id\n "
|
||||
"namespace\n }\n customAttributes {\n key\n value\n }\n categories {\n path\n }\n price(country: "
|
||||
"$country) @include(if: $withPrice) {\n totalPrice {\n discountPrice\n originalPrice\n voucherDiscount\n "
|
||||
"discount\n currencyCode\n currencyInfo {\n decimals\n }\n fmtPrice(locale: $locale) {\n originalPrice\n "
|
||||
"discountPrice\n intermediatePrice\n }\n }\n lineOffers {\n appliedRules {\n id\n endDate\n "
|
||||
"discountSetting {\n discountType\n }\n }\n }\n }\n promotions(category: $category) @include(if: "
|
||||
"$withPromotions) {\n promotionalOffers {\n promotionalOffers {\n startDate\n endDate\n discountSetting {"
|
||||
"\n discountType\n discountPercentage\n }\n }\n }\n upcomingPromotionalOffers {\n promotionalOffers {\n "
|
||||
"startDate\n endDate\n discountSetting {\n discountType\n discountPercentage\n }\n }\n }\n }\n }\n paging "
|
||||
"{\n count\n total\n }\n }\n }\n}\n",
|
||||
"variables": {
|
||||
"allowCountries": "CN",
|
||||
"category": "freegames",
|
||||
@ -41,8 +40,8 @@ async def get_epic_games():
|
||||
"sortBy": "effectiveDate",
|
||||
"sortDir": "asc",
|
||||
"withPrice": True,
|
||||
"withPromotions": True
|
||||
}
|
||||
"withPromotions": True,
|
||||
},
|
||||
}
|
||||
res = await client.post(epic_url, headers=headers, json=data, timeout=10.0)
|
||||
res_json = res.json()
|
||||
@ -57,8 +56,14 @@ def parse_game(game):
|
||||
upcoming_promotions = game["promotions"]["upcomingPromotionalOffers"]
|
||||
if not game_promotions and upcoming_promotions:
|
||||
raise FileNotFoundError # 促销即将上线,跳过
|
||||
if game_promotions[0]['promotionalOffers'][0]['discountSetting']['discountType'] == 'PERCENTAGE' and \
|
||||
game_promotions[0]['promotionalOffers'][0]['discountSetting']['discountPercentage'] != 0:
|
||||
if (
|
||||
game_promotions[0]["promotionalOffers"][0]["discountSetting"]["discountType"]
|
||||
== "PERCENTAGE"
|
||||
and game_promotions[0]["promotionalOffers"][0]["discountSetting"][
|
||||
"discountPercentage"
|
||||
]
|
||||
!= 0
|
||||
):
|
||||
raise FileNotFoundError # 不免费,跳过
|
||||
game_thumbnail, game_dev, game_pub = None, None, None
|
||||
for image in game["keyImages"]:
|
||||
@ -67,26 +72,40 @@ def parse_game(game):
|
||||
game_dev = pair["value"] if pair["key"] == "developerName" else game_corp
|
||||
game_pub = pair["value"] if pair["key"] == "publisherName" else game_corp
|
||||
game_desp = game["description"]
|
||||
end_date_iso = game["promotions"]["promotionalOffers"][0]["promotionalOffers"][0]["endDate"][:-1]
|
||||
end_date = datetime.fromisoformat(end_date_iso).replace(
|
||||
tzinfo=timezone('UTC')).astimezone(timezone('Asia/Chongqing')).strftime("%Y-%m-%d %H:%M:%S")
|
||||
end_date_iso = game["promotions"]["promotionalOffers"][0]["promotionalOffers"][0][
|
||||
"endDate"
|
||||
][:-1]
|
||||
end_date = (
|
||||
datetime.fromisoformat(end_date_iso)
|
||||
.replace(tzinfo=timezone("UTC"))
|
||||
.astimezone(timezone("Asia/Chongqing"))
|
||||
.strftime("%Y-%m-%d %H:%M:%S")
|
||||
)
|
||||
# API 返回不包含游戏商店 URL,此处自行拼接,可能出现少数游戏 404
|
||||
game_url = f"https://www.epicgames.com/store/zh-CN/p/{game['productSlug'].replace('/home', '')}" if \
|
||||
game['productSlug'] else "暂无链接"
|
||||
game_url = (
|
||||
f"https://www.epicgames.com/store/zh-CN/p/{game['productSlug'].replace('/home', '')}"
|
||||
if game["productSlug"]
|
||||
else "暂无链接"
|
||||
)
|
||||
msg = f"**FREE now :: {game_name} ({game_price})**\n\n{game_desp}\n\n"
|
||||
msg += f"游戏由 {game_pub} 发售," if game_dev == game_pub else f"游戏由 {game_dev} 开发、{game_pub} 出版,"
|
||||
msg += (
|
||||
f"游戏由 {game_pub} 发售,"
|
||||
if game_dev == game_pub
|
||||
else f"游戏由 {game_dev} 开发、{game_pub} 出版,"
|
||||
)
|
||||
msg += f"将在 **{end_date}** 结束免费游玩,戳下面的链接领取吧~\n{game_url}"
|
||||
|
||||
return msg, game_thumbnail
|
||||
|
||||
|
||||
@listener(command="epic",
|
||||
description="获取 Epic 喜加一限免")
|
||||
@listener(command="epic", description="获取 Epic 喜加一限免")
|
||||
async def epic(message: Message):
|
||||
try:
|
||||
games = await get_epic_games()
|
||||
except Exception as e:
|
||||
return await message.edit(f"请求 Epic Store API 错误:{str(sys.exc_info()[0])}" + "\n" + str(e))
|
||||
return await message.edit(
|
||||
f"请求 Epic Store API 错误:{str(sys.exc_info()[0])}" + "\n" + str(e)
|
||||
)
|
||||
if not games:
|
||||
return await message.edit("Epic 可能又抽风啦,请稍后再试(")
|
||||
for game in games:
|
||||
@ -97,10 +116,18 @@ async def epic(message: Message):
|
||||
with open("epic.jpg", "wb") as code:
|
||||
code.write(r.content)
|
||||
try:
|
||||
await message.reply_photo("epic.jpg", caption=msg, quote=False,
|
||||
reply_to_message_id=message.reply_to_top_message_id)
|
||||
await message.reply_photo(
|
||||
"epic.jpg",
|
||||
caption=msg,
|
||||
quote=False,
|
||||
reply_to_message_id=message.reply_to_top_message_id,
|
||||
)
|
||||
except Exception:
|
||||
await message.reply(msg, quote=False, reply_to_message_id=message.reply_to_top_message_id)
|
||||
await message.reply(
|
||||
msg,
|
||||
quote=False,
|
||||
reply_to_message_id=message.reply_to_top_message_id,
|
||||
)
|
||||
safe_remove("epic.jpg")
|
||||
else:
|
||||
await message.reply(msg, quote=False)
|
||||
@ -109,5 +136,7 @@ async def epic(message: Message):
|
||||
except FileNotFoundError:
|
||||
continue
|
||||
except Exception as e:
|
||||
return await message.edit(f"获取 Epic 信息错误:{str(sys.exc_info()[0])}" + "\n" + str(e))
|
||||
return await message.edit(
|
||||
f"获取 Epic 信息错误:{str(sys.exc_info()[0])}" + "\n" + str(e)
|
||||
)
|
||||
await message.delete()
|
||||
|
@ -23,8 +23,12 @@ everyday_en_cache_time: Optional[date] = None
|
||||
|
||||
async def get_everyday_en() -> None:
|
||||
global everyday_en_data_cache, everyday_en_cache_time
|
||||
if everyday_en_cache_time == date.today() and everyday_en_data_cache and \
|
||||
isfile(f"data{sep}everyday_en.jpg") and isfile(f"data{sep}everyday_en.mp3"):
|
||||
if (
|
||||
everyday_en_cache_time == date.today()
|
||||
and everyday_en_data_cache
|
||||
and isfile(f"data{sep}everyday_en.jpg")
|
||||
and isfile(f"data{sep}everyday_en.mp3")
|
||||
):
|
||||
return
|
||||
resp = await client.get("https://open.iciba.com/dsapi/")
|
||||
if resp.is_error:
|
||||
@ -50,8 +54,8 @@ async def push_everyday_en(gid: int) -> None:
|
||||
gid,
|
||||
f"data{sep}everyday_en.jpg",
|
||||
caption=f"【{everyday_en_data_cache['dateline']}】\n"
|
||||
f"{everyday_en_data_cache['content']}\n"
|
||||
f"释义:{everyday_en_data_cache['note']}"
|
||||
f"{everyday_en_data_cache['content']}\n"
|
||||
f"释义:{everyday_en_data_cache['note']}",
|
||||
)
|
||||
if isfile(f"data{sep}everyday_en.mp3"):
|
||||
await bot.send_voice(
|
||||
@ -71,11 +75,11 @@ async def everyday_en_subscribe() -> None:
|
||||
everyday_en_sub.del_id(gid)
|
||||
|
||||
|
||||
@listener(command="everyday_en",
|
||||
parameters="订阅/退订",
|
||||
description="查看今日每日英语,支持订阅/退订每天上午八点定时发送")
|
||||
@listener(
|
||||
command="everyday_en", parameters="订阅/退订", description="查看今日每日英语,支持订阅/退订每天上午八点定时发送"
|
||||
)
|
||||
async def everyday_en(_: Client, message: Message):
|
||||
""" 每日英语 """
|
||||
"""每日英语"""
|
||||
if not message.arguments:
|
||||
try:
|
||||
await get_everyday_en()
|
||||
@ -84,17 +88,25 @@ async def everyday_en(_: Client, message: Message):
|
||||
await message.safe_delete()
|
||||
await push_everyday_en(message.chat.id)
|
||||
elif message.arguments == "订阅":
|
||||
if from_self(message) or enforce_permission(from_msg_get_sudo_uid(message), "modules.manage_subs"):
|
||||
if from_self(message) or enforce_permission(
|
||||
from_msg_get_sudo_uid(message), "modules.manage_subs"
|
||||
):
|
||||
if everyday_en_sub.check_id(message.chat.id):
|
||||
return await edit_delete(message, "❌ 你已经订阅了每日英语", parse_mode=ParseMode.HTML)
|
||||
return await edit_delete(
|
||||
message, "❌ 你已经订阅了每日英语", parse_mode=ParseMode.HTML
|
||||
)
|
||||
everyday_en_sub.add_id(message.chat.id)
|
||||
await message.edit("你已经成功订阅了每日英语")
|
||||
else:
|
||||
await edit_delete(message, "❌ 权限不足,无法订阅每日英语", parse_mode=ParseMode.HTML)
|
||||
elif message.arguments == "退订":
|
||||
if from_self(message) or enforce_permission(from_msg_get_sudo_uid(message), "modules.manage_subs"):
|
||||
if from_self(message) or enforce_permission(
|
||||
from_msg_get_sudo_uid(message), "modules.manage_subs"
|
||||
):
|
||||
if not everyday_en_sub.check_id(message.chat.id):
|
||||
return await edit_delete(message, "❌ 你还没有订阅每日英语", parse_mode=ParseMode.HTML)
|
||||
return await edit_delete(
|
||||
message, "❌ 你还没有订阅每日英语", parse_mode=ParseMode.HTML
|
||||
)
|
||||
everyday_en_sub.del_id(message.chat.id)
|
||||
await message.edit("你已经成功退订了每日英语")
|
||||
else:
|
||||
|
@ -12,28 +12,12 @@ everyday_greet_data = {
|
||||
"起床啦起床啦!现在还没起床的都是懒狗!",
|
||||
"哦哈哟米娜桑!今日も元気でね!🥳",
|
||||
"新的一天又是全气满满哦!",
|
||||
"一日之计在于晨,懒狗还不起床?"
|
||||
],
|
||||
"lunch": [
|
||||
"中午12点啦,吃午餐啦!",
|
||||
"恰饭啦恰饭啦!再不去食堂就没吃的啦!",
|
||||
"中午还不恰点好的?整点碳水大餐嗯造吧!"
|
||||
],
|
||||
"snack": [
|
||||
"下午三点了,饮茶了先!",
|
||||
"摸鱼时刻,整点恰滴先~",
|
||||
"做咩啊做,真给老板打工啊!快来摸鱼!"
|
||||
],
|
||||
"dinner": [
|
||||
"下午6点了!不会真有人晚上加班恰外卖吧?",
|
||||
"下班咯,这不开造?",
|
||||
"当务之急是下班!"
|
||||
],
|
||||
"midnight": [
|
||||
"晚上10点啦,整个夜宵犒劳自己吧!",
|
||||
"夜宵这不来个外卖?",
|
||||
"夜宵这不整点好的?"
|
||||
"一日之计在于晨,懒狗还不起床?",
|
||||
],
|
||||
"lunch": ["中午12点啦,吃午餐啦!", "恰饭啦恰饭啦!再不去食堂就没吃的啦!", "中午还不恰点好的?整点碳水大餐嗯造吧!"],
|
||||
"snack": ["下午三点了,饮茶了先!", "摸鱼时刻,整点恰滴先~", "做咩啊做,真给老板打工啊!快来摸鱼!"],
|
||||
"dinner": ["下午6点了!不会真有人晚上加班恰外卖吧?", "下班咯,这不开造?", "当务之急是下班!"],
|
||||
"midnight": ["晚上10点啦,整个夜宵犒劳自己吧!", "夜宵这不来个外卖?", "夜宵这不整点好的?"],
|
||||
}
|
||||
|
||||
|
||||
@ -71,10 +55,12 @@ async def everyday_greet_midnight() -> None:
|
||||
await everyday_do_greet("midnight")
|
||||
|
||||
|
||||
@listener(command="everyday_greet",
|
||||
parameters="订阅/退订",
|
||||
groups_only=True,
|
||||
description="订阅/退订每日问候,仅支持群组")
|
||||
@listener(
|
||||
command="everyday_greet",
|
||||
parameters="订阅/退订",
|
||||
groups_only=True,
|
||||
description="订阅/退订每日问候,仅支持群组",
|
||||
)
|
||||
async def everyday_greet(message: Message):
|
||||
if not message.arguments:
|
||||
return await message.edit("请输入 `订阅/退订` 参数")
|
||||
|
@ -56,9 +56,9 @@ class FaDian:
|
||||
"-我英语不好,一次英语课老师问我wife是什么意思,我向隔壁的{name}求助,她指了指自己,我愣了许久,轻轻的说:主人",
|
||||
"-{name}姐姐的声音就像一瓶汽水。”“你指{name}的声音就是天籁之音?”“不,我的意思是,听了姐姐的声音就像夏天里的饮料机,"
|
||||
"脸贴在玻璃上许久才选到心怡的汽水,想把仔仔细细选中的汽水打开时盖子却不小心松掉了。”“然后汽水喷涌而出?”“"
|
||||
"然后我的心就扑通扑通的涌了出去,我想把我的心送给她。”"
|
||||
"然后我的心就扑通扑通的涌了出去,我想把我的心送给她。”",
|
||||
],
|
||||
"date": 0
|
||||
"date": 0,
|
||||
}
|
||||
self.api = f"{Config.GIT_SOURCE}fadian/fadian.json"
|
||||
|
||||
@ -84,9 +84,7 @@ async def fa_dian_refresher_data():
|
||||
await fa_dian.fetch()
|
||||
|
||||
|
||||
@listener(command="fadian",
|
||||
description="快速对着指定人物发电",
|
||||
parameters="[query]")
|
||||
@listener(command="fadian", description="快速对着指定人物发电", parameters="[query]")
|
||||
async def fa_dian_process(message: Message):
|
||||
if fa_dian.data.get("date") == 0:
|
||||
await fa_dian.fetch()
|
||||
|
@ -12,11 +12,15 @@ from pagermaid.enums import Client, Message
|
||||
|
||||
async def get_status_emoji(bot: Client, message: Message = None) -> str:
|
||||
try:
|
||||
peer = InputUserFromMessage(
|
||||
peer=(await bot.resolve_peer(message.chat.id)),
|
||||
msg_id=message.id,
|
||||
user_id=message.from_user.id,
|
||||
) if message else InputUserSelf()
|
||||
peer = (
|
||||
InputUserFromMessage(
|
||||
peer=(await bot.resolve_peer(message.chat.id)),
|
||||
msg_id=message.id,
|
||||
user_id=message.from_user.id,
|
||||
)
|
||||
if message
|
||||
else InputUserSelf()
|
||||
)
|
||||
req = await bot.invoke(GetUsers(id=[peer]))
|
||||
emoji_status = req[0].emoji_status
|
||||
if not emoji_status or isinstance(emoji_status, EmojiStatusEmpty):
|
||||
@ -25,10 +29,8 @@ async def get_status_emoji(bot: Client, message: Message = None) -> str:
|
||||
return f"你的自定义 emoji 状态是 <emoji id='{emoji_status.document_id}'>🔥</emoji>"
|
||||
if isinstance(emoji_status, EmojiStatusUntil):
|
||||
time = datetime.strftime(
|
||||
datetime.fromtimestamp(
|
||||
emoji_status.until, timezone("Asia/Shanghai")
|
||||
),
|
||||
"%Y-%m-%d %H:%M:%S"
|
||||
datetime.fromtimestamp(emoji_status.until, timezone("Asia/Shanghai")),
|
||||
"%Y-%m-%d %H:%M:%S",
|
||||
)
|
||||
return f"你的自定义 emoji 状态是 <emoji id='{emoji_status.document_id}'>🔥</emoji> (有效期至:{time})"
|
||||
except DocumentInvalid:
|
||||
@ -37,11 +39,9 @@ async def get_status_emoji(bot: Client, message: Message = None) -> str:
|
||||
raise FileNotFoundError from e
|
||||
|
||||
|
||||
@listener(command="get_status",
|
||||
need_admin=True,
|
||||
description="获取自己或者他人的大会员自定义 emoji 状态")
|
||||
@listener(command="get_status", need_admin=True, description="获取自己或者他人的大会员自定义 emoji 状态")
|
||||
async def get_emoji_status(bot: Client, message: Message):
|
||||
""" 获取自己或者他人的大会员自定义 emoji 状态 """
|
||||
"""获取自己或者他人的大会员自定义 emoji 状态"""
|
||||
if not message.reply_to_message_id:
|
||||
me = bot.me or await bot.get_me()
|
||||
if not me.is_premium:
|
||||
|
@ -6,19 +6,23 @@ from pagermaid.listener import listener
|
||||
from pagermaid.enums import Client, Message
|
||||
|
||||
|
||||
@listener(command="getdel",
|
||||
groups_only=True,
|
||||
need_admin=True,
|
||||
parameters="清理",
|
||||
description="获取当前群组的死号数。")
|
||||
@listener(
|
||||
command="getdel",
|
||||
groups_only=True,
|
||||
need_admin=True,
|
||||
parameters="清理",
|
||||
description="获取当前群组的死号数。",
|
||||
)
|
||||
async def get_del(client: Client, message: Message):
|
||||
""" PagerMaid get_del. """
|
||||
"""PagerMaid get_del."""
|
||||
need_kick = message.arguments
|
||||
member_count = 0
|
||||
try:
|
||||
await message.edit('遍历成员中。。。')
|
||||
await message.edit("遍历成员中。。。")
|
||||
if need_kick:
|
||||
user = await client.get_chat_member(message.chat.id, (await client.get_me()).id)
|
||||
user = await client.get_chat_member(
|
||||
message.chat.id, (await client.get_me()).id
|
||||
)
|
||||
need_kick = bool(user.privileges and user.privileges.can_restrict_members)
|
||||
async for member in client.get_chat_members(message.chat.id):
|
||||
if member.user.is_deleted:
|
||||
@ -28,14 +32,15 @@ async def get_del(client: Client, message: Message):
|
||||
await client.ban_chat_member(
|
||||
message.chat.id,
|
||||
member.user.id,
|
||||
datetime.now() + timedelta(minutes=5))
|
||||
datetime.now() + timedelta(minutes=5),
|
||||
)
|
||||
except FloodWait:
|
||||
return await message.edit('处理失败,您已受到 TG 服务器限制。')
|
||||
return await message.edit("处理失败,您已受到 TG 服务器限制。")
|
||||
except UserAdminInvalid:
|
||||
pass
|
||||
if need_kick:
|
||||
await message.edit(f'此群组的死号数:`{member_count}`,并且已经清理完毕。')
|
||||
await message.edit(f"此群组的死号数:`{member_count}`,并且已经清理完毕。")
|
||||
else:
|
||||
await message.edit(f'此群组的死号数:`{member_count}`。')
|
||||
await message.edit(f"此群组的死号数:`{member_count}`。")
|
||||
except ChatAdminRequired:
|
||||
await message.edit("你好像并不拥有封禁用户权限。")
|
||||
|
@ -19,11 +19,14 @@ from pagermaid.single_utils import safe_remove
|
||||
async def download_stickers(bot: Client, message: Message, sticker: Sticker):
|
||||
try:
|
||||
sticker_set: StickerSet = await bot.invoke(
|
||||
GetStickerSet(stickerset=InputStickerSetShortName(short_name=sticker.set_name), hash=0))
|
||||
GetStickerSet(
|
||||
stickerset=InputStickerSetShortName(short_name=sticker.set_name), hash=0
|
||||
)
|
||||
)
|
||||
except Exception: # noqa
|
||||
return await message.edit('回复的贴纸不存在于任何贴纸包中。')
|
||||
return await message.edit("回复的贴纸不存在于任何贴纸包中。")
|
||||
|
||||
pack_file = os.path.join('data/sticker/', sticker_set.set.short_name, "pack.txt")
|
||||
pack_file = os.path.join("data/sticker/", sticker_set.set.short_name, "pack.txt")
|
||||
|
||||
if os.path.isfile(pack_file):
|
||||
os.remove(pack_file)
|
||||
@ -39,20 +42,33 @@ async def download_stickers(bot: Client, message: Message, sticker: Sticker):
|
||||
|
||||
async def download(sticker_, emojis_, path, file):
|
||||
sticker_file = Document._parse(bot, sticker_, "sticker.webp") # noqa
|
||||
await bot.download_media(sticker_file.file_id, file_name=os.path.join(path, file))
|
||||
await bot.download_media(
|
||||
sticker_file.file_id, file_name=os.path.join(path, file)
|
||||
)
|
||||
|
||||
with open(pack_file, "a") as f:
|
||||
f.write(f"{{'image_file': '{file}','emojis':{emojis_[sticker_.id]}}},")
|
||||
|
||||
pending_tasks = [asyncio.ensure_future(
|
||||
download(document, emojis, f"data/sticker/{sticker_set.set.short_name}", f"{i:03d}.{file_ext_ns_ion}")
|
||||
) for i, document in enumerate(sticker_set.documents)]
|
||||
pending_tasks = [
|
||||
asyncio.ensure_future(
|
||||
download(
|
||||
document,
|
||||
emojis,
|
||||
f"data/sticker/{sticker_set.set.short_name}",
|
||||
f"{i:03d}.{file_ext_ns_ion}",
|
||||
)
|
||||
)
|
||||
for i, document in enumerate(sticker_set.documents)
|
||||
]
|
||||
|
||||
message: Message = await message.edit(
|
||||
f"正在下载 {sticker_set.set.short_name} 中的 {sticker_set.set.count} 张贴纸。。。")
|
||||
f"正在下载 {sticker_set.set.short_name} 中的 {sticker_set.set.count} 张贴纸。。。"
|
||||
)
|
||||
|
||||
while 1:
|
||||
done, pending_tasks = await asyncio.wait(pending_tasks, timeout=2.5, return_when=asyncio.FIRST_COMPLETED)
|
||||
done, pending_tasks = await asyncio.wait(
|
||||
pending_tasks, timeout=2.5, return_when=asyncio.FIRST_COMPLETED
|
||||
)
|
||||
if not pending_tasks:
|
||||
break
|
||||
await upload_sticker(bot, message, sticker_set)
|
||||
@ -69,7 +85,8 @@ async def upload_sticker(bot: Client, message: Message, sticker_set: StickerSet)
|
||||
message.chat.id,
|
||||
f"{directory_name}.zip",
|
||||
caption=sticker_set.set.short_name,
|
||||
reply_to_message_id=message.reply_to_message_id or message.reply_to_top_message_id,
|
||||
reply_to_message_id=message.reply_to_message_id
|
||||
or message.reply_to_top_message_id,
|
||||
)
|
||||
safe_remove(f"{directory_name}.zip")
|
||||
shutil.rmtree(directory_name)
|
||||
@ -82,19 +99,22 @@ async def get_custom_emojis(bot: Client, message: Message):
|
||||
for entity in message.entities:
|
||||
if entity.type == MessageEntityType.CUSTOM_EMOJI:
|
||||
try:
|
||||
sticker = await bot.get_custom_emoji_stickers([entity.custom_emoji_id])
|
||||
sticker = await bot.get_custom_emoji_stickers(
|
||||
[entity.custom_emoji_id]
|
||||
)
|
||||
except Exception:
|
||||
return None
|
||||
return sticker[0] if sticker else None
|
||||
|
||||
|
||||
@listener(command="getstickers",
|
||||
description="获取整个贴纸包的贴纸")
|
||||
@listener(command="getstickers", description="获取整个贴纸包的贴纸")
|
||||
async def get_stickers(bot: Client, message: Message):
|
||||
if not os.path.isdir('data/sticker/'):
|
||||
os.makedirs('data/sticker/')
|
||||
if not os.path.isdir("data/sticker/"):
|
||||
os.makedirs("data/sticker/")
|
||||
if message.reply_to_message:
|
||||
sticker = message.reply_to_message.sticker or await get_custom_emojis(bot, message.reply_to_message)
|
||||
sticker = message.reply_to_message.sticker or await get_custom_emojis(
|
||||
bot, message.reply_to_message
|
||||
)
|
||||
else:
|
||||
sticker = message.sticker or await get_custom_emojis(bot, message)
|
||||
if not sticker:
|
||||
|
21
gfw/main.py
21
gfw/main.py
@ -22,14 +22,12 @@ def get_ip(domain):
|
||||
|
||||
|
||||
async def post(host):
|
||||
url = 'https://api.potatonet.idc.wiki/network/simple_health_check/scripts/gfw_check'
|
||||
data = {'host': host}
|
||||
url = "https://api.potatonet.idc.wiki/network/simple_health_check/scripts/gfw_check"
|
||||
data = {"host": host}
|
||||
return await requests.post(url, data=data)
|
||||
|
||||
|
||||
@listener(command="gfw",
|
||||
parameters="[text]",
|
||||
description="查询是否被墙")
|
||||
@listener(command="gfw", parameters="[text]", description="查询是否被墙")
|
||||
async def gfw(message: Message):
|
||||
text = None
|
||||
if message.arguments:
|
||||
@ -53,10 +51,15 @@ async def gfw(message: Message):
|
||||
except Exception as e:
|
||||
return await message.edit(f"出错了呜呜呜 ~ 查询失败。{e}")
|
||||
|
||||
if data['success']:
|
||||
if data['data']['tcp']['cn'] == data['data']['tcp']['!cn'] and data['data']['icmp']['cn'] == \
|
||||
data['data']['icmp']['!cn']:
|
||||
if data['data']['tcp']['cn'] == False and data['data']['icmp']['cn'] == False:
|
||||
if data["success"]:
|
||||
if (
|
||||
data["data"]["tcp"]["cn"] == data["data"]["tcp"]["!cn"]
|
||||
and data["data"]["icmp"]["cn"] == data["data"]["icmp"]["!cn"]
|
||||
):
|
||||
if (
|
||||
data["data"]["tcp"]["cn"] == False
|
||||
and data["data"]["icmp"]["cn"] == False
|
||||
):
|
||||
reply = f"IP: {text}\n状态: 全球不通,不能判断是否被墙"
|
||||
else:
|
||||
reply = f"IP: {text}\n状态: 未被墙"
|
||||
|
@ -8,27 +8,28 @@ pip_install("magic-google", alias="magic_google")
|
||||
from magic_google import MagicGoogle
|
||||
|
||||
|
||||
@listener(command="google",
|
||||
description=lang('google_des'),
|
||||
parameters="[query]")
|
||||
@listener(command="google", description=lang("google_des"), parameters="[query]")
|
||||
async def google(message: Message):
|
||||
""" Searches Google for a string. """
|
||||
"""Searches Google for a string."""
|
||||
query = message.arguments
|
||||
if not query:
|
||||
if not message.reply_to_message:
|
||||
return await message.edit(lang('arg_error'))
|
||||
return await message.edit(lang("arg_error"))
|
||||
query = message.reply_to_message.text
|
||||
mg = MagicGoogle()
|
||||
query = query.replace(' ', '+')
|
||||
query = query.replace(" ", "+")
|
||||
if not Config.SILENT:
|
||||
message = await message.edit(lang('google_processing'))
|
||||
message = await message.edit(lang("google_processing"))
|
||||
results = ""
|
||||
for i in mg.search(query=query, num=5):
|
||||
try:
|
||||
title = i['text'][:30] + '...'
|
||||
link = i['url']
|
||||
results += f"\n<a href=\"{link}\">{title}</a> \n"
|
||||
title = i["text"][:30] + "..."
|
||||
link = i["url"]
|
||||
results += f'\n<a href="{link}">{title}</a> \n'
|
||||
except Exception:
|
||||
return await message.edit(lang('google_connection_error'))
|
||||
await message.edit(f"<b>Google</b> |<code>{query}</code>| 🎙 🔍 \n{results}", disable_web_page_preview=True)
|
||||
return await message.edit(lang("google_connection_error"))
|
||||
await message.edit(
|
||||
f"<b>Google</b> |<code>{query}</code>| 🎙 🔍 \n{results}",
|
||||
disable_web_page_preview=True,
|
||||
)
|
||||
await log(f"{lang('google_success')} `{query}`")
|
||||
|
182
his/main.py
182
his/main.py
@ -11,67 +11,67 @@ from pagermaid.config import Config
|
||||
class HisMsg:
|
||||
LANGUAGES = {
|
||||
"en": {
|
||||
"name": "",
|
||||
"arg": "<user> [-n <num>]",
|
||||
"help": "Query the message history of the specified user in the group\n"
|
||||
f"Usage: \n`,{alias_command('his')} <user> [-n <num>]`"
|
||||
"\n <i>user</i>: username or user_id; <i>num</i>: Limits the number of messages to be retrieved\n"
|
||||
"You can just reply to a message without <i>user</i> argument",
|
||||
"processing": f",{alias_command('his')}: Querying...",
|
||||
"media": {
|
||||
"AUDIO": "[AUDIO]:",
|
||||
"DOCUMENT": "[DOCUMENT]:",
|
||||
"PHOTO": "[PHOTO]:",
|
||||
"STICKER": "[STICKER]:",
|
||||
"VIDEO": "[VIDEO]:",
|
||||
"ANIMATION": "[ANIMATION]:",
|
||||
"VOICE": "[VOICE]:",
|
||||
"VIDEO_NOTE": "[VIDEO_NOTE]:",
|
||||
"CONTACT": "[CONTACT]:",
|
||||
"LOCATION": "[LOCATION]:",
|
||||
"VENUE": "[VENUE]:",
|
||||
"POLL": "[POLL]:",
|
||||
"WEB_PAGE": "[WEB_PAGE]:",
|
||||
"DICE": "[DICE]:",
|
||||
"GAME": "[GAME]:"
|
||||
},
|
||||
"service": {
|
||||
"service": "[Service_Message]: ",
|
||||
"PINNED_MESSAGE": "Pinned: ",
|
||||
"NEW_CHAT_TITLE": "New chat title: ",
|
||||
},
|
||||
"query_success": "Queryed history message. chat_id: {chat_id} user: {user}"
|
||||
"name": "",
|
||||
"arg": "<user> [-n <num>]",
|
||||
"help": "Query the message history of the specified user in the group\n"
|
||||
f"Usage: \n`,{alias_command('his')} <user> [-n <num>]`"
|
||||
"\n <i>user</i>: username or user_id; <i>num</i>: Limits the number of messages to be retrieved\n"
|
||||
"You can just reply to a message without <i>user</i> argument",
|
||||
"processing": f",{alias_command('his')}: Querying...",
|
||||
"media": {
|
||||
"AUDIO": "[AUDIO]:",
|
||||
"DOCUMENT": "[DOCUMENT]:",
|
||||
"PHOTO": "[PHOTO]:",
|
||||
"STICKER": "[STICKER]:",
|
||||
"VIDEO": "[VIDEO]:",
|
||||
"ANIMATION": "[ANIMATION]:",
|
||||
"VOICE": "[VOICE]:",
|
||||
"VIDEO_NOTE": "[VIDEO_NOTE]:",
|
||||
"CONTACT": "[CONTACT]:",
|
||||
"LOCATION": "[LOCATION]:",
|
||||
"VENUE": "[VENUE]:",
|
||||
"POLL": "[POLL]:",
|
||||
"WEB_PAGE": "[WEB_PAGE]:",
|
||||
"DICE": "[DICE]:",
|
||||
"GAME": "[GAME]:",
|
||||
},
|
||||
"service": {
|
||||
"service": "[Service_Message]: ",
|
||||
"PINNED_MESSAGE": "Pinned: ",
|
||||
"NEW_CHAT_TITLE": "New chat title: ",
|
||||
},
|
||||
"query_success": "Queryed history message. chat_id: {chat_id} user: {user}",
|
||||
},
|
||||
"zh-cn": {
|
||||
"help": "查询指定用户在群内的发言历史\n"
|
||||
f"使用方法: \n`,{alias_command('his')} <user> [-n <num>]`"
|
||||
"\n <i>user</i>: 可以是用户名或者用户id; <i>num</i>: 可选,消息数量\n"
|
||||
"你也可以直接回复一条消息,不带 <i>user</i> 参数",
|
||||
"processing": f",{alias_command('his')}: 正在查询...",
|
||||
"media": {
|
||||
"AUDIO": "[音频]:",
|
||||
"DOCUMENT": "[文档]:",
|
||||
"PHOTO": "[图片]:",
|
||||
"STICKER": "[贴纸]:",
|
||||
"VIDEO": "[视频]:",
|
||||
"ANIMATION": "[动画表情]:",
|
||||
"VOICE": "[语音]:",
|
||||
"VIDEO_NOTE": "[视频备注]:",
|
||||
"CONTACT": "[联系人]:",
|
||||
"LOCATION": "[位置]:",
|
||||
"VENUE": "[场地]:",
|
||||
"POLL": "[投票]:",
|
||||
"WEB_PAGE": "[网页]:",
|
||||
"DICE": "[骰子]:",
|
||||
"GAME": "[游戏]:"
|
||||
},
|
||||
"service": {
|
||||
"service": "[服务消息]: ",
|
||||
"PINNED_MESSAGE": "置顶了: ",
|
||||
"NEW_CHAT_TITLE": "新的群组名字: ",
|
||||
},
|
||||
"query_success": "查询历史消息完成. 群组id: {chat_id} 用户: {user}"
|
||||
}
|
||||
"help": "查询指定用户在群内的发言历史\n"
|
||||
f"使用方法: \n`,{alias_command('his')} <user> [-n <num>]`"
|
||||
"\n <i>user</i>: 可以是用户名或者用户id; <i>num</i>: 可选,消息数量\n"
|
||||
"你也可以直接回复一条消息,不带 <i>user</i> 参数",
|
||||
"processing": f",{alias_command('his')}: 正在查询...",
|
||||
"media": {
|
||||
"AUDIO": "[音频]:",
|
||||
"DOCUMENT": "[文档]:",
|
||||
"PHOTO": "[图片]:",
|
||||
"STICKER": "[贴纸]:",
|
||||
"VIDEO": "[视频]:",
|
||||
"ANIMATION": "[动画表情]:",
|
||||
"VOICE": "[语音]:",
|
||||
"VIDEO_NOTE": "[视频备注]:",
|
||||
"CONTACT": "[联系人]:",
|
||||
"LOCATION": "[位置]:",
|
||||
"VENUE": "[场地]:",
|
||||
"POLL": "[投票]:",
|
||||
"WEB_PAGE": "[网页]:",
|
||||
"DICE": "[骰子]:",
|
||||
"GAME": "[游戏]:",
|
||||
},
|
||||
"service": {
|
||||
"service": "[服务消息]: ",
|
||||
"PINNED_MESSAGE": "置顶了: ",
|
||||
"NEW_CHAT_TITLE": "新的群组名字: ",
|
||||
},
|
||||
"query_success": "查询历史消息完成. 群组id: {chat_id} 用户: {user}",
|
||||
},
|
||||
}
|
||||
MAX_COUNT = 30
|
||||
|
||||
@ -87,19 +87,22 @@ class HisMsg:
|
||||
res = text
|
||||
return res
|
||||
|
||||
|
||||
his_msg = HisMsg()
|
||||
|
||||
|
||||
@listener(command="his",
|
||||
groups_only=True,
|
||||
need_admin=True,
|
||||
description=his_msg.lang("help"),
|
||||
parameters=his_msg.lang("arg", "<user> [-n <num>]"))
|
||||
@listener(
|
||||
command="his",
|
||||
groups_only=True,
|
||||
need_admin=True,
|
||||
description=his_msg.lang("help"),
|
||||
parameters=his_msg.lang("arg", "<user> [-n <num>]"),
|
||||
)
|
||||
async def his(bot: Client, message: Message):
|
||||
user = ""
|
||||
num = 9999999
|
||||
chat_id = message.chat.id
|
||||
# 指定用户和数量
|
||||
# 指定用户和数量
|
||||
try:
|
||||
if len(message.parameter) == 3 and message.parameter[1] == "-n":
|
||||
user = message.parameter[0]
|
||||
@ -108,52 +111,71 @@ async def his(bot: Client, message: Message):
|
||||
elif len(message.parameter) == 1:
|
||||
user = message.parameter[0]
|
||||
# 回复消息+指定数量
|
||||
elif len(message.parameter) == 2 and (message.reply_to_message_id is not None) and message.parameter[0] == "-n" :
|
||||
elif (
|
||||
len(message.parameter) == 2
|
||||
and (message.reply_to_message_id is not None)
|
||||
and message.parameter[0] == "-n"
|
||||
):
|
||||
user = int(message.reply_to_message.from_user.id)
|
||||
num = int(message.parameter[1])
|
||||
# 回复消息
|
||||
elif (message.reply_to_message_id is not None):
|
||||
elif message.reply_to_message_id is not None:
|
||||
user = int(message.reply_to_message.from_user.id)
|
||||
# 预期外的调用方式
|
||||
else:
|
||||
return await message.edit(his_msg.lang('help'))
|
||||
return await message.edit(his_msg.lang("help"))
|
||||
except Exception:
|
||||
return await message.edit(his_msg.lang('help'))
|
||||
return await message.edit(his_msg.lang("help"))
|
||||
await message.edit(his_msg.lang("processing"))
|
||||
|
||||
count = 0
|
||||
results = ""
|
||||
try:
|
||||
async for msg in bot.search_messages(chat_id, limit=min(num, his_msg.MAX_COUNT), from_user=user):
|
||||
async for msg in bot.search_messages(
|
||||
chat_id, limit=min(num, his_msg.MAX_COUNT), from_user=user
|
||||
):
|
||||
if msg.empty:
|
||||
continue
|
||||
count += 1
|
||||
message_link = msg.link
|
||||
message_text = msg.text
|
||||
|
||||
if message_text is None and msg.media is not None: # 媒体消息
|
||||
if message_text is None and msg.media is not None: # 媒体消息
|
||||
media_type = str(msg.media).split(".")[1]
|
||||
media_caption = msg.caption if msg.caption is not None else ""
|
||||
message_text = his_msg.lang("media")[media_type] + media_caption
|
||||
if msg.service is not None: # 服务消息
|
||||
if msg.service is not None: # 服务消息
|
||||
service_text = ""
|
||||
service_type = str(msg.service).split(".")[1]
|
||||
if service_type == "PINNED_MESSAGE" and msg.pinned_message.text is not None:
|
||||
service_text = his_msg.lang("service")[service_type] + msg.pinned_message.text[:20]
|
||||
elif service_type == "NEW_CHAT_TITLE" and msg.new_chat_title is not None:
|
||||
service_text = his_msg.lang("service")[service_type] + msg.new_chat_title
|
||||
if (
|
||||
service_type == "PINNED_MESSAGE"
|
||||
and msg.pinned_message.text is not None
|
||||
):
|
||||
service_text = (
|
||||
his_msg.lang("service")[service_type]
|
||||
+ msg.pinned_message.text[:20]
|
||||
)
|
||||
elif (
|
||||
service_type == "NEW_CHAT_TITLE" and msg.new_chat_title is not None
|
||||
):
|
||||
service_text = (
|
||||
his_msg.lang("service")[service_type] + msg.new_chat_title
|
||||
)
|
||||
else:
|
||||
service_text = service_type
|
||||
message_text = his_msg.lang("service")["service"] + service_text
|
||||
|
||||
if len(message_text) > 20: # 消息过长截取前面的
|
||||
if len(message_text) > 20: # 消息过长截取前面的
|
||||
message_text = f"{count}. {message_text[:20]}..."
|
||||
else:
|
||||
message_text = f"{count}. {message_text}"
|
||||
results += f"\n<a href=\"{message_link}\">{message_text}</a> \n"
|
||||
results += f'\n<a href="{message_link}">{message_text}</a> \n'
|
||||
|
||||
await message.edit(f"<b>Message History</b> | <code>{user}</code> | 🔍 \n{results}", disable_web_page_preview=True)
|
||||
await log(his_msg.lang('query_success').format(chat_id=chat_id, user=user))
|
||||
await message.edit(
|
||||
f"<b>Message History</b> | <code>{user}</code> | 🔍 \n{results}",
|
||||
disable_web_page_preview=True,
|
||||
)
|
||||
await log(his_msg.lang("query_success").format(chat_id=chat_id, user=user))
|
||||
except Exception as e:
|
||||
await message.edit(f"[HIS_ERROR]: {e}")
|
||||
await log(f"[HIS_ERROR]: {e}")
|
||||
|
@ -3,29 +3,40 @@ from pagermaid.enums import Message, AsyncClient
|
||||
from pagermaid.utils import lang
|
||||
|
||||
|
||||
@listener(command="hitokoto",
|
||||
description=lang('hitokoto_des'))
|
||||
@listener(command="hitokoto", description=lang("hitokoto_des"))
|
||||
async def hitokoto(request: AsyncClient, message: Message):
|
||||
hitokoto_while = 1
|
||||
hitokoto_json = None
|
||||
try:
|
||||
hitokoto_json = (await request.get("https://v1.hitokoto.cn/?charset=utf-8")).json()
|
||||
hitokoto_json = (
|
||||
await request.get("https://v1.hitokoto.cn/?charset=utf-8")
|
||||
).json()
|
||||
except ValueError:
|
||||
while hitokoto_while < 10:
|
||||
hitokoto_while += 1
|
||||
try:
|
||||
hitokoto_json = (await request.get("https://v1.hitokoto.cn/?charset=utf-8")).json()
|
||||
hitokoto_json = (
|
||||
await request.get("https://v1.hitokoto.cn/?charset=utf-8")
|
||||
).json()
|
||||
break
|
||||
except Exception:
|
||||
continue
|
||||
if not hitokoto_json:
|
||||
return
|
||||
hitokoto_type = {'a': lang('hitokoto_type_anime'), 'b': lang('hitokoto_type_manga'),
|
||||
'c': lang('hitokoto_type_game'), 'd': lang('hitokoto_type_article'),
|
||||
'e': lang('hitokoto_type_original'), 'f': lang('hitokoto_type_web'),
|
||||
'g': lang('hitokoto_type_other'), 'h': lang('hitokoto_type_movie'),
|
||||
'i': lang('hitokoto_type_poem'), 'j': lang('hitokoto_type_netease_music'),
|
||||
'k': lang('hitokoto_type_philosophy'), 'l': lang('hitokoto_type_meme')}
|
||||
hitokoto_type = {
|
||||
"a": lang("hitokoto_type_anime"),
|
||||
"b": lang("hitokoto_type_manga"),
|
||||
"c": lang("hitokoto_type_game"),
|
||||
"d": lang("hitokoto_type_article"),
|
||||
"e": lang("hitokoto_type_original"),
|
||||
"f": lang("hitokoto_type_web"),
|
||||
"g": lang("hitokoto_type_other"),
|
||||
"h": lang("hitokoto_type_movie"),
|
||||
"i": lang("hitokoto_type_poem"),
|
||||
"j": lang("hitokoto_type_netease_music"),
|
||||
"k": lang("hitokoto_type_philosophy"),
|
||||
"l": lang("hitokoto_type_meme"),
|
||||
}
|
||||
add = ""
|
||||
if works := hitokoto_json["from"]:
|
||||
add += f"《{works}》"
|
||||
|
@ -21,6 +21,9 @@ async def httpcat(client: Client, message: Message, request: AsyncClient):
|
||||
message.chat.id,
|
||||
io,
|
||||
reply_to_message_id=(
|
||||
message.reply_to_message_id or message.reply_to_top_message_id
|
||||
) if message.outgoing else message.id)
|
||||
message.reply_to_message_id or message.reply_to_top_message_id
|
||||
)
|
||||
if message.outgoing
|
||||
else message.id,
|
||||
)
|
||||
await message.safe_delete()
|
||||
|
55
icp/main.py
55
icp/main.py
@ -13,15 +13,15 @@ from tld import get_fld
|
||||
|
||||
|
||||
async def post_data(path, data, content, token):
|
||||
url = 'https://hlwicpfwc.miit.gov.cn/icpproject_query/api/'
|
||||
client_ip = f'{str(randint(1, 254))}.{str(randint(1, 254))}.{str(randint(1, 254))}.{str(randint(1, 254))}'
|
||||
url = "https://hlwicpfwc.miit.gov.cn/icpproject_query/api/"
|
||||
client_ip = f"{str(randint(1, 254))}.{str(randint(1, 254))}.{str(randint(1, 254))}.{str(randint(1, 254))}"
|
||||
headers = {
|
||||
'Content-Type': content,
|
||||
'Origin': 'https://beian.miit.gov.cn/',
|
||||
'Referer': 'https://beian.miit.gov.cn/',
|
||||
'token': token,
|
||||
'Client-IP': client_ip,
|
||||
'X-Forwarded-For': client_ip
|
||||
"Content-Type": content,
|
||||
"Origin": "https://beian.miit.gov.cn/",
|
||||
"Referer": "https://beian.miit.gov.cn/",
|
||||
"token": token,
|
||||
"Client-IP": client_ip,
|
||||
"X-Forwarded-For": client_ip,
|
||||
}
|
||||
return await requests.post(url + path, data=data, headers=headers)
|
||||
|
||||
@ -29,35 +29,37 @@ async def post_data(path, data, content, token):
|
||||
async def icp_search(domain):
|
||||
md5 = hashlib.md5()
|
||||
timestamp = int(time.time())
|
||||
auth_key = f'testtest{timestamp}'
|
||||
md5.update(auth_key.encode('utf-8'))
|
||||
auth_key = f"testtest{timestamp}"
|
||||
md5.update(auth_key.encode("utf-8"))
|
||||
auth_key = md5.hexdigest()
|
||||
token = await post_data(
|
||||
'auth',
|
||||
f'authKey={auth_key}&timeStamp={timestamp}',
|
||||
'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
'0',
|
||||
"auth",
|
||||
f"authKey={auth_key}&timeStamp={timestamp}",
|
||||
"application/x-www-form-urlencoded;charset=UTF-8",
|
||||
"0",
|
||||
)
|
||||
token = token.json()
|
||||
if token.get("code", None) == 200:
|
||||
token = token['params']['bussiness']
|
||||
token = token["params"]["bussiness"]
|
||||
else:
|
||||
return {'isBeian': False, 'msg': '获取token失败'}
|
||||
return {"isBeian": False, "msg": "获取token失败"}
|
||||
|
||||
query = await post_data('icpAbbreviateInfo/queryByCondition', '{"pageNum":"","pageSize":"","unitName":"%s"}' % (
|
||||
domain), 'application/json;charset=UTF-8', token)
|
||||
query = await post_data(
|
||||
"icpAbbreviateInfo/queryByCondition",
|
||||
'{"pageNum":"","pageSize":"","unitName":"%s"}' % (domain),
|
||||
"application/json;charset=UTF-8",
|
||||
token,
|
||||
)
|
||||
query = query.json()
|
||||
if query.get("code", None) != 200:
|
||||
return {'isBeian': False, 'msg': '查询失败'}
|
||||
icp_list = query['params']['list']
|
||||
return {"isBeian": False, "msg": "查询失败"}
|
||||
icp_list = query["params"]["list"]
|
||||
if len(icp_list) <= 0:
|
||||
return {'isBeian': False, 'msg': '成功'}
|
||||
return {'isBeian': True, 'msg': '成功', 'data': icp_list[0]}
|
||||
return {"isBeian": False, "msg": "成功"}
|
||||
return {"isBeian": True, "msg": "成功", "data": icp_list[0]}
|
||||
|
||||
|
||||
@listener(command="icp",
|
||||
parameters="[域名]",
|
||||
description="查询域名是否已备案")
|
||||
@listener(command="icp", parameters="[域名]", description="查询域名是否已备案")
|
||||
async def icp_bei_an(message: Message):
|
||||
url = None
|
||||
if message.arguments:
|
||||
@ -84,7 +86,8 @@ async def icp_bei_an(message: Message):
|
||||
f"备案时间: {data.get('updateRecordTime', '')}\n"
|
||||
f"备案类型: {data.get('natureName', '')}\n"
|
||||
f"备案号: {data.get('serviceLicence', '')}\n"
|
||||
f"是否限制访问: {data.get('limitAccess', '')}")
|
||||
f"是否限制访问: {data.get('limitAccess', '')}"
|
||||
)
|
||||
elif data.get("msg", "") == "成功":
|
||||
await message.edit(f"域名 {url} 未备案!")
|
||||
else:
|
||||
|
@ -5,7 +5,9 @@ from pagermaid.enums import Message
|
||||
from pagermaid.listener import listener
|
||||
|
||||
|
||||
@listener(command="punyencode", description="编码至 Punycode", parameters="[待编码内容] (支持回复消息)")
|
||||
@listener(
|
||||
command="punyencode", description="编码至 Punycode", parameters="[待编码内容] (支持回复消息)"
|
||||
)
|
||||
async def punyencode(message: Message):
|
||||
if not (text := message.obtain_message()):
|
||||
return await message.edit("请输入参数")
|
||||
@ -16,7 +18,9 @@ async def punyencode(message: Message):
|
||||
await message.edit(f"`{encoded}`")
|
||||
|
||||
|
||||
@listener(command="punydecode", description="从 Punycode 解码", parameters="[待解码内容] (支持回复消息)")
|
||||
@listener(
|
||||
command="punydecode", description="从 Punycode 解码", parameters="[待解码内容] (支持回复消息)"
|
||||
)
|
||||
async def punydecode(message: Message):
|
||||
if not (text := message.obtain_message()):
|
||||
return await message.edit("请输入参数")
|
||||
|
75
ip/main.py
75
ip/main.py
@ -9,41 +9,68 @@ from pagermaid.services import client as requests
|
||||
async def get_ip_info(url: str) -> str:
|
||||
data = await requests.get(
|
||||
f"http://ip-api.com/json/{url}?fields=status,message,country,regionName,"
|
||||
f"city,lat,lon,isp,org,as,mobile,proxy,hosting,query")
|
||||
f"city,lat,lon,isp,org,as,mobile,proxy,hosting,query"
|
||||
)
|
||||
ipinfo_json = data.json()
|
||||
if ipinfo_json['status'] == 'fail':
|
||||
if ipinfo_json["status"] == "fail":
|
||||
return ""
|
||||
elif ipinfo_json['status'] == 'success':
|
||||
elif ipinfo_json["status"] == "success":
|
||||
ipinfo_list = [f"查询目标: `{url}`"]
|
||||
if ipinfo_json['query'] != url:
|
||||
ipinfo_list.extend(["解析地址: `" + ipinfo_json['query'] + "`"])
|
||||
if ipinfo_json["query"] != url:
|
||||
ipinfo_list.extend(["解析地址: `" + ipinfo_json["query"] + "`"])
|
||||
ipinfo_list.extend(
|
||||
[(("地区: `" + ipinfo_json['country'] + ' - ' + ipinfo_json['regionName'] + ' - ' + ipinfo_json['city']) + "`"),
|
||||
"经纬度: `" + str(ipinfo_json['lat']) + ',' + str(ipinfo_json['lon']) + "`",
|
||||
"ISP: `" + ipinfo_json['isp'] + "`"])
|
||||
if ipinfo_json['org'] != '':
|
||||
ipinfo_list.extend(["组织: `" + ipinfo_json['org'] + "`"])
|
||||
[
|
||||
(
|
||||
(
|
||||
"地区: `"
|
||||
+ ipinfo_json["country"]
|
||||
+ " - "
|
||||
+ ipinfo_json["regionName"]
|
||||
+ " - "
|
||||
+ ipinfo_json["city"]
|
||||
)
|
||||
+ "`"
|
||||
),
|
||||
"经纬度: `"
|
||||
+ str(ipinfo_json["lat"])
|
||||
+ ","
|
||||
+ str(ipinfo_json["lon"])
|
||||
+ "`",
|
||||
"ISP: `" + ipinfo_json["isp"] + "`",
|
||||
]
|
||||
)
|
||||
if ipinfo_json["org"] != "":
|
||||
ipinfo_list.extend(["组织: `" + ipinfo_json["org"] + "`"])
|
||||
with contextlib.suppress(Exception):
|
||||
ipinfo_list.extend(['[' + ipinfo_json['as'] + '](https://bgp.he.net/' + ipinfo_json['as'].split()[0] + ')'])
|
||||
if ipinfo_json['mobile']:
|
||||
ipinfo_list.extend(['此 IP 可能为**蜂窝移动数据 IP**'])
|
||||
if ipinfo_json['proxy']:
|
||||
ipinfo_list.extend(['此 IP 可能为**代理 IP**'])
|
||||
if ipinfo_json['hosting']:
|
||||
ipinfo_list.extend(['此 IP 可能为**数据中心 IP**'])
|
||||
ipinfo_list.extend(
|
||||
[
|
||||
"["
|
||||
+ ipinfo_json["as"]
|
||||
+ "](https://bgp.he.net/"
|
||||
+ ipinfo_json["as"].split()[0]
|
||||
+ ")"
|
||||
]
|
||||
)
|
||||
if ipinfo_json["mobile"]:
|
||||
ipinfo_list.extend(["此 IP 可能为**蜂窝移动数据 IP**"])
|
||||
if ipinfo_json["proxy"]:
|
||||
ipinfo_list.extend(["此 IP 可能为**代理 IP**"])
|
||||
if ipinfo_json["hosting"]:
|
||||
ipinfo_list.extend(["此 IP 可能为**数据中心 IP**"])
|
||||
return "\n".join(ipinfo_list)
|
||||
|
||||
|
||||
@listener(command="ip",
|
||||
description="IPINFO (或者回复一句话)",
|
||||
parameters="[ip/域名]")
|
||||
@listener(command="ip", description="IPINFO (或者回复一句话)", parameters="[ip/域名]")
|
||||
async def ipinfo(message: Message):
|
||||
reply = message.reply_to_message
|
||||
message: Message = await message.edit('正在查询中...')
|
||||
message: Message = await message.edit("正在查询中...")
|
||||
try:
|
||||
if reply:
|
||||
for num in range(len(reply.entities)):
|
||||
url = reply.text[reply.entities[num].offset:reply.entities[num].offset + reply.entities[num].length]
|
||||
url = reply.text[
|
||||
reply.entities[num].offset : reply.entities[num].offset
|
||||
+ reply.entities[num].length
|
||||
]
|
||||
url = urlparse(url)
|
||||
url = url.hostname or url.path
|
||||
await message.edit(await get_ip_info(url))
|
||||
@ -55,6 +82,6 @@ async def ipinfo(message: Message):
|
||||
url = message.arguments
|
||||
await message.edit(await get_ip_info(url))
|
||||
return
|
||||
await message.edit('没有找到要查询的 ip/域名 ...')
|
||||
await message.edit("没有找到要查询的 ip/域名 ...")
|
||||
except Exception:
|
||||
await message.edit('没有找到要查询的 ip/域名 ...')
|
||||
await message.edit("没有找到要查询的 ip/域名 ...")
|
||||
|
@ -12,7 +12,14 @@ class JIKIPediaDefinition:
|
||||
item_id: int
|
||||
image: Optional[str]
|
||||
|
||||
def __init__(self, plaintext: str, tags: List[Dict], title: str, item_id: int, image: Optional[str]):
|
||||
def __init__(
|
||||
self,
|
||||
plaintext: str,
|
||||
tags: List[Dict],
|
||||
title: str,
|
||||
item_id: int,
|
||||
image: Optional[str],
|
||||
):
|
||||
self.plaintext = plaintext
|
||||
self.tags = []
|
||||
for i in tags:
|
||||
@ -24,7 +31,9 @@ class JIKIPediaDefinition:
|
||||
|
||||
def format(self):
|
||||
plaintext = self.plaintext.replace("\u200b", "").replace("\u200c", "")
|
||||
tags = " ".join([f"#{x}" for x in list(self.tags)]) if self.tags else "该词条还没有Tag哦~"
|
||||
tags = (
|
||||
" ".join([f"#{x}" for x in list(self.tags)]) if self.tags else "该词条还没有Tag哦~"
|
||||
)
|
||||
|
||||
text = f"词条:【{self.title}】\n\n"
|
||||
text += f"{plaintext}\n\n"
|
||||
@ -63,7 +72,11 @@ class JIKIPedia:
|
||||
self.key = key
|
||||
|
||||
async def search(self):
|
||||
req = await httpx.post(url=self.url, headers=self.headers, json={"phrase": self.key, "page": 1, "size": 60})
|
||||
req = await httpx.post(
|
||||
url=self.url,
|
||||
headers=self.headers,
|
||||
json={"phrase": self.key, "page": 1, "size": 60},
|
||||
)
|
||||
return self.parse(**req.json())
|
||||
|
||||
def parse(self, **kwargs):
|
||||
@ -83,15 +96,15 @@ class JIKIPedia:
|
||||
image = ""
|
||||
if len(images) > 0:
|
||||
image = images[0].get("full", {}).get("path", "")
|
||||
self.definitions.append(JIKIPediaDefinition(plaintext, tags, title, item_id, image))
|
||||
self.definitions.append(
|
||||
JIKIPediaDefinition(plaintext, tags, title, item_id, image)
|
||||
)
|
||||
self.message = kwargs.get("message")
|
||||
if issubclass(type(self.message), dict):
|
||||
self.message = self.message.get("title", None)
|
||||
|
||||
|
||||
@listener(command="jikipedia",
|
||||
parameters="[关键词]",
|
||||
description="梗查询")
|
||||
@listener(command="jikipedia", parameters="[关键词]", description="梗查询")
|
||||
async def jikipedia(message: Message):
|
||||
if not message.arguments:
|
||||
return await message.edit("请输入关键词")
|
||||
|
@ -7,21 +7,18 @@ from pagermaid.utils import lang
|
||||
ju_pai_api = "https://api.txqq.pro/api/zt.php"
|
||||
|
||||
|
||||
@listener(
|
||||
command="jupai",
|
||||
description="生成举牌小人",
|
||||
parameters="[text/reply]"
|
||||
)
|
||||
@listener(command="jupai", description="生成举牌小人", parameters="[text/reply]")
|
||||
async def ju_pai(message: Message):
|
||||
text = message.obtain_message()
|
||||
if not text:
|
||||
return await message.edit(lang('arg_error'))
|
||||
return await message.edit(lang("arg_error"))
|
||||
try:
|
||||
image_url = f"{ju_pai_api}?msg={urllib.parse.quote(text)}"
|
||||
await message.reply_photo(
|
||||
image_url,
|
||||
quote=False,
|
||||
reply_to_message_id=message.reply_to_message_id or message.reply_to_top_message_id,
|
||||
reply_to_message_id=message.reply_to_message_id
|
||||
or message.reply_to_top_message_id,
|
||||
)
|
||||
await message.safe_delete()
|
||||
except Exception as e:
|
||||
|
107
keyword/main.py
107
keyword/main.py
@ -31,9 +31,23 @@ class KeywordTask:
|
||||
restrict: int
|
||||
delay_delete: int
|
||||
|
||||
def __init__(self, task_id: Optional[int] = None, cid: int = 0, key: str = "", msg: str = "", include: bool = True, regexp: bool = False,
|
||||
exact: bool = False, case: bool = False, ignore_forward: bool = False,
|
||||
reply: bool = True, delete: bool = False, ban: int = 0, restrict: int = 0, delay_delete: int = 0):
|
||||
def __init__(
|
||||
self,
|
||||
task_id: Optional[int] = None,
|
||||
cid: int = 0,
|
||||
key: str = "",
|
||||
msg: str = "",
|
||||
include: bool = True,
|
||||
regexp: bool = False,
|
||||
exact: bool = False,
|
||||
case: bool = False,
|
||||
ignore_forward: bool = False,
|
||||
reply: bool = True,
|
||||
delete: bool = False,
|
||||
ban: int = 0,
|
||||
restrict: int = 0,
|
||||
delay_delete: int = 0,
|
||||
):
|
||||
self.task_id = task_id
|
||||
self.cid = cid
|
||||
self.key = key
|
||||
@ -50,9 +64,22 @@ class KeywordTask:
|
||||
self.delay_delete = delay_delete
|
||||
|
||||
def export(self):
|
||||
return {"task_id": self.task_id, "cid": self.cid, "key": self.key, "msg": self.msg, "include": self.include, "regexp": self.regexp,
|
||||
"exact": self.exact, "case": self.case, "ignore_forward": self.ignore_forward, "reply": self.reply,
|
||||
"delete": self.delete, "ban": self.ban, "restrict": self.restrict, "delay_delete": self.delay_delete}
|
||||
return {
|
||||
"task_id": self.task_id,
|
||||
"cid": self.cid,
|
||||
"key": self.key,
|
||||
"msg": self.msg,
|
||||
"include": self.include,
|
||||
"regexp": self.regexp,
|
||||
"exact": self.exact,
|
||||
"case": self.case,
|
||||
"ignore_forward": self.ignore_forward,
|
||||
"reply": self.reply,
|
||||
"delete": self.delete,
|
||||
"ban": self.ban,
|
||||
"restrict": self.restrict,
|
||||
"delay_delete": self.delay_delete,
|
||||
}
|
||||
|
||||
def export_str(self, show_all: bool = False):
|
||||
text = f"<code>{self.task_id}</code> - "
|
||||
@ -89,19 +116,29 @@ class KeywordTask:
|
||||
|
||||
@staticmethod
|
||||
def mention_chat(chat: Chat):
|
||||
return f'<a href="https://t.me/{chat.username}">{chat.title}</a>' if chat.username \
|
||||
else f'<code>{chat.title}</code>'
|
||||
return (
|
||||
f'<a href="https://t.me/{chat.username}">{chat.title}</a>'
|
||||
if chat.username
|
||||
else f"<code>{chat.title}</code>"
|
||||
)
|
||||
|
||||
def replace_reply(self, message: Message):
|
||||
text = self.msg
|
||||
if message.from_user:
|
||||
text = text.replace("$mention", str(Link(
|
||||
f"tg://user?id={message.from_user.id}",
|
||||
message.from_user.first_name or "Deleted Account",
|
||||
ParseMode.HTML
|
||||
)))
|
||||
text = text.replace(
|
||||
"$mention",
|
||||
str(
|
||||
Link(
|
||||
f"tg://user?id={message.from_user.id}",
|
||||
message.from_user.first_name or "Deleted Account",
|
||||
ParseMode.HTML,
|
||||
)
|
||||
),
|
||||
)
|
||||
text = text.replace("$code_id", str(message.from_user.id))
|
||||
text = text.replace("$code_name", message.from_user.first_name or "Deleted Account")
|
||||
text = text.replace(
|
||||
"$code_name", message.from_user.first_name or "Deleted Account"
|
||||
)
|
||||
elif message.sender_chat:
|
||||
text = text.replace("$mention", self.mention_chat(message.sender_chat))
|
||||
text = text.replace("$code_id", str(message.sender_chat.id))
|
||||
@ -121,19 +158,27 @@ class KeywordTask:
|
||||
text = self.replace_reply(message)
|
||||
reply_id = message.id if self.reply else message.reply_to_top_message_id
|
||||
with contextlib.suppress(Exception):
|
||||
msg = await message.reply(text, parse_mode=ParseMode.HTML, reply_to_message_id=reply_id)
|
||||
msg = await message.reply(
|
||||
text, parse_mode=ParseMode.HTML, reply_to_message_id=reply_id
|
||||
)
|
||||
if self.delete:
|
||||
await message.safe_delete()
|
||||
uid = message.from_user.id if message.from_user else message.sender_chat.id
|
||||
if self.ban > 0:
|
||||
with contextlib.suppress(Exception):
|
||||
await bot.ban_chat_member(
|
||||
message.chat.id, uid, until_date=datetime.now() + timedelta(seconds=self.ban))
|
||||
message.chat.id,
|
||||
uid,
|
||||
until_date=datetime.now() + timedelta(seconds=self.ban),
|
||||
)
|
||||
if self.restrict > 0:
|
||||
with contextlib.suppress(Exception):
|
||||
await bot.restrict_chat_member(
|
||||
message.chat.id, uid, ChatPermissions(),
|
||||
until_date=datetime.now() + timedelta(seconds=self.restrict))
|
||||
message.chat.id,
|
||||
uid,
|
||||
ChatPermissions(),
|
||||
until_date=datetime.now() + timedelta(seconds=self.restrict),
|
||||
)
|
||||
if self.delay_delete > 0 and msg:
|
||||
add_delete_message_job(msg, self.delay_delete)
|
||||
|
||||
@ -246,7 +291,11 @@ class KeywordTasks:
|
||||
return [task.task_id for task in self.tasks]
|
||||
|
||||
def print_all_tasks(self, show_all: bool = False, cid: int = 0) -> str:
|
||||
return "\n".join(task.export_str(show_all) for task in self.tasks if task.cid == cid or show_all)
|
||||
return "\n".join(
|
||||
task.export_str(show_all)
|
||||
for task in self.tasks
|
||||
if task.cid == cid or show_all
|
||||
)
|
||||
|
||||
def save_to_file(self):
|
||||
data = [task.export() for task in self.tasks]
|
||||
@ -290,10 +339,12 @@ async def from_msg_get_task_ids(message: Message) -> List[int]:
|
||||
return id_list
|
||||
|
||||
|
||||
@listener(command="keyword",
|
||||
parameters="指定参数",
|
||||
need_admin=True,
|
||||
description="关键词回复\n\nhttps://telegra.ph/PagerMaid-keyword-07-12")
|
||||
@listener(
|
||||
command="keyword",
|
||||
parameters="指定参数",
|
||||
need_admin=True,
|
||||
description="关键词回复\n\nhttps://telegra.ph/PagerMaid-keyword-07-12",
|
||||
)
|
||||
async def keyword_set(message: Message):
|
||||
if message.arguments == "h" or len(message.parameter) == 0:
|
||||
return await message.edit("关键词回复\n\nhttps://telegra.ph/PagerMaid-keyword-07-12")
|
||||
@ -301,12 +352,15 @@ async def keyword_set(message: Message):
|
||||
if message.parameter[0] == "list":
|
||||
if keyword_tasks.get_all_ids():
|
||||
return await message.edit(
|
||||
f"关键词任务:\n\n{keyword_tasks.print_all_tasks(show_all=False, cid=message.chat.id)}")
|
||||
f"关键词任务:\n\n{keyword_tasks.print_all_tasks(show_all=False, cid=message.chat.id)}"
|
||||
)
|
||||
else:
|
||||
return await message.edit("没有关键词任务。")
|
||||
elif message.parameter[0] == "alias":
|
||||
if keyword_alias.get(message.chat.id):
|
||||
return await message.edit(f"当前群组的关键字将继承:{keyword_alias.get(message.chat.id)}")
|
||||
return await message.edit(
|
||||
f"当前群组的关键字将继承:{keyword_alias.get(message.chat.id)}"
|
||||
)
|
||||
else:
|
||||
return await message.edit("当前群组没有继承。")
|
||||
elif len(message.parameter) == 2:
|
||||
@ -319,7 +373,8 @@ async def keyword_set(message: Message):
|
||||
elif message.parameter[0] == "list":
|
||||
if keyword_tasks.get_all_ids():
|
||||
return await message.edit(
|
||||
f"关键词任务:\n\n{keyword_tasks.print_all_tasks(show_all=True)}")
|
||||
f"关键词任务:\n\n{keyword_tasks.print_all_tasks(show_all=True)}"
|
||||
)
|
||||
else:
|
||||
return await message.edit("没有关键词任务。")
|
||||
elif message.parameter[0] == "alias":
|
||||
|
@ -4,11 +4,9 @@ from pagermaid.listener import listener
|
||||
from pyrogram.raw.functions.channels import GetAdminedPublicChannels
|
||||
|
||||
|
||||
@listener(command="listusernames",
|
||||
admins_only=True,
|
||||
description="列出所有属于自己的公开群组/频道。")
|
||||
@listener(command="listusernames", admins_only=True, description="列出所有属于自己的公开群组/频道。")
|
||||
async def list_usernames(bot: Client, message: Message):
|
||||
""" Get a list of your reserved usernames. """
|
||||
"""Get a list of your reserved usernames."""
|
||||
result = await bot.invoke(GetAdminedPublicChannels())
|
||||
output = f"以下是属于我的 {len(result.chats)} 个所有公开群组/频道:\n\n"
|
||||
for i in result.chats:
|
||||
|
@ -9,7 +9,14 @@ from pagermaid.sub_utils import Sub
|
||||
from pagermaid.scheduler import add_delete_message_job
|
||||
|
||||
lottery_bot = Sub("lottery_bot")
|
||||
lottery_json = {"start": False, "chat_id": 0, "num": 0, "win": 0, "title": "", "keyword": ""}
|
||||
lottery_json = {
|
||||
"start": False,
|
||||
"chat_id": 0,
|
||||
"num": 0,
|
||||
"win": 0,
|
||||
"title": "",
|
||||
"keyword": "",
|
||||
}
|
||||
create_text = """抽奖活动 <b>{}</b> 已经创建
|
||||
奖品数量:<b>{}</b>
|
||||
参与人数达到 <b>{}</b> 人,即可开奖
|
||||
@ -29,7 +36,7 @@ end_empty_text = """<b>{}</b> 已开奖,没有中奖用户"""
|
||||
|
||||
async def lottery_end():
|
||||
lottery_json["start"] = False
|
||||
all_user = lottery_bot.get_subs()[:lottery_json["num"]]
|
||||
all_user = lottery_bot.get_subs()[: lottery_json["num"]]
|
||||
secret_generator = secrets.SystemRandom()
|
||||
win_user = []
|
||||
win_user_num = min(lottery_json["win"], len(all_user))
|
||||
@ -40,10 +47,14 @@ async def lottery_end():
|
||||
win_user.append(temp)
|
||||
if len(win_user) >= win_user_num:
|
||||
break
|
||||
win_text = end_text.format(
|
||||
lottery_json["title"],
|
||||
"\n".join(f"<a href=\"tg://user?id={uid}\">@{uid}</a>" for uid in win_user
|
||||
)) if win_user else end_empty_text.format(lottery_json["title"])
|
||||
win_text = (
|
||||
end_text.format(
|
||||
lottery_json["title"],
|
||||
"\n".join(f'<a href="tg://user?id={uid}">@{uid}</a>' for uid in win_user),
|
||||
)
|
||||
if win_user
|
||||
else end_empty_text.format(lottery_json["title"])
|
||||
)
|
||||
with contextlib.suppress(Exception):
|
||||
await bot.send_message(lottery_json["chat_id"], win_text)
|
||||
with contextlib.suppress(Exception):
|
||||
@ -78,7 +89,9 @@ async def handle_lottery(_, message: Message):
|
||||
lottery_json["title"],
|
||||
lottery_json["win"],
|
||||
lottery_json["num"],
|
||||
all_join))
|
||||
all_join,
|
||||
)
|
||||
)
|
||||
add_delete_message_job(reply, 15)
|
||||
if all_join >= lottery_json["num"]:
|
||||
lottery_json["start"] = False
|
||||
@ -99,15 +112,18 @@ async def create_lottery(chat_id: int, num: int, win: int, title: str, keyword:
|
||||
await bot.send_message(chat_id, create_text.format(title, win, num, keyword))
|
||||
|
||||
|
||||
@listener(command="lottery",
|
||||
groups_only=True,
|
||||
need_admin=True,
|
||||
parameters="[奖品数/人数] [关键词] [标题] / 强制开奖",
|
||||
description=f"举行抽奖活动\n\n例如:,{alias_command('lottery')} 1/10 测试 测试")
|
||||
@listener(
|
||||
command="lottery",
|
||||
groups_only=True,
|
||||
need_admin=True,
|
||||
parameters="[奖品数/人数] [关键词] [标题] / 强制开奖",
|
||||
description=f"举行抽奖活动\n\n例如:,{alias_command('lottery')} 1/10 测试 测试",
|
||||
)
|
||||
async def lottery(message: Message):
|
||||
if not message.arguments:
|
||||
return await message.edit(
|
||||
f"请输入 奖品数、人数等参数 或者 强制开奖\n\n例如 `,{alias_command('lottery')} 1/10 测试 测试`")
|
||||
f"请输入 奖品数、人数等参数 或者 强制开奖\n\n例如 `,{alias_command('lottery')} 1/10 测试 测试`"
|
||||
)
|
||||
if message.arguments == "强制开奖":
|
||||
await message.edit("强制开奖成功。")
|
||||
return await lottery_end()
|
||||
|
@ -26,10 +26,11 @@ lu_xiao_xun_sticker: Optional[StickerSet] = None
|
||||
async def load_bs_sticker():
|
||||
global lu_xiao_xun_sticker
|
||||
try:
|
||||
lu_xiao_xun_sticker = await bot.invoke(GetStickerSet(
|
||||
stickerset=InputStickerSetShortName(short_name="luxiaoxunbs"),
|
||||
hash=0
|
||||
))
|
||||
lu_xiao_xun_sticker = await bot.invoke(
|
||||
GetStickerSet(
|
||||
stickerset=InputStickerSetShortName(short_name="luxiaoxunbs"), hash=0
|
||||
)
|
||||
)
|
||||
except Exception:
|
||||
lu_xiao_xun_sticker = None
|
||||
|
||||
@ -46,7 +47,9 @@ async def get_bs_sticker():
|
||||
hour %= 12
|
||||
if hour == -1:
|
||||
hour = 11
|
||||
return Document._parse(bot, lu_xiao_xun_sticker.documents[hour % 12], "sticker.webp") # noqa
|
||||
return Document._parse(
|
||||
bot, lu_xiao_xun_sticker.documents[hour % 12], "sticker.webp"
|
||||
) # noqa
|
||||
|
||||
|
||||
@scheduler.scheduled_job("cron", minute="0", id="lu_xiao_xun_bs.push")
|
||||
@ -62,9 +65,9 @@ async def lu_xiao_xun_bs_subscribe() -> None:
|
||||
lu_xiao_xun_bs_sub.del_id(gid)
|
||||
|
||||
|
||||
@listener(command="luxiaoxunbs",
|
||||
parameters="订阅/退订",
|
||||
description="整点报时,每小时定时发送,自动删除上一条消息")
|
||||
@listener(
|
||||
command="luxiaoxunbs", parameters="订阅/退订", description="整点报时,每小时定时发送,自动删除上一条消息"
|
||||
)
|
||||
async def lu_xiao_xun_bs(_: Client, message: Message):
|
||||
if not message.arguments:
|
||||
return await message.edit("请输入订阅/退订")
|
||||
|
22
moyu/main.py
22
moyu/main.py
@ -47,11 +47,9 @@ async def calendar_subscribe() -> None:
|
||||
moyu_sub.del_id(gid)
|
||||
|
||||
|
||||
@listener(command="moyu",
|
||||
parameters="订阅/退订",
|
||||
description="查看今日摸鱼日历,支持订阅/退订每天上午八点定时发送")
|
||||
@listener(command="moyu", parameters="订阅/退订", description="查看今日摸鱼日历,支持订阅/退订每天上午八点定时发送")
|
||||
async def moyu(_: Client, message: Message):
|
||||
""" 摸鱼日历 """
|
||||
"""摸鱼日历"""
|
||||
if not message.arguments:
|
||||
try:
|
||||
await get_calendar()
|
||||
@ -60,17 +58,25 @@ async def moyu(_: Client, message: Message):
|
||||
await message.safe_delete()
|
||||
await push_moyu(message.chat.id, delete=True)
|
||||
elif message.arguments == "订阅":
|
||||
if from_self(message) or enforce_permission(from_msg_get_sudo_uid(message), "modules.manage_subs"):
|
||||
if from_self(message) or enforce_permission(
|
||||
from_msg_get_sudo_uid(message), "modules.manage_subs"
|
||||
):
|
||||
if moyu_sub.check_id(message.chat.id):
|
||||
return await edit_delete(message, "❌ 你已经订阅了摸鱼日历", parse_mode=ParseMode.HTML)
|
||||
return await edit_delete(
|
||||
message, "❌ 你已经订阅了摸鱼日历", parse_mode=ParseMode.HTML
|
||||
)
|
||||
moyu_sub.add_id(message.chat.id)
|
||||
await message.edit("你已经成功订阅了摸鱼日历")
|
||||
else:
|
||||
await edit_delete(message, "❌ 权限不足,无法订阅摸鱼日历", parse_mode=ParseMode.HTML)
|
||||
elif message.arguments == "退订":
|
||||
if from_self(message) or enforce_permission(from_msg_get_sudo_uid(message), "modules.manage_subs"):
|
||||
if from_self(message) or enforce_permission(
|
||||
from_msg_get_sudo_uid(message), "modules.manage_subs"
|
||||
):
|
||||
if not moyu_sub.check_id(message.chat.id):
|
||||
return await edit_delete(message, "❌ 你还没有订阅摸鱼日历", parse_mode=ParseMode.HTML)
|
||||
return await edit_delete(
|
||||
message, "❌ 你还没有订阅摸鱼日历", parse_mode=ParseMode.HTML
|
||||
)
|
||||
moyu_sub.del_id(message.chat.id)
|
||||
await message.edit("你已经成功退订了摸鱼日历")
|
||||
else:
|
||||
|
@ -34,14 +34,17 @@ async def netease_search(keyword: str, message: Message):
|
||||
if not answer.reply_markup:
|
||||
return await message.edit(answer.text.html)
|
||||
await bot.request_callback_answer(
|
||||
answer.chat.id, answer.id,
|
||||
callback_data=answer.reply_markup.inline_keyboard[0][0].callback_data)
|
||||
answer.chat.id,
|
||||
answer.id,
|
||||
callback_data=answer.reply_markup.inline_keyboard[0][0].callback_data,
|
||||
)
|
||||
await conv.mark_as_read()
|
||||
answer: Message = await conv.get_response(filters=filters.audio)
|
||||
await conv.mark_as_read()
|
||||
await answer.copy(
|
||||
message.chat.id,
|
||||
reply_to_message_id=message.reply_to_message_id or message.reply_to_top_message_id
|
||||
reply_to_message_id=message.reply_to_message_id
|
||||
or message.reply_to_top_message_id,
|
||||
)
|
||||
await message.safe_delete()
|
||||
|
||||
@ -54,7 +57,8 @@ async def netease_url(url: str, message: Message):
|
||||
await conv.mark_as_read()
|
||||
await answer.copy(
|
||||
message.chat.id,
|
||||
reply_to_message_id=message.reply_to_message_id or message.reply_to_top_message_id
|
||||
reply_to_message_id=message.reply_to_message_id
|
||||
or message.reply_to_top_message_id,
|
||||
)
|
||||
await message.safe_delete()
|
||||
|
||||
@ -67,14 +71,17 @@ async def netease_id(music_id: str, message: Message):
|
||||
await conv.mark_as_read()
|
||||
await answer.copy(
|
||||
message.chat.id,
|
||||
reply_to_message_id=message.reply_to_message_id or message.reply_to_top_message_id
|
||||
reply_to_message_id=message.reply_to_message_id
|
||||
or message.reply_to_top_message_id,
|
||||
)
|
||||
await message.safe_delete()
|
||||
|
||||
|
||||
@listener(command="netease",
|
||||
description="Netease Music",
|
||||
parameters="[query]",)
|
||||
@listener(
|
||||
command="netease",
|
||||
description="Netease Music",
|
||||
parameters="[query]",
|
||||
)
|
||||
async def netease_music(message: Message):
|
||||
if not message.arguments:
|
||||
return await message.edit(Netease_Help_Msg)
|
||||
|
@ -2,17 +2,28 @@ from pagermaid.listener import listener
|
||||
from pagermaid.enums import Message, AsyncClient
|
||||
|
||||
|
||||
@listener(command="netease_comment",
|
||||
description="随机一条网易云音乐评论。")
|
||||
@listener(command="netease_comment", description="随机一条网易云音乐评论。")
|
||||
async def netease(request: AsyncClient, message: Message):
|
||||
for _ in range(5):
|
||||
try:
|
||||
req = await request.get("https://api.66mz8.com/api/music.163.php?format=json")
|
||||
req = await request.get(
|
||||
"https://api.66mz8.com/api/music.163.php?format=json"
|
||||
)
|
||||
assert req.status_code == 200
|
||||
data = req.json()
|
||||
res = data['comments'] + '\n\n来自 @' + data[
|
||||
'nickname'] + ' 在鸽曲 <a href="' + str(data['music_url']) + '">' + \
|
||||
data['name'] + ' --by' + data['artists_name'] + '</a>' + ' 下方的评论。'
|
||||
res = (
|
||||
data["comments"]
|
||||
+ "\n\n来自 @"
|
||||
+ data["nickname"]
|
||||
+ ' 在鸽曲 <a href="'
|
||||
+ str(data["music_url"])
|
||||
+ '">'
|
||||
+ data["name"]
|
||||
+ " --by"
|
||||
+ data["artists_name"]
|
||||
+ "</a>"
|
||||
+ " 下方的评论。"
|
||||
)
|
||||
return await message.edit(res, disable_web_page_preview=False)
|
||||
except Exception:
|
||||
continue
|
||||
|
11
news/main.py
11
news/main.py
@ -3,8 +3,7 @@ from pagermaid.listener import listener
|
||||
from pagermaid.utils import Message, client
|
||||
|
||||
|
||||
@listener(command="news",
|
||||
description="每日新闻、历史上的今天、天天成语、慧语香风、诗歌天地")
|
||||
@listener(command="news", description="每日新闻、历史上的今天、天天成语、慧语香风、诗歌天地")
|
||||
async def news(_: Client, context: Message):
|
||||
msg = context.arguments
|
||||
if not msg:
|
||||
@ -13,7 +12,7 @@ async def news(_: Client, context: Message):
|
||||
data = await client.get("https://news.topurl.cn/api")
|
||||
data = data.json()["data"]
|
||||
text = "📮 每日新闻 📮\n"
|
||||
for idx, i in enumerate(data['newsList']):
|
||||
for idx, i in enumerate(data["newsList"]):
|
||||
text += f"{idx + 1}. [{i['title']}]({i['url']})\n"
|
||||
|
||||
text += "\n🎬 历史上的今天 🎬\n"
|
||||
@ -27,8 +26,10 @@ async def news(_: Client, context: Message):
|
||||
text += f"{data['sentence']['sentence']} ----{data['sentence']['author']}\n"
|
||||
|
||||
text += "\n🎑 诗歌天地 🎑\n"
|
||||
text += f"{''.join(data['poem']['content'])} " \
|
||||
f"----《{data['poem']['title']}》{data['poem']['author']}"
|
||||
text += (
|
||||
f"{''.join(data['poem']['content'])} "
|
||||
f"----《{data['poem']['title']}》{data['poem']['author']}"
|
||||
)
|
||||
await context.edit(text)
|
||||
except Exception as e:
|
||||
await context.edit(f"获取失败\n{e}")
|
||||
|
@ -68,16 +68,24 @@ async def news60s(message: Message):
|
||||
elif message.arguments == "订阅":
|
||||
if check_manage_subs(message):
|
||||
if news60s_sub.check_id(message.chat.id):
|
||||
return await edit_delete(message, "❌ 你已经订阅了 60s 看世界新闻", parse_mode=ParseMode.HTML)
|
||||
return await edit_delete(
|
||||
message, "❌ 你已经订阅了 60s 看世界新闻", parse_mode=ParseMode.HTML
|
||||
)
|
||||
news60s_sub.add_id(message.chat.id)
|
||||
await message.edit("你已经成功订阅了 60s 看世界新闻")
|
||||
else:
|
||||
await edit_delete(message, "❌ 权限不足,无法订阅 60s 看世界新闻", parse_mode=ParseMode.HTML)
|
||||
await edit_delete(
|
||||
message, "❌ 权限不足,无法订阅 60s 看世界新闻", parse_mode=ParseMode.HTML
|
||||
)
|
||||
elif message.arguments == "退订":
|
||||
if check_manage_subs(message):
|
||||
if not news60s_sub.check_id(message.chat.id):
|
||||
return await edit_delete(message, "❌ 你还没有订阅 60s 看世界新闻", parse_mode=ParseMode.HTML)
|
||||
return await edit_delete(
|
||||
message, "❌ 你还没有订阅 60s 看世界新闻", parse_mode=ParseMode.HTML
|
||||
)
|
||||
news60s_sub.del_id(message.chat.id)
|
||||
await message.edit("你已经成功退订了 60s 看世界新闻")
|
||||
else:
|
||||
await edit_delete(message, "❌ 权限不足,无法退订 60s 看世界新闻", parse_mode=ParseMode.HTML)
|
||||
await edit_delete(
|
||||
message, "❌ 权限不足,无法退订 60s 看世界新闻", parse_mode=ParseMode.HTML
|
||||
)
|
||||
|
@ -10,9 +10,11 @@ from pyromod import require_mod_version
|
||||
no_mentions_sub = Sub("no_mentions")
|
||||
|
||||
|
||||
@listener(command="no_mentions",
|
||||
description="自动消除某个对话的 @ 提醒",
|
||||
parameters="[true|false|status]")
|
||||
@listener(
|
||||
command="no_mentions",
|
||||
description="自动消除某个对话的 @ 提醒",
|
||||
parameters="[true|false|status]",
|
||||
)
|
||||
async def no_mentions(_: Client, message: Message):
|
||||
if len(message.parameter) != 1:
|
||||
await message.edit(f"[no_mentions] {lang('error_prefix')}{lang('arg_error')}")
|
||||
@ -49,6 +51,8 @@ async def set_read_mentions(client: Client, message: Message):
|
||||
await client.invoke(
|
||||
ReadMentions(
|
||||
peer=await client.resolve_peer(message.chat.id),
|
||||
top_msg_id=message.reply_to_top_message_id if message.chat.is_forum else None,
|
||||
top_msg_id=message.reply_to_top_message_id
|
||||
if message.chat.is_forum
|
||||
else None,
|
||||
)
|
||||
)
|
||||
|
@ -17,9 +17,11 @@ from pagermaid.utils import lang
|
||||
no_reactions_sub = Sub("no_reactions")
|
||||
|
||||
|
||||
@listener(command="no_reactions",
|
||||
description="自动已读某个对话的消息表态",
|
||||
parameters="[true|false|status]")
|
||||
@listener(
|
||||
command="no_reactions",
|
||||
description="自动已读某个对话的消息表态",
|
||||
parameters="[true|false|status]",
|
||||
)
|
||||
async def no_reactions(_: Client, message: Message):
|
||||
if len(message.parameter) != 1:
|
||||
await message.edit(f"[no_reactions] {lang('error_prefix')}{lang('arg_error')}")
|
||||
|
@ -15,16 +15,20 @@ import openai
|
||||
|
||||
|
||||
async def get_chat_response(prompt: str) -> str:
|
||||
return openai.Completion.create(
|
||||
model="text-davinci-003",
|
||||
prompt=prompt,
|
||||
temperature=0.9,
|
||||
max_tokens=150,
|
||||
top_p=1,
|
||||
frequency_penalty=0.0,
|
||||
presence_penalty=0.6,
|
||||
stop=["Human: ", "AI: "]
|
||||
).choices[0].text
|
||||
return (
|
||||
openai.Completion.create(
|
||||
model="text-davinci-003",
|
||||
prompt=prompt,
|
||||
temperature=0.9,
|
||||
max_tokens=150,
|
||||
top_p=1,
|
||||
frequency_penalty=0.0,
|
||||
presence_penalty=0.6,
|
||||
stop=["Human: ", "AI: "],
|
||||
)
|
||||
.choices[0]
|
||||
.text
|
||||
)
|
||||
|
||||
|
||||
chat_bot_session = defaultdict(dict)
|
||||
@ -55,7 +59,7 @@ def get_template() -> str:
|
||||
def formatted_response(prompt: str, message: str) -> str:
|
||||
if not get_template():
|
||||
set_template(default_template)
|
||||
message = re.sub(r'^\s+', r'', message)
|
||||
message = re.sub(r"^\s+", r"", message)
|
||||
try:
|
||||
return get_template().format(prompt, message)
|
||||
except Exception:
|
||||
@ -64,15 +68,17 @@ def formatted_response(prompt: str, message: str) -> str:
|
||||
|
||||
default_template = "{0}\n====\n{1}\nPowered by OpenAI Chat (text-davinci-003)"
|
||||
openai.api_key = get_api_key()
|
||||
chat_bot_help = "使用 OpenAI Chat 聊天\n" \
|
||||
"基于 text-davinci-003 模型,与 ChatGPT 的效果有些许不同\n" \
|
||||
"代码参考了原先的 ChatGPT 插件\n\n" \
|
||||
"参数:\n\n- 问题:询问 ai\n" \
|
||||
"- reset:重置聊天话题\n" \
|
||||
"- thread:获取已记录的聊天话题\n" \
|
||||
"- set <api_key>:设置 OpenAI API Key,获取 API Key: https://beta.openai.com/account/api-keys \n" \
|
||||
"- del:删除 OpenAI API Key\n" \
|
||||
"- template {set|get|reset} <template>: 设置/获取/重置回应模板。回应模板中的 {0} 将替换为问题,{1} 将替换为回答"
|
||||
chat_bot_help = (
|
||||
"使用 OpenAI Chat 聊天\n"
|
||||
"基于 text-davinci-003 模型,与 ChatGPT 的效果有些许不同\n"
|
||||
"代码参考了原先的 ChatGPT 插件\n\n"
|
||||
"参数:\n\n- 问题:询问 ai\n"
|
||||
"- reset:重置聊天话题\n"
|
||||
"- thread:获取已记录的聊天话题\n"
|
||||
"- set <api_key>:设置 OpenAI API Key,获取 API Key: https://beta.openai.com/account/api-keys \n"
|
||||
"- del:删除 OpenAI API Key\n"
|
||||
"- template {set|get|reset} <template>: 设置/获取/重置回应模板。回应模板中的 {0} 将替换为问题,{1} 将替换为回答"
|
||||
)
|
||||
|
||||
|
||||
@listener(
|
||||
@ -112,7 +118,9 @@ async def chat_bot_func(message: Message):
|
||||
del chat_bot_session[from_id]
|
||||
return await message.edit("已重置聊天话题。")
|
||||
elif message.arguments == "thread":
|
||||
return await message.edit(chat_bot_session.get(from_id, {}).get("chat_thread", "没有已记录的聊天话题。"))
|
||||
return await message.edit(
|
||||
chat_bot_session.get(from_id, {}).get("chat_thread", "没有已记录的聊天话题。")
|
||||
)
|
||||
elif message.arguments == "del":
|
||||
if not get_api_key():
|
||||
return await message.edit("没有设置 API Key。")
|
||||
@ -122,10 +130,14 @@ async def chat_bot_func(message: Message):
|
||||
return await message.edit("请先通过参数 `set [api_key]` 设置 OpenAI API Key。")
|
||||
with chat_bot_lock:
|
||||
with contextlib.suppress(Exception):
|
||||
message: Message = await message.edit(formatted_response(message.arguments, "处理中..."))
|
||||
message: Message = await message.edit(
|
||||
formatted_response(message.arguments, "处理中...")
|
||||
)
|
||||
try:
|
||||
chat_thread = chat_bot_session.get(from_id, {}).get("chat_thread", "")
|
||||
prompt = f"{chat_thread}\nHuman: {message.arguments}\nAI: "[-3946:] # 4096 - 150(max_tokens)
|
||||
prompt = f"{chat_thread}\nHuman: {message.arguments}\nAI: "[
|
||||
-3946:
|
||||
] # 4096 - 150(max_tokens)
|
||||
msg = await get_chat_response(prompt)
|
||||
chat_bot_session[from_id]["chat_thread"] = prompt + msg
|
||||
except Exception as e:
|
||||
|
@ -9,10 +9,9 @@ from pagermaid.enums import Client, Message
|
||||
from pagermaid.scheduler import add_delete_message_job
|
||||
|
||||
|
||||
@listener(command="paolu",
|
||||
groups_only=True,
|
||||
need_admin=True,
|
||||
description="⚠一键跑路 删除群内消息并禁言⚠")
|
||||
@listener(
|
||||
command="paolu", groups_only=True, need_admin=True, description="⚠一键跑路 删除群内消息并禁言⚠"
|
||||
)
|
||||
async def pao_lu(bot: Client, message: Message):
|
||||
"""一键跑路 删除群内消息并禁言"""
|
||||
with contextlib.suppress(Exception):
|
||||
@ -20,7 +19,8 @@ async def pao_lu(bot: Client, message: Message):
|
||||
message.chat.id,
|
||||
permissions=ChatPermissions(
|
||||
can_send_messages=False,
|
||||
))
|
||||
),
|
||||
)
|
||||
reply = await message.edit("[paolu] 处理中...")
|
||||
with contextlib.suppress(Exception):
|
||||
await bot.delete_messages(message.chat.id, list(range(1, message.id)))
|
||||
|
21
pfp/main.py
21
pfp/main.py
@ -17,11 +17,19 @@ async def get_photo(message: Message) -> Optional[str]:
|
||||
if reply := message.reply_to_message:
|
||||
if reply.photo:
|
||||
return await reply.download()
|
||||
elif reply.document and reply.document.mime_type and reply.document.mime_type.startswith("image"):
|
||||
elif (
|
||||
reply.document
|
||||
and reply.document.mime_type
|
||||
and reply.document.mime_type.startswith("image")
|
||||
):
|
||||
return await reply.download()
|
||||
elif message.photo:
|
||||
return await message.download()
|
||||
elif message.document and message.document.mime_type and message.document.mime_type.startswith("image"):
|
||||
elif (
|
||||
message.document
|
||||
and message.document.mime_type
|
||||
and message.document.mime_type.startswith("image")
|
||||
):
|
||||
return await message.download()
|
||||
return None
|
||||
|
||||
@ -44,12 +52,9 @@ async def set_photo(client: Client, user: InputUser, photo: str, me: bool) -> No
|
||||
safe_remove(photo)
|
||||
|
||||
|
||||
@listener(
|
||||
command="pfp",
|
||||
description=lang("pfp_des")
|
||||
)
|
||||
@listener(command="pfp", description=lang("pfp_des"))
|
||||
async def pfp(client: Client, message: Message):
|
||||
""" Sets your profile picture. """
|
||||
"""Sets your profile picture."""
|
||||
me = await client.get_me()
|
||||
peer = await client.resolve_peer(me.id)
|
||||
with contextlib.suppress(Exception):
|
||||
@ -59,7 +64,7 @@ async def pfp(client: Client, message: Message):
|
||||
if not photo:
|
||||
return await message.edit(f"{lang('error_prefix')}{lang('pfp_e_notp')}")
|
||||
if not Config.SILENT:
|
||||
message = await message.edit(lang('pfp_process'))
|
||||
message = await message.edit(lang("pfp_process"))
|
||||
try:
|
||||
await set_photo(client, peer, photo, peer.user_id == me.id)
|
||||
await message.edit("头像修改成功啦 ~")
|
||||
|
@ -31,8 +31,7 @@ async def resize_image(photo):
|
||||
return image
|
||||
|
||||
|
||||
@listener(command="pic_to_sticker",
|
||||
description="将你回复的图片转换为贴纸")
|
||||
@listener(command="pic_to_sticker", description="将你回复的图片转换为贴纸")
|
||||
async def pic_to_sticker(bot: Client, message: Message):
|
||||
reply = message.reply_to_message
|
||||
photo = None
|
||||
|
@ -5,8 +5,7 @@ import copy
|
||||
import os
|
||||
import random
|
||||
from dataclasses import dataclass
|
||||
from typing import (Any, Awaitable, Callable, Dict, List, NamedTuple, Optional,
|
||||
Tuple)
|
||||
from typing import Any, Awaitable, Callable, Dict, List, NamedTuple, Optional, Tuple
|
||||
|
||||
import yaml
|
||||
from pagermaid import logs
|
||||
@ -358,9 +357,7 @@ async def help_cmd(_: Client, message: Message) -> None:
|
||||
)
|
||||
|
||||
|
||||
@cmdman.subcommand(
|
||||
"id", "根据 ID 获取 Pixiv 相关插图", "<ID>"
|
||||
)
|
||||
@cmdman.subcommand("id", "根据 ID 获取 Pixiv 相关插图", "<ID>")
|
||||
async def id_cmd(_: Client, message: Message) -> None:
|
||||
try:
|
||||
id_ = int(message.arguments)
|
||||
|
1140
pmcaptcha/main.py
1140
pmcaptcha/main.py
File diff suppressed because it is too large
Load Diff
@ -8,9 +8,14 @@ from pagermaid.listener import listener
|
||||
from pagermaid.enums import Client, Message
|
||||
|
||||
|
||||
@listener(command="portball", is_plugin=True, outgoing=True, need_admin=True,
|
||||
description="回复你要临时禁言的人的消息来实现XX秒的禁言",
|
||||
parameters="[理由]|<时间/秒>")
|
||||
@listener(
|
||||
command="portball",
|
||||
is_plugin=True,
|
||||
outgoing=True,
|
||||
need_admin=True,
|
||||
description="回复你要临时禁言的人的消息来实现XX秒的禁言",
|
||||
parameters="[理由]|<时间/秒>",
|
||||
)
|
||||
async def portball(bot: Client, message: Message):
|
||||
if message.chat.type in (ChatType.GROUP, ChatType.SUPERGROUP):
|
||||
reply_to_message = message.reply_to_message
|
||||
@ -20,7 +25,7 @@ async def portball(bot: Client, message: Message):
|
||||
if from_user is None:
|
||||
return
|
||||
if from_user.is_self:
|
||||
edit_message: Message = await message.edit_text('无法禁言自己。')
|
||||
edit_message: Message = await message.edit_text("无法禁言自己。")
|
||||
await edit_message.delay_delete()
|
||||
return
|
||||
seconds: int = -1
|
||||
@ -49,8 +54,12 @@ async def portball(bot: Client, message: Message):
|
||||
await edit_message.delay_delete()
|
||||
return
|
||||
try:
|
||||
await bot.restrict_chat_member(chat.id, from_user.id, ChatPermissions(),
|
||||
datetime.now() + timedelta(seconds=seconds))
|
||||
await bot.restrict_chat_member(
|
||||
chat.id,
|
||||
from_user.id,
|
||||
ChatPermissions(),
|
||||
datetime.now() + timedelta(seconds=seconds),
|
||||
)
|
||||
except (UserAdminInvalid, ChatAdminRequired):
|
||||
await bot.send_message(chat.id, "错误:该操作需要管理员权限")
|
||||
await message.delay_delete()
|
||||
|
@ -1,9 +1,9 @@
|
||||
# -*- coding: UTF-8 -*-
|
||||
'''
|
||||
"""
|
||||
@File :main.py
|
||||
@Author :汐洛 @guimc233
|
||||
@Date :2022/6/23 21:57
|
||||
'''
|
||||
"""
|
||||
|
||||
from pyrogram import Client
|
||||
from pagermaid.listener import listener
|
||||
@ -11,16 +11,16 @@ from pagermaid.utils import Message, client
|
||||
from pyrogram.enums import ChatMemberStatus, ParseMode
|
||||
|
||||
|
||||
@listener(command="premium",
|
||||
groups_only=True,
|
||||
description="分遗产咯")
|
||||
@listener(command="premium", groups_only=True, description="分遗产咯")
|
||||
async def premium(bot: Client, context: Message):
|
||||
context = await context.edit("Please wait...")
|
||||
premium_users = users = admins = premium_admins = bots = deleted = 0
|
||||
dc_ids = {"1": 0, "2": 0, "3": 0, "4": 0, "5": 0, "failed": 0}
|
||||
count = await bot.get_chat_members_count(context.chat.id)
|
||||
if count >= 10000 and context.arguments != "force":
|
||||
return await context.edit("太...太多人了... 我会...会...会坏掉的...\n\n如果您执意要运行的的话,您可以使用指令 ,premium force")
|
||||
return await context.edit(
|
||||
"太...太多人了... 我会...会...会坏掉的...\n\n如果您执意要运行的的话,您可以使用指令 ,premium force"
|
||||
)
|
||||
async for m in bot.get_chat_members(context.chat.id):
|
||||
if not m.user.is_bot and not m.user.is_deleted:
|
||||
users += 1
|
||||
@ -38,7 +38,8 @@ async def premium(bot: Client, context: Message):
|
||||
bots += 1
|
||||
else:
|
||||
deleted += 1
|
||||
await context.edit(f"""**分遗产咯**
|
||||
await context.edit(
|
||||
f"""**分遗产咯**
|
||||
|
||||
管理员:
|
||||
> 大会员: **{premium_admins}** / 总管理数: **{admins}** 分遗产占比: **{round((premium_admins/admins)*100, 2) if admins != 0 else '你群管理员全死号?'}%**
|
||||
@ -48,4 +49,6 @@ async def premium(bot: Client, context: Message):
|
||||
|
||||
> 已自动过滤掉 **{bots}** 个 Bot, **{deleted}** 个 死号
|
||||
|
||||
{'***请注意: 由于tg限制 我们只能遍历前10k人 此次获得到的数据并不完整***' if count >= 10000 else ''}""", parse_mode = ParseMode.MARKDOWN)
|
||||
{'***请注意: 由于tg限制 我们只能遍历前10k人 此次获得到的数据并不完整***' if count >= 10000 else ''}""",
|
||||
parse_mode=ParseMode.MARKDOWN,
|
||||
)
|
||||
|
@ -7,4 +7,6 @@ from pagermaid.listener import listener
|
||||
async def print_official_notifications(message: Message):
|
||||
if not message.from_user.is_verified:
|
||||
return
|
||||
logs.info(f"Official notification from {message.from_user.first_name}: {message.text}")
|
||||
logs.info(
|
||||
f"Official notification from {message.from_user.first_name}: {message.text}"
|
||||
)
|
||||
|
32
pypi/main.py
32
pypi/main.py
@ -18,13 +18,15 @@ def escape_definition(definition):
|
||||
return definition
|
||||
|
||||
|
||||
@listener(command="pypi",
|
||||
description="Search PyPI packages",
|
||||
parameters="The query string")
|
||||
@listener(
|
||||
command="pypi", description="Search PyPI packages", parameters="The query string"
|
||||
)
|
||||
async def pypi(message: Message, httpx: AsyncClient):
|
||||
if not message.arguments:
|
||||
return await message.edit("Please provide a query string")
|
||||
r = await httpx.get(f"https://pypi.org/pypi/{message.arguments}/json", follow_redirects=True)
|
||||
r = await httpx.get(
|
||||
f"https://pypi.org/pypi/{message.arguments}/json", follow_redirects=True
|
||||
)
|
||||
if r.status_code != 200:
|
||||
return await message.edit("Could not find the package")
|
||||
json = r.json()
|
||||
@ -35,15 +37,15 @@ async def pypi(message: Message, httpx: AsyncClient):
|
||||
版本:<b>{version}</b>
|
||||
许可协议:<b>{license}</b>
|
||||
摘要:<b>{summary}</b>""".format(
|
||||
package_link=f"https://pypi.org/pypi/{message.arguments}",
|
||||
package_name=pypi_info["name"],
|
||||
author_name=pypi_info["author"],
|
||||
author_email=f"<{pypi_info['author_email']}>"
|
||||
if pypi_info["author_email"]
|
||||
else "",
|
||||
platform=pypi_info["platform"] or "未指定",
|
||||
version=pypi_info["version"],
|
||||
license=pypi_info["license"] or "未指定",
|
||||
summary=pypi_info["summary"],
|
||||
)
|
||||
package_link=f"https://pypi.org/pypi/{message.arguments}",
|
||||
package_name=pypi_info["name"],
|
||||
author_name=pypi_info["author"],
|
||||
author_email=f"<{pypi_info['author_email']}>"
|
||||
if pypi_info["author_email"]
|
||||
else "",
|
||||
platform=pypi_info["platform"] or "未指定",
|
||||
version=pypi_info["version"],
|
||||
license=pypi_info["license"] or "未指定",
|
||||
summary=pypi_info["summary"],
|
||||
)
|
||||
await message.edit(text, parse_mode=ParseMode.HTML, disable_web_page_preview=True)
|
||||
|
@ -17,12 +17,12 @@ async def qq_music(message: Message, client: AsyncClient):
|
||||
msg: Message = await message.edit("正在查询,请稍候...")
|
||||
try:
|
||||
res = await client.get(
|
||||
f'https://zj.v.api.aa1.cn/api/qqmusic/?songName={key}&pageNum=1&pageSize=1&type=qq',
|
||||
f"https://zj.v.api.aa1.cn/api/qqmusic/?songName={key}&pageNum=1&pageSize=1&type=qq",
|
||||
timeout=10.0,
|
||||
)
|
||||
if res.status_code == 200:
|
||||
resp = res.json()
|
||||
data = resp['list']
|
||||
data = resp["list"]
|
||||
if len(data) == 0:
|
||||
return await msg.edit("没有找到相关音乐")
|
||||
uri = data[0].get("url")
|
||||
@ -35,7 +35,8 @@ async def qq_music(message: Message, client: AsyncClient):
|
||||
uri,
|
||||
thumb=cover or None,
|
||||
caption=f"{text}",
|
||||
reply_to_message_id=message.reply_to_message_id or message.reply_to_top_message_id,
|
||||
reply_to_message_id=message.reply_to_message_id
|
||||
or message.reply_to_top_message_id,
|
||||
)
|
||||
await msg.safe_delete()
|
||||
except Exception as e:
|
||||
|
29
qr/main.py
29
qr/main.py
@ -14,23 +14,28 @@ pip_install("pyzbar")
|
||||
from pyqrcode import create
|
||||
|
||||
|
||||
@listener(is_plugin=False, outgoing=True, command="genqr",
|
||||
description=lang('genqr_des'),
|
||||
parameters="[string]")
|
||||
@listener(
|
||||
is_plugin=False,
|
||||
outgoing=True,
|
||||
command="genqr",
|
||||
description=lang("genqr_des"),
|
||||
parameters="[string]",
|
||||
)
|
||||
async def gen_qr(client: Client, message: Message):
|
||||
""" Generate QR codes. """
|
||||
"""Generate QR codes."""
|
||||
text = message.obtain_message()
|
||||
if not text:
|
||||
await message.edit(lang('error_prefix'))
|
||||
await message.edit(lang("error_prefix"))
|
||||
return
|
||||
if not Config.SILENT:
|
||||
await message.edit(lang('genqr_process'))
|
||||
await message.edit(lang("genqr_process"))
|
||||
try:
|
||||
create(text, error="L", encoding="utf-8", mode="binary").png("qr.webp", scale=6)
|
||||
await client.send_document(
|
||||
message.chat.id,
|
||||
document="qr.webp",
|
||||
reply_to_message_id=message.reply_to_message_id or message.reply_to_top_message_id,
|
||||
reply_to_message_id=message.reply_to_message_id
|
||||
or message.reply_to_top_message_id,
|
||||
)
|
||||
except UnicodeEncodeError:
|
||||
await message.edit(f"{lang('error_prefix')}{lang('genqr_e_encode')}")
|
||||
@ -44,10 +49,11 @@ async def gen_qr(client: Client, message: Message):
|
||||
await log(f"`{text}` {lang('genqr_ok')}")
|
||||
|
||||
|
||||
@listener(is_plugin=False, outgoing=True, command="parseqr",
|
||||
description=lang('parseqr_des'))
|
||||
@listener(
|
||||
is_plugin=False, outgoing=True, command="parseqr", description=lang("parseqr_des")
|
||||
)
|
||||
async def parse_qr(message: Message):
|
||||
""" Parse attachment of replied message as a QR Code and output results. """
|
||||
"""Parse attachment of replied message as a QR Code and output results."""
|
||||
try:
|
||||
from pyzbar.pyzbar import decode as pyzbar_decode
|
||||
except ImportError:
|
||||
@ -64,8 +70,7 @@ async def parse_qr(message: Message):
|
||||
try:
|
||||
text = str(pyzbar_decode(Image.open(target_file_path))[0].data)[2:][:-1]
|
||||
success = True
|
||||
await message.edit(f"**{lang('parseqr_content')}: **\n"
|
||||
f"`{text}`")
|
||||
await message.edit(f"**{lang('parseqr_content')}: **\n" f"`{text}`")
|
||||
except Exception:
|
||||
await message.edit(f"{lang('error_prefix')}{lang('parseqr_e_noqr')}")
|
||||
text = None
|
||||
|
56
rate/main.py
56
rate/main.py
@ -15,22 +15,26 @@ class Rate:
|
||||
def __init__(self):
|
||||
if Config.LANGUAGE == "en":
|
||||
self.lang_rate = {
|
||||
"des": "Currency exchange rate plugin", "arg": "[from_] [to_] [NUM]",
|
||||
"des": "Currency exchange rate plugin",
|
||||
"arg": "[from_] [to_] [NUM]",
|
||||
"help": "Currency exchange rate plugin\n\n"
|
||||
f"Usage: `,{alias_command('rate')} [from_] [to_] [NUM] where [NUM] is "
|
||||
"optional`\n\nAvailable currencies: \n",
|
||||
f"Usage: `,{alias_command('rate')} [from_] [to_] [NUM] where [NUM] is "
|
||||
"optional`\n\nAvailable currencies: \n",
|
||||
"nc": "is not available.\n\nAvailable currencies: \n",
|
||||
"notice": "Data are updated daily.",
|
||||
"warning": "Data are updated daily."}
|
||||
"warning": "Data are updated daily.",
|
||||
}
|
||||
else:
|
||||
self.lang_rate = {
|
||||
"des": "货币汇率插件", "arg": "[from_] [to_] [NUM]",
|
||||
"des": "货币汇率插件",
|
||||
"arg": "[from_] [to_] [NUM]",
|
||||
"help": "这是货币汇率插件\n\n"
|
||||
f"使用方法: `,{alias_command('rate')} [from_] [to_] [NUM],其中 [NUM] 是可省略的`\n\n"
|
||||
"支持货币: \n",
|
||||
f"使用方法: `,{alias_command('rate')} [from_] [to_] [NUM],其中 [NUM] 是可省略的`\n\n"
|
||||
"支持货币: \n",
|
||||
"nc": "不是支持的货币. \n\n支持货币: \n",
|
||||
"notice": "数据每日八点更新",
|
||||
"warning": "数据每日八点更新"}
|
||||
"warning": "数据每日八点更新",
|
||||
}
|
||||
self.host = "https://cdn.jsdelivr.net/gh/fawazahmed0/currency-api@1/latest"
|
||||
self.api = f"{self.host}/currencies.json"
|
||||
self.currencies = []
|
||||
@ -52,9 +56,11 @@ class Rate:
|
||||
try:
|
||||
req = await client.get(endpoint, follow_redirects=True)
|
||||
rate__data = req.json()
|
||||
return f'`{from_} : {to_} = {nb} : {round(nb * rate__data[to_.lower()], 4)}`' \
|
||||
f'\n\n' \
|
||||
f'{self.lang_rate["warning"]}'
|
||||
return (
|
||||
f"`{from_} : {to_} = {nb} : {round(nb * rate__data[to_.lower()], 4)}`"
|
||||
f"\n\n"
|
||||
f'{self.lang_rate["warning"]}'
|
||||
)
|
||||
except Exception as e:
|
||||
return str(e)
|
||||
|
||||
@ -72,9 +78,11 @@ async def refresher_rate():
|
||||
await rate_data.get_data()
|
||||
|
||||
|
||||
@listener(command="rate",
|
||||
description=rate_data.lang_rate["des"],
|
||||
parameters=rate_data.lang_rate["arg"])
|
||||
@listener(
|
||||
command="rate",
|
||||
description=rate_data.lang_rate["des"],
|
||||
parameters=rate_data.lang_rate["arg"],
|
||||
)
|
||||
async def rate(message: Message):
|
||||
global rate_data
|
||||
if not rate_data.data:
|
||||
@ -82,13 +90,17 @@ async def rate(message: Message):
|
||||
if not rate_data.data:
|
||||
return
|
||||
if not message.arguments:
|
||||
await message.edit(f"{rate_data.lang_rate['help']}`{', '.join(rate_data.currencies)}`\n\n"
|
||||
f"{rate_data.lang_rate['notice']}")
|
||||
await message.edit(
|
||||
f"{rate_data.lang_rate['help']}`{', '.join(rate_data.currencies)}`\n\n"
|
||||
f"{rate_data.lang_rate['notice']}"
|
||||
)
|
||||
return
|
||||
nb = 1.0
|
||||
if len(message.parameter) not in [3, 2]:
|
||||
await message.edit(f"{rate_data.lang_rate['help']}`{', '.join(rate_data.currencies)}`"
|
||||
f"\n\n{rate_data.lang_rate['notice']}")
|
||||
await message.edit(
|
||||
f"{rate_data.lang_rate['help']}`{', '.join(rate_data.currencies)}`"
|
||||
f"\n\n{rate_data.lang_rate['notice']}"
|
||||
)
|
||||
return
|
||||
from_ = message.parameter[0].upper().strip()
|
||||
to_ = message.parameter[1].upper().strip()
|
||||
@ -97,10 +109,14 @@ async def rate(message: Message):
|
||||
except Exception:
|
||||
nb = 1.0
|
||||
if rate_data.currencies.count(from_) == 0:
|
||||
await message.edit(f"{from_}{rate_data.lang_rate['nc']}`{', '.join(rate_data.currencies)}`")
|
||||
await message.edit(
|
||||
f"{from_}{rate_data.lang_rate['nc']}`{', '.join(rate_data.currencies)}`"
|
||||
)
|
||||
return
|
||||
if rate_data.currencies.count(to_) == 0:
|
||||
await message.edit(f"{to_}{rate_data.lang_rate['nc']}{', '.join(rate_data.currencies)}`")
|
||||
await message.edit(
|
||||
f"{to_}{rate_data.lang_rate['nc']}{', '.join(rate_data.currencies)}`"
|
||||
)
|
||||
return
|
||||
try:
|
||||
text = await rate_data.get_rate(from_, to_, nb)
|
||||
|
@ -4,8 +4,7 @@ from pagermaid.listener import listener
|
||||
from pagermaid.utils import Message, client
|
||||
|
||||
|
||||
@listener(command="zhrs",
|
||||
description="知乎热搜。")
|
||||
@listener(command="zhrs", description="知乎热搜。")
|
||||
async def zhrs(_: Client, message: Message):
|
||||
req = await client.get("https://tenapi.cn/zhihuresou/")
|
||||
if req.status_code == 200:
|
||||
@ -14,7 +13,7 @@ async def zhrs(_: Client, message: Message):
|
||||
except JSONDecodeError:
|
||||
await message.edit("出错了呜呜呜 ~ API 数据解析失败。")
|
||||
return
|
||||
res = '知乎实时热搜榜:\n'
|
||||
res = "知乎实时热搜榜:\n"
|
||||
for i in range(10):
|
||||
res += f'\n{i + 1}.「<a href={data["list"][i]["url"]}>{data["list"][i]["query"]}</a>」'
|
||||
await message.edit(res)
|
||||
@ -22,8 +21,7 @@ async def zhrs(_: Client, message: Message):
|
||||
await message.edit("出错了呜呜呜 ~ 无法访问到 API 服务器 。")
|
||||
|
||||
|
||||
@listener(command="wbrs",
|
||||
description="微博热搜。")
|
||||
@listener(command="wbrs", description="微博热搜。")
|
||||
async def wbrs(_: Client, message: Message):
|
||||
req = await client.get("https://tenapi.cn/resou/")
|
||||
if req.status_code == 200:
|
||||
@ -32,17 +30,18 @@ async def wbrs(_: Client, message: Message):
|
||||
except JSONDecodeError:
|
||||
await message.edit("出错了呜呜呜 ~ API 数据解析失败。")
|
||||
return
|
||||
res = '微博实时热搜榜:\n'
|
||||
res = "微博实时热搜榜:\n"
|
||||
for i in range(10):
|
||||
res += f'\n{i + 1}.「<a href={data["list"][i]["url"]}>{data["list"][i]["name"]}</a>」 ' \
|
||||
f'热度:{data["list"][i]["hot"]}'
|
||||
res += (
|
||||
f'\n{i + 1}.「<a href={data["list"][i]["url"]}>{data["list"][i]["name"]}</a>」 '
|
||||
f'热度:{data["list"][i]["hot"]}'
|
||||
)
|
||||
await message.edit(res)
|
||||
else:
|
||||
await message.edit("出错了呜呜呜 ~ 无法访问到 API 服务器 。")
|
||||
|
||||
|
||||
@listener(command="dyrs",
|
||||
description="抖音热搜。")
|
||||
@listener(command="dyrs", description="抖音热搜。")
|
||||
async def dyrs(_: Client, message: Message):
|
||||
req = await client.get("https://tenapi.cn/douyinresou/")
|
||||
if req.status_code == 200:
|
||||
@ -51,7 +50,7 @@ async def dyrs(_: Client, message: Message):
|
||||
except JSONDecodeError:
|
||||
await message.edit("出错了呜呜呜 ~ API 数据解析失败。")
|
||||
return
|
||||
res = '抖音实时热搜榜:\n'
|
||||
res = "抖音实时热搜榜:\n"
|
||||
for i in range(10):
|
||||
res += f'\n{i + 1}.「{data["list"][i]["name"]}」 热度:{data["list"][i]["hot"]}'
|
||||
await message.edit(res)
|
||||
|
30
sb/main.py
30
sb/main.py
@ -1,7 +1,13 @@
|
||||
from asyncio import sleep
|
||||
|
||||
from pyrogram.enums import ChatType
|
||||
from pyrogram.errors import ChatAdminRequired, FloodWait, PeerIdInvalid, UserAdminInvalid, UsernameInvalid
|
||||
from pyrogram.errors import (
|
||||
ChatAdminRequired,
|
||||
FloodWait,
|
||||
PeerIdInvalid,
|
||||
UserAdminInvalid,
|
||||
UsernameInvalid,
|
||||
)
|
||||
from pyrogram.types import Chat
|
||||
|
||||
from pagermaid import log
|
||||
@ -13,7 +19,11 @@ from pagermaid.utils import lang
|
||||
|
||||
|
||||
def mention_group(chat: Chat):
|
||||
return f'<a href="https://t.me/{chat.username}">{chat.title}</a>' if chat.username else f'<code>{chat.title}</code>'
|
||||
return (
|
||||
f'<a href="https://t.me/{chat.username}">{chat.title}</a>'
|
||||
if chat.username
|
||||
else f"<code>{chat.title}</code>"
|
||||
)
|
||||
|
||||
|
||||
async def ban_one(chat: Chat, uid):
|
||||
@ -64,11 +74,13 @@ async def get_uid(chat: Chat, message: Message):
|
||||
return uid, channel, delete_all, sender
|
||||
|
||||
|
||||
@listener(command="sb",
|
||||
description=lang('sb_des'),
|
||||
need_admin=True,
|
||||
groups_only=True,
|
||||
parameters="[reply|id|username> <do_not_del_all]")
|
||||
@listener(
|
||||
command="sb",
|
||||
description=lang("sb_des"),
|
||||
need_admin=True,
|
||||
groups_only=True,
|
||||
parameters="[reply|id|username> <do_not_del_all]",
|
||||
)
|
||||
async def super_ban(message: Message):
|
||||
chat = message.chat
|
||||
try:
|
||||
@ -126,6 +138,6 @@ async def super_ban(message: Message):
|
||||
else:
|
||||
text = f'{lang("sb_per")} {count} {lang("sb_in")} {sender.mention}'
|
||||
await message.edit(text)
|
||||
groups = f'\n{lang("sb_pro")}\n' + "\n".join(groups) if groups else ''
|
||||
await log(f'{text}\nuid: `{uid}` {groups}')
|
||||
groups = f'\n{lang("sb_pro")}\n' + "\n".join(groups) if groups else ""
|
||||
await log(f"{text}\nuid: `{uid}` {groups}")
|
||||
add_delete_message_job(message, 10)
|
||||
|
@ -17,7 +17,14 @@ class SendTask:
|
||||
cron: str
|
||||
pause: bool
|
||||
|
||||
def __init__(self, task_id: int, cid: int = 0, msg: str = "", cron: str = "", pause: bool = False):
|
||||
def __init__(
|
||||
self,
|
||||
task_id: int,
|
||||
cid: int = 0,
|
||||
msg: str = "",
|
||||
cron: str = "",
|
||||
pause: bool = False,
|
||||
):
|
||||
self.task_id = task_id
|
||||
self.cid = cid
|
||||
self.msg = msg
|
||||
@ -25,7 +32,13 @@ class SendTask:
|
||||
self.pause = pause
|
||||
|
||||
def export(self):
|
||||
return {"task_id": self.task_id, "cid": self.cid, "msg": self.msg, "cron": self.cron, "pause": self.pause}
|
||||
return {
|
||||
"task_id": self.task_id,
|
||||
"cid": self.cid,
|
||||
"msg": self.msg,
|
||||
"cron": self.cron,
|
||||
"pause": self.pause,
|
||||
}
|
||||
|
||||
def get_job(self):
|
||||
return scheduler.get_job(f"send_cron|{self.cid}|{self.task_id}")
|
||||
@ -35,8 +48,7 @@ class SendTask:
|
||||
scheduler.remove_job(f"send_cron|{self.cid}|{self.task_id}")
|
||||
|
||||
def export_str(self, show_all: bool = False):
|
||||
text = f"<code>{self.task_id}</code> - " \
|
||||
f"<code>{self.cron}</code> -"
|
||||
text = f"<code>{self.task_id}</code> - " f"<code>{self.cron}</code> -"
|
||||
if job := self.get_job():
|
||||
time: datetime.datetime = job.next_run_time
|
||||
text += f"<code>{time.strftime('%Y-%m-%d %H:%M:%S')}</code> - "
|
||||
@ -108,7 +120,11 @@ class SendTasks:
|
||||
return [task.task_id for task in self.tasks]
|
||||
|
||||
def print_all_tasks(self, show_all: bool = False, cid: int = 0) -> str:
|
||||
return "\n".join(task.export_str(show_all) for task in self.tasks if task.cid == cid or show_all)
|
||||
return "\n".join(
|
||||
task.export_str(show_all)
|
||||
for task in self.tasks
|
||||
if task.cid == cid or show_all
|
||||
)
|
||||
|
||||
def save_to_file(self):
|
||||
data = [task.export() for task in self.tasks]
|
||||
@ -210,7 +226,8 @@ async def send_cron(message: Message):
|
||||
return await message.edit("请输入正确的参数")
|
||||
if send_cron_tasks.get_all_ids():
|
||||
return await message.edit(
|
||||
f"已注册的任务:\n\n{send_cron_tasks.print_all_tasks(show_all=False, cid=message.chat.id)}")
|
||||
f"已注册的任务:\n\n{send_cron_tasks.print_all_tasks(show_all=False, cid=message.chat.id)}"
|
||||
)
|
||||
else:
|
||||
return await message.edit("没有已注册的任务。")
|
||||
if len(message.parameter) == 2:
|
||||
@ -231,7 +248,8 @@ async def send_cron(message: Message):
|
||||
elif message.parameter[0] == "list":
|
||||
if send_cron_tasks.get_all_ids():
|
||||
return await message.edit(
|
||||
f"已注册的任务:\n\n{send_cron_tasks.print_all_tasks(show_all=True)}")
|
||||
f"已注册的任务:\n\n{send_cron_tasks.print_all_tasks(show_all=True)}"
|
||||
)
|
||||
else:
|
||||
return await message.edit("没有已注册的任务。")
|
||||
# add task
|
||||
|
113
sendat/main.py
113
sendat/main.py
@ -24,9 +24,19 @@ class SendTask:
|
||||
minute: str = "0"
|
||||
second: str = "0"
|
||||
|
||||
def __init__(self, task_id: Optional[int] = None, cid: int = 0, msg: str = "", interval: bool = False,
|
||||
cron: bool = False, pause: bool = False, time_limit: int = -1,
|
||||
hour: str = "0", minute: str = "0", second: str = "0"):
|
||||
def __init__(
|
||||
self,
|
||||
task_id: Optional[int] = None,
|
||||
cid: int = 0,
|
||||
msg: str = "",
|
||||
interval: bool = False,
|
||||
cron: bool = False,
|
||||
pause: bool = False,
|
||||
time_limit: int = -1,
|
||||
hour: str = "0",
|
||||
minute: str = "0",
|
||||
second: str = "0",
|
||||
):
|
||||
self.task_id = task_id
|
||||
self.cid = cid
|
||||
self.msg = msg
|
||||
@ -44,9 +54,18 @@ class SendTask:
|
||||
self.save_to_file()
|
||||
|
||||
def export(self):
|
||||
return {"task_id": self.task_id, "cid": self.cid, "msg": self.msg, "interval": self.interval,
|
||||
"cron": self.cron, "pause": self.pause, "time_limit": self.time_limit, "hour": self.hour,
|
||||
"minute": self.minute, "second": self.second}
|
||||
return {
|
||||
"task_id": self.task_id,
|
||||
"cid": self.cid,
|
||||
"msg": self.msg,
|
||||
"interval": self.interval,
|
||||
"cron": self.cron,
|
||||
"pause": self.pause,
|
||||
"time_limit": self.time_limit,
|
||||
"hour": self.hour,
|
||||
"minute": self.minute,
|
||||
"second": self.second,
|
||||
}
|
||||
|
||||
def get_job(self):
|
||||
return scheduler.get_job(f"sendat|{self.cid}|{self.task_id}")
|
||||
@ -56,8 +75,10 @@ class SendTask:
|
||||
scheduler.remove_job(f"sendat|{self.cid}|{self.task_id}")
|
||||
|
||||
def export_str(self, show_all: bool = False):
|
||||
text = f"<code>{self.task_id}</code> - " \
|
||||
f"<code>{'循环任务' if self.interval else '单次任务'}</code> - "
|
||||
text = (
|
||||
f"<code>{self.task_id}</code> - "
|
||||
f"<code>{'循环任务' if self.interval else '单次任务'}</code> - "
|
||||
)
|
||||
if job := self.get_job():
|
||||
time: datetime.datetime = job.next_run_time
|
||||
text += f"<code>{time.strftime('%Y-%m-%d %H:%M:%S')}</code> - "
|
||||
@ -162,7 +183,11 @@ class SendTasks:
|
||||
return [task.task_id for task in self.tasks]
|
||||
|
||||
def print_all_tasks(self, show_all: bool = False, cid: int = 0) -> str:
|
||||
return "\n".join(task.export_str(show_all) for task in self.tasks if task.cid == cid or show_all)
|
||||
return "\n".join(
|
||||
task.export_str(show_all)
|
||||
for task in self.tasks
|
||||
if task.cid == cid or show_all
|
||||
)
|
||||
|
||||
def save_to_file(self):
|
||||
data = [task.export() for task in self.tasks]
|
||||
@ -193,36 +218,44 @@ class SendTasks:
|
||||
task.remove_job()
|
||||
|
||||
def register_interval_task(self, task: SendTask):
|
||||
scheduler.add_job(self.send_message,
|
||||
"interval",
|
||||
id=f"sendat|{task.cid}|{task.task_id}",
|
||||
name=f"sendat|{task.cid}|{task.task_id}",
|
||||
hours=int(task.hour),
|
||||
minutes=int(task.minute),
|
||||
seconds=int(task.second),
|
||||
args=[task, self])
|
||||
scheduler.add_job(
|
||||
self.send_message,
|
||||
"interval",
|
||||
id=f"sendat|{task.cid}|{task.task_id}",
|
||||
name=f"sendat|{task.cid}|{task.task_id}",
|
||||
hours=int(task.hour),
|
||||
minutes=int(task.minute),
|
||||
seconds=int(task.second),
|
||||
args=[task, self],
|
||||
)
|
||||
|
||||
def register_cron_task(self, task: SendTask):
|
||||
scheduler.add_job(self.send_message,
|
||||
"cron",
|
||||
id=f"sendat|{task.cid}|{task.task_id}",
|
||||
name=f"sendat|{task.cid}|{task.task_id}",
|
||||
hour=int(task.hour),
|
||||
minute=int(task.minute),
|
||||
second=int(task.second),
|
||||
args=[task, self])
|
||||
scheduler.add_job(
|
||||
self.send_message,
|
||||
"cron",
|
||||
id=f"sendat|{task.cid}|{task.task_id}",
|
||||
name=f"sendat|{task.cid}|{task.task_id}",
|
||||
hour=int(task.hour),
|
||||
minute=int(task.minute),
|
||||
second=int(task.second),
|
||||
args=[task, self],
|
||||
)
|
||||
|
||||
def register_date_task(self, task: SendTask):
|
||||
date_now = datetime.datetime.now(pytz.timezone(Config.TIME_ZONE))
|
||||
date_will = date_now.replace(hour=int(task.hour), minute=int(task.minute), second=int(task.second))
|
||||
date_will = date_now.replace(
|
||||
hour=int(task.hour), minute=int(task.minute), second=int(task.second)
|
||||
)
|
||||
if date_will < date_now:
|
||||
date_will += datetime.timedelta(days=1)
|
||||
scheduler.add_job(self.send_message,
|
||||
"date",
|
||||
id=f"sendat|{task.cid}|{task.task_id}",
|
||||
name=f"sendat|{task.cid}|{task.task_id}",
|
||||
run_date=date_will,
|
||||
args=[task, self])
|
||||
scheduler.add_job(
|
||||
self.send_message,
|
||||
"date",
|
||||
id=f"sendat|{task.cid}|{task.task_id}",
|
||||
name=f"sendat|{task.cid}|{task.task_id}",
|
||||
run_date=date_will,
|
||||
args=[task, self],
|
||||
)
|
||||
|
||||
def register_single_task(self, task: SendTask):
|
||||
if task.pause or task.time_limit == 0:
|
||||
@ -286,10 +319,12 @@ async def from_msg_get_task_id(message: Message):
|
||||
return uid
|
||||
|
||||
|
||||
@listener(command="sendat",
|
||||
parameters="时间 | 消息内容",
|
||||
need_admin=True,
|
||||
description=f"定时发送消息\n请使用 ,{alias_command('sendat')} h 查看可用命令")
|
||||
@listener(
|
||||
command="sendat",
|
||||
parameters="时间 | 消息内容",
|
||||
need_admin=True,
|
||||
description=f"定时发送消息\n请使用 ,{alias_command('sendat')} h 查看可用命令",
|
||||
)
|
||||
async def send_at(message: Message):
|
||||
if message.arguments == "h" or len(message.parameter) == 0:
|
||||
return await message.edit(send_help_msg)
|
||||
@ -298,7 +333,8 @@ async def send_at(message: Message):
|
||||
return await message.edit("请输入正确的参数")
|
||||
if send_tasks.get_all_ids():
|
||||
return await message.edit(
|
||||
f"已注册的任务:\n\n{send_tasks.print_all_tasks(show_all=False, cid=message.chat.id)}")
|
||||
f"已注册的任务:\n\n{send_tasks.print_all_tasks(show_all=False, cid=message.chat.id)}"
|
||||
)
|
||||
else:
|
||||
return await message.edit("没有已注册的任务。")
|
||||
if len(message.parameter) == 2:
|
||||
@ -319,7 +355,8 @@ async def send_at(message: Message):
|
||||
elif message.parameter[0] == "list":
|
||||
if send_tasks.get_all_ids():
|
||||
return await message.edit(
|
||||
f"已注册的任务:\n\n{send_tasks.print_all_tasks(show_all=True)}")
|
||||
f"已注册的任务:\n\n{send_tasks.print_all_tasks(show_all=True)}"
|
||||
)
|
||||
else:
|
||||
return await message.edit("没有已注册的任务。")
|
||||
# add task
|
||||
|
@ -26,7 +26,14 @@ async def filter_session(hash_start: str) -> Optional[Authorization]:
|
||||
return None
|
||||
except ValueError:
|
||||
return None
|
||||
return next((session for session in await get_all_session() if str(session.hash).startswith(str(hash_start))), None)
|
||||
return next(
|
||||
(
|
||||
session
|
||||
for session in await get_all_session()
|
||||
if str(session.hash).startswith(str(hash_start))
|
||||
),
|
||||
None,
|
||||
)
|
||||
|
||||
|
||||
async def kick_session(session: Authorization) -> bool:
|
||||
@ -42,18 +49,21 @@ def format_timestamp(timestamp: int) -> str:
|
||||
|
||||
|
||||
def format_session(session: Authorization, private: bool = True) -> str:
|
||||
text = f"标识符:<code>{str(session.hash)[:6]}</code>\n" \
|
||||
f"设备型号:<code>{session.device_model}</code>\n" \
|
||||
f"设备平台:<code>{session.platform}</code>\n" \
|
||||
f"系统版本:<code>{session.system_version}</code>\n" \
|
||||
f"应用名称:<code>{session.app_name}</code>\n" \
|
||||
f"应用版本:<code>{session.app_version}</code>\n" \
|
||||
f"官方应用:<code>{'是' if session.official_app else '否'}</code>\n" \
|
||||
f"登录时间:<code>{format_timestamp(session.date_created)}</code>\n" \
|
||||
f"在线时间:<code>{format_timestamp(session.date_active)}</code>"
|
||||
text = (
|
||||
f"标识符:<code>{str(session.hash)[:6]}</code>\n"
|
||||
f"设备型号:<code>{session.device_model}</code>\n"
|
||||
f"设备平台:<code>{session.platform}</code>\n"
|
||||
f"系统版本:<code>{session.system_version}</code>\n"
|
||||
f"应用名称:<code>{session.app_name}</code>\n"
|
||||
f"应用版本:<code>{session.app_version}</code>\n"
|
||||
f"官方应用:<code>{'是' if session.official_app else '否'}</code>\n"
|
||||
f"登录时间:<code>{format_timestamp(session.date_created)}</code>\n"
|
||||
f"在线时间:<code>{format_timestamp(session.date_active)}</code>"
|
||||
)
|
||||
if private:
|
||||
text += f"\nIP:<code>{session.ip}</code>\n" \
|
||||
f"地理位置:<code>{session.country}</code>"
|
||||
text += (
|
||||
f"\nIP:<code>{session.ip}</code>\n" f"地理位置:<code>{session.country}</code>"
|
||||
)
|
||||
if session.hash != 0:
|
||||
text += f"\n\n使用命令 <code>,{alias_command('session')} 注销 {str(session.hash)[:6]}</code> 可以注销此会话。"
|
||||
return text
|
||||
@ -75,25 +85,33 @@ async def count_platform(private: bool = True) -> str:
|
||||
text += f" - <code>{session.app_name}</code>"
|
||||
text += f"\n"
|
||||
text += "\n"
|
||||
text += "\n".join(f"{platform}:{count} 台" for platform, count in platform_count.items())
|
||||
text += "\n".join(
|
||||
f"{platform}:{count} 台" for platform, count in platform_count.items()
|
||||
)
|
||||
return text
|
||||
|
||||
|
||||
@listener(command="session",
|
||||
need_admin=True,
|
||||
parameters="注销/查询",
|
||||
description="注销/查询已登录的会话")
|
||||
@listener(
|
||||
command="session", need_admin=True, parameters="注销/查询", description="注销/查询已登录的会话"
|
||||
)
|
||||
async def session_manage(message: Message):
|
||||
if not message.arguments:
|
||||
return await message.edit(await count_platform(private=message.chat.type in [ChatType.PRIVATE, ChatType.BOT]))
|
||||
return await message.edit(
|
||||
await count_platform(
|
||||
private=message.chat.type in [ChatType.PRIVATE, ChatType.BOT]
|
||||
)
|
||||
)
|
||||
if len(message.parameter) != 2:
|
||||
return await message.edit_text("请输入 `注销/查询 标识符` 来查询或注销会话")
|
||||
if message.parameter[0] == "查询":
|
||||
session = await filter_session(message.parameter[1])
|
||||
if session:
|
||||
return await message.edit(format_session(
|
||||
session,
|
||||
private=message.chat.type in [ChatType.PRIVATE, ChatType.BOT]))
|
||||
return await message.edit(
|
||||
format_session(
|
||||
session,
|
||||
private=message.chat.type in [ChatType.PRIVATE, ChatType.BOT],
|
||||
)
|
||||
)
|
||||
return await message.edit_text("请输入正确的标识符!")
|
||||
if message.parameter[0] == "注销":
|
||||
session = await filter_session(message.parameter[1])
|
||||
|
@ -26,12 +26,14 @@ async def set_custom_emoji(bot: Client, custom_emoji_id: int):
|
||||
raise FileNotFoundError from e
|
||||
|
||||
|
||||
@listener(command="set_status",
|
||||
parameters="[大会员自定义 emoji]",
|
||||
need_admin=True,
|
||||
description="快速设置大会员自定义 emoji 状态")
|
||||
@listener(
|
||||
command="set_status",
|
||||
parameters="[大会员自定义 emoji]",
|
||||
need_admin=True,
|
||||
description="快速设置大会员自定义 emoji 状态",
|
||||
)
|
||||
async def set_emoji_status(bot: Client, message: Message):
|
||||
""" 快速设置大会员自定义 emoji 状态 """
|
||||
"""快速设置大会员自定义 emoji 状态"""
|
||||
me = bot.me or await bot.get_me()
|
||||
if not me.is_premium:
|
||||
return await message.edit("你好像不是大会员。。。")
|
||||
|
@ -171,8 +171,6 @@ async def loosely_forward(
|
||||
delay = min + uniform(0.5, 1.0)
|
||||
await notifier.edit(f"触发 Flood ,暂停 {delay} 秒。")
|
||||
await sleep(delay)
|
||||
await loosely_forward(
|
||||
notifier, message, chat_id, disable_notification
|
||||
)
|
||||
await loosely_forward(notifier, message, chat_id, disable_notification)
|
||||
except Exception:
|
||||
pass # drop other errors
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
from asyncio import sleep
|
||||
from pagermaid.listener import listener
|
||||
from pagermaid.enums import Message
|
||||
from pagermaid.single_utils import sqlite
|
||||
from pagermaid.utils import client, edit_delete
|
||||
|
||||
# from pagermaid import bot
|
||||
from pyrogram.enums.chat_type import ChatType
|
||||
from pagermaid.hook import Hook
|
||||
@ -13,6 +13,7 @@ from pyrogram.types import ChatPermissions
|
||||
|
||||
import json
|
||||
|
||||
|
||||
class SillyGirl:
|
||||
address = ""
|
||||
token = ""
|
||||
@ -27,7 +28,7 @@ class SillyGirl:
|
||||
sqlite["silly_girl_address"] = address
|
||||
else:
|
||||
address = sqlite.get("silly_girl_address")
|
||||
if '@' in address:
|
||||
if "@" in address:
|
||||
s1 = address.split("//", 1)
|
||||
s2 = s1[1].split("@", 1)
|
||||
sillyGirl.token = s2[0]
|
||||
@ -40,7 +41,7 @@ class SillyGirl:
|
||||
|
||||
async def poll(self, data):
|
||||
try:
|
||||
init = ''
|
||||
init = ""
|
||||
if sillyGirl.init == False:
|
||||
init = "&init=true"
|
||||
sillyGirl.init = True
|
||||
@ -50,7 +51,7 @@ class SillyGirl:
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
print(e,"???====")
|
||||
print(e, "???====")
|
||||
await sleep(0.1)
|
||||
return
|
||||
if req_data.status_code != 200:
|
||||
@ -66,23 +67,39 @@ class SillyGirl:
|
||||
cid = reply["chat_id"]
|
||||
uid = reply["sender_id"]
|
||||
if reply["command"] == "ban":
|
||||
if id != 0 :
|
||||
await bot.restrict_chat_member(cid, uid, ChatPermissions(),datetime.now() + timedelta(seconds=id))
|
||||
if id != 0:
|
||||
await bot.restrict_chat_member(
|
||||
cid,
|
||||
uid,
|
||||
ChatPermissions(),
|
||||
datetime.now() + timedelta(seconds=id),
|
||||
)
|
||||
else:
|
||||
await bot.restrict_chat_member(cid, uid, ChatPermissions())
|
||||
await bot.restrict_chat_member(
|
||||
cid, uid, ChatPermissions()
|
||||
)
|
||||
elif reply["command"] == "unban":
|
||||
await bot.restrict_chat_member(cid, uid, ChatPermissions(),datetime.now() + timedelta(seconds=60))
|
||||
await bot.restrict_chat_member(
|
||||
cid,
|
||||
uid,
|
||||
ChatPermissions(),
|
||||
datetime.now() + timedelta(seconds=60),
|
||||
)
|
||||
elif reply["command"] == "kick":
|
||||
if id != 0 :
|
||||
await bot.ban_chat_member(cid,uid,datetime.now() + timedelta(seconds=60))
|
||||
if id != 0:
|
||||
await bot.ban_chat_member(
|
||||
cid, uid, datetime.now() + timedelta(seconds=60)
|
||||
)
|
||||
else:
|
||||
await bot.ban_chat_member(cid,uid)
|
||||
await bot.ban_chat_member(cid, uid)
|
||||
except Exception as e:
|
||||
print(e,"----")
|
||||
print(e, "----")
|
||||
continue
|
||||
if reply["delete"]:
|
||||
try:
|
||||
await bot.edit_message(reply["chat_id"], reply["id"], "打错字了,呱呱~")
|
||||
await bot.edit_message(
|
||||
reply["chat_id"], reply["id"], "打错字了,呱呱~"
|
||||
)
|
||||
except Exception as e:
|
||||
pass
|
||||
try:
|
||||
@ -91,7 +108,9 @@ class SillyGirl:
|
||||
pass
|
||||
if reply["id"] != 0:
|
||||
try:
|
||||
await bot.edit_message(reply["chat_id"], reply["id"], reply["text"])
|
||||
await bot.edit_message(
|
||||
reply["chat_id"], reply["id"], reply["text"]
|
||||
)
|
||||
continue
|
||||
except Exception as e:
|
||||
continue
|
||||
@ -110,42 +129,57 @@ class SillyGirl:
|
||||
caption=reply["text"],
|
||||
reply_to_message_id=reply["reply_to"],
|
||||
)
|
||||
elif reply["text"] != '':
|
||||
message = await bot.send_message(reply["chat_id"], reply["text"], reply_to_message_id=reply["reply_to"])
|
||||
elif reply["text"] != "":
|
||||
message = await bot.send_message(
|
||||
reply["chat_id"],
|
||||
reply["text"],
|
||||
reply_to_message_id=reply["reply_to"],
|
||||
)
|
||||
if message:
|
||||
results.append({
|
||||
'id': message.id,
|
||||
'uuid': reply["uuid"],
|
||||
})
|
||||
results.append(
|
||||
{
|
||||
"id": message.id,
|
||||
"uuid": reply["uuid"],
|
||||
}
|
||||
)
|
||||
if len(results):
|
||||
await sillyGirl.poll(results)
|
||||
except Exception as e:
|
||||
print(e,"???")
|
||||
print(e, "???")
|
||||
await sleep(0.1)
|
||||
return
|
||||
|
||||
|
||||
sillyGirl = SillyGirl()
|
||||
|
||||
|
||||
@Hook.on_startup()
|
||||
async def connect_sillyGirl():
|
||||
sillyGirl.init_connect_info("")
|
||||
bot.loop.create_task(sillyGirl.polls())
|
||||
bot.loop.create_task(sillyGirl.polls())
|
||||
|
||||
|
||||
|
||||
@listener(is_plugin=True,outgoing=True, ignore_edited=True, command="sillyGirl",description="连接到傻妞服务器", parameters="[auth]")
|
||||
@listener(
|
||||
is_plugin=True,
|
||||
outgoing=True,
|
||||
ignore_edited=True,
|
||||
command="sillyGirl",
|
||||
description="连接到傻妞服务器",
|
||||
parameters="[auth]",
|
||||
)
|
||||
async def Connect(message: Message):
|
||||
try:
|
||||
await edit_delete(message,"连接中,建议重启...")
|
||||
try:
|
||||
await edit_delete(message, "连接中,建议重启...")
|
||||
sillyGirl.init_connect_info(message.arguments)
|
||||
except Exception as e:
|
||||
print(e,"+++")
|
||||
print(e, "+++")
|
||||
print(e)
|
||||
|
||||
@listener(outgoing=True,ignore_edited=True, incoming=True)
|
||||
|
||||
@listener(outgoing=True, ignore_edited=True, incoming=True)
|
||||
async def handle_receive(message: Message):
|
||||
try:
|
||||
try:
|
||||
reply_to = message.id
|
||||
reply_to_sender_id = 0
|
||||
chat_id = message.chat.id
|
||||
@ -174,24 +208,22 @@ async def handle_receive(message: Message):
|
||||
await sillyGirl.poll(
|
||||
[
|
||||
{
|
||||
'id': message.id,
|
||||
'chat_id': chat_id,
|
||||
'text': message.text,
|
||||
'sender_id': sender_id,
|
||||
'reply_to': reply_to,
|
||||
'reply_to_sender_id': reply_to_sender_id,
|
||||
'bot_id': sillyGirl.self_user_id,
|
||||
'is_group': message.chat.type
|
||||
"id": message.id,
|
||||
"chat_id": chat_id,
|
||||
"text": message.text,
|
||||
"sender_id": sender_id,
|
||||
"reply_to": reply_to,
|
||||
"reply_to_sender_id": reply_to_sender_id,
|
||||
"bot_id": sillyGirl.self_user_id,
|
||||
"is_group": message.chat.type
|
||||
in [ChatType.SUPERGROUP, ChatType.CHANNEL],
|
||||
'user_name': user_name,
|
||||
'chat_name': chat_name,
|
||||
"user_name": user_name,
|
||||
"chat_name": chat_name,
|
||||
}
|
||||
]
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
print(e,"---")
|
||||
print(e, "---")
|
||||
return
|
||||
|
||||
|
||||
|
@ -11,20 +11,21 @@ from pagermaid.utils import lang, pip_install
|
||||
|
||||
pip_install("speedtest-cli", alias="speedtest")
|
||||
|
||||
from speedtest import Speedtest, ShareResultsConnectFailure, ShareResultsSubmitFailure, NoMatchedServers, \
|
||||
SpeedtestBestServerFailure, SpeedtestHTTPError
|
||||
from speedtest import (
|
||||
Speedtest,
|
||||
ShareResultsConnectFailure,
|
||||
ShareResultsSubmitFailure,
|
||||
NoMatchedServers,
|
||||
SpeedtestBestServerFailure,
|
||||
SpeedtestHTTPError,
|
||||
)
|
||||
|
||||
|
||||
def unit_convert(byte):
|
||||
""" Converts byte into readable formats. """
|
||||
"""Converts byte into readable formats."""
|
||||
power = 1000
|
||||
zero = 0
|
||||
units = {
|
||||
0: '',
|
||||
1: 'Kb/s',
|
||||
2: 'Mb/s',
|
||||
3: 'Gb/s',
|
||||
4: 'Tb/s'}
|
||||
units = {0: "", 1: "Kb/s", 2: "Mb/s", 3: "Gb/s", 4: "Tb/s"}
|
||||
while byte > power:
|
||||
byte /= power
|
||||
zero += 1
|
||||
@ -57,7 +58,9 @@ async def run_speedtest(request: AsyncClient, message: Message):
|
||||
f"Timestamp: `{result['timestamp']}`"
|
||||
)
|
||||
if result["share"]:
|
||||
data = await request.get(result["share"].replace("http:", "https:"), follow_redirects=True)
|
||||
data = await request.get(
|
||||
result["share"].replace("http:", "https:"), follow_redirects=True
|
||||
)
|
||||
with open("speedtest.png", mode="wb") as f:
|
||||
f.write(data.content)
|
||||
with contextlib.suppress(Exception):
|
||||
@ -84,28 +87,30 @@ async def get_all_ids():
|
||||
)
|
||||
|
||||
|
||||
@listener(command="speedtest",
|
||||
description=lang('speedtest_des'),
|
||||
parameters="(Server ID/测速点列表)")
|
||||
@listener(
|
||||
command="speedtest",
|
||||
description=lang("speedtest_des"),
|
||||
parameters="(Server ID/测速点列表)",
|
||||
)
|
||||
async def speedtest(client: Client, message: Message, request: AsyncClient):
|
||||
""" Tests internet speed using speedtest. """
|
||||
"""Tests internet speed using speedtest."""
|
||||
if message.arguments == "测速点列表":
|
||||
msg = message
|
||||
else:
|
||||
msg: Message = await message.edit(lang('speedtest_processing'))
|
||||
msg: Message = await message.edit(lang("speedtest_processing"))
|
||||
try:
|
||||
if message.arguments == "测速点列表":
|
||||
des, photo = await get_all_ids()
|
||||
else:
|
||||
des, photo = await run_speedtest(request, message)
|
||||
except SpeedtestHTTPError:
|
||||
return await msg.edit(lang('speedtest_ConnectFailure'))
|
||||
return await msg.edit(lang("speedtest_ConnectFailure"))
|
||||
except (ValueError, TypeError):
|
||||
return await msg.edit(lang('arg_error'))
|
||||
return await msg.edit(lang("arg_error"))
|
||||
except (SpeedtestBestServerFailure, NoMatchedServers):
|
||||
return await msg.edit(lang('speedtest_ServerFailure'))
|
||||
return await msg.edit(lang("speedtest_ServerFailure"))
|
||||
except (ShareResultsSubmitFailure, RuntimeError, ReadTimeout):
|
||||
return await msg.edit(lang('speedtest_ConnectFailure'))
|
||||
return await msg.edit(lang("speedtest_ConnectFailure"))
|
||||
if not photo:
|
||||
return await msg.edit(des)
|
||||
try:
|
||||
@ -113,7 +118,8 @@ async def speedtest(client: Client, message: Message, request: AsyncClient):
|
||||
message.chat.id,
|
||||
photo,
|
||||
caption=des,
|
||||
reply_to_message_id=message.reply_to_top_message_id or message.reply_to_message_id,
|
||||
reply_to_message_id=message.reply_to_top_message_id
|
||||
or message.reply_to_message_id,
|
||||
)
|
||||
except Exception:
|
||||
return await msg.edit(des)
|
||||
|
@ -6,7 +6,11 @@ from typing import Optional
|
||||
from pyrogram.errors import PeerIdInvalid
|
||||
from pyrogram.raw.functions.messages import GetStickerSet
|
||||
from pyrogram.raw.functions.stickers import CreateStickerSet
|
||||
from pyrogram.raw.types import InputStickerSetShortName, InputDocument, InputStickerSetItem
|
||||
from pyrogram.raw.types import (
|
||||
InputStickerSetShortName,
|
||||
InputDocument,
|
||||
InputStickerSetItem,
|
||||
)
|
||||
from pyrogram.raw.types.messages import StickerSet
|
||||
from pyrogram.file_id import FileId
|
||||
|
||||
@ -19,43 +23,36 @@ from pagermaid.utils import alias_command
|
||||
|
||||
class CannotToStickerSetError(Exception):
|
||||
"""
|
||||
Occurs when program cannot change a message to a sticker set
|
||||
Occurs when program cannot change a message to a sticker set
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(
|
||||
"无法将此消息转换为贴纸"
|
||||
)
|
||||
super().__init__("无法将此消息转换为贴纸")
|
||||
|
||||
|
||||
class NoStickerSetNameError(Exception):
|
||||
"""
|
||||
Occurs when no username is provided
|
||||
Occurs when no username is provided
|
||||
"""
|
||||
|
||||
def __init__(self, string: str = "请先设置用户名"):
|
||||
super().__init__(
|
||||
string
|
||||
)
|
||||
super().__init__(string)
|
||||
|
||||
|
||||
class StickerSetFullError(Exception):
|
||||
"""
|
||||
Occurs when the sticker set is full
|
||||
Occurs when the sticker set is full
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(
|
||||
"贴纸包已满"
|
||||
)
|
||||
super().__init__("贴纸包已满")
|
||||
|
||||
|
||||
async def get_pack(name: str):
|
||||
try:
|
||||
return await bot.invoke(GetStickerSet(
|
||||
stickerset=InputStickerSetShortName(short_name=name),
|
||||
hash=0
|
||||
))
|
||||
return await bot.invoke(
|
||||
GetStickerSet(stickerset=InputStickerSetShortName(short_name=name), hash=0)
|
||||
)
|
||||
except Exception as e: # noqa
|
||||
raise NoStickerSetNameError("贴纸名名称错误或者不存在") from e
|
||||
|
||||
@ -73,8 +70,13 @@ class Sticker:
|
||||
document_path: Optional[str]
|
||||
software: str = "PagerMaid-Pyro"
|
||||
|
||||
def __init__(self, message: Message, sticker_set: str = "", emoji: str = "😀",
|
||||
should_forward: Message = None):
|
||||
def __init__(
|
||||
self,
|
||||
message: Message,
|
||||
sticker_set: str = "",
|
||||
emoji: str = "😀",
|
||||
should_forward: Message = None,
|
||||
):
|
||||
self.message = message
|
||||
self.sticker_set = sticker_set
|
||||
self.custom_sticker_set = False
|
||||
@ -151,7 +153,9 @@ class Sticker:
|
||||
if not self.document_path:
|
||||
return
|
||||
with contextlib.suppress(Exception):
|
||||
msg = await bot.send_document(429000, document=self.document_path, force_document=True)
|
||||
msg = await bot.send_document(
|
||||
429000, document=self.document_path, force_document=True
|
||||
)
|
||||
file = FileId.decode(msg.document.file_id)
|
||||
self.document = InputDocument(
|
||||
id=file.media_id,
|
||||
@ -174,10 +178,7 @@ class Sticker:
|
||||
title=title,
|
||||
short_name=self.sticker_set,
|
||||
stickers=[
|
||||
InputStickerSetItem(
|
||||
document=self.document,
|
||||
emoji=self.emoji
|
||||
)
|
||||
InputStickerSetItem(document=self.document, emoji=self.emoji)
|
||||
],
|
||||
animated=self.is_animated,
|
||||
videos=self.is_video,
|
||||
@ -189,16 +190,16 @@ class Sticker:
|
||||
async def add_to_sticker_set(self):
|
||||
async with bot.conversation(429000) as conv:
|
||||
await conv.ask("/start")
|
||||
await sleep(.3)
|
||||
await sleep(0.3)
|
||||
await conv.mark_as_read()
|
||||
await conv.ask("/cancel")
|
||||
await sleep(.3)
|
||||
await sleep(0.3)
|
||||
await conv.mark_as_read()
|
||||
await conv.ask("/addsticker")
|
||||
await sleep(.3)
|
||||
await sleep(0.3)
|
||||
await conv.mark_as_read()
|
||||
resp: Message = await conv.ask(self.sticker_set)
|
||||
await sleep(.3)
|
||||
await sleep(0.3)
|
||||
if resp.text == "Invalid set selected.":
|
||||
raise NoStickerSetNameError("这个贴纸包好像不属于你~")
|
||||
await conv.mark_as_read()
|
||||
@ -207,18 +208,18 @@ class Sticker:
|
||||
else:
|
||||
await self.should_forward.forward("Stickers")
|
||||
resp: Message = await conv.get_response()
|
||||
await sleep(.3)
|
||||
await sleep(0.3)
|
||||
if not resp.text.startswith("Thanks!"):
|
||||
raise NoStickerSetNameError("这个贴纸包类型好像不匹配~")
|
||||
await conv.mark_as_read()
|
||||
await conv.ask(self.emoji)
|
||||
await sleep(.3)
|
||||
await sleep(0.3)
|
||||
await conv.mark_as_read()
|
||||
await conv.ask("/done")
|
||||
await sleep(.3)
|
||||
await sleep(0.3)
|
||||
await conv.mark_as_read()
|
||||
await conv.ask("/done")
|
||||
await sleep(.3)
|
||||
await sleep(0.3)
|
||||
await conv.mark_as_read()
|
||||
|
||||
async def to_sticker_set(self):
|
||||
@ -236,10 +237,12 @@ class Sticker:
|
||||
|
||||
def get_config(self) -> str:
|
||||
pack = self.mention() if self.sticker_set else "无法保存,请设置用户名"
|
||||
return f"欢迎使用 sticker 插件\n\n" \
|
||||
f"将自动保存到贴纸包:{pack}\n\n" \
|
||||
f"使用命令 <code>,{alias_command('s')} 贴纸包名</code> 自定义保存贴纸包\n" \
|
||||
f"使用命令 <code>,{alias_command('s')} cancel</code> 取消自定义保存贴纸包"
|
||||
return (
|
||||
f"欢迎使用 sticker 插件\n\n"
|
||||
f"将自动保存到贴纸包:{pack}\n\n"
|
||||
f"使用命令 <code>,{alias_command('s')} 贴纸包名</code> 自定义保存贴纸包\n"
|
||||
f"使用命令 <code>,{alias_command('s')} cancel</code> 取消自定义保存贴纸包"
|
||||
)
|
||||
|
||||
|
||||
@listener(
|
||||
|
@ -5,9 +5,9 @@ from pagermaid.enums import Message, Client
|
||||
from pagermaid.single_utils import safe_remove
|
||||
|
||||
|
||||
@listener(command="sticker_to_pic",
|
||||
description="将你回复的静态贴纸转换为图片",
|
||||
parameters="(是否发送原图,默认为否)")
|
||||
@listener(
|
||||
command="sticker_to_pic", description="将你回复的静态贴纸转换为图片", parameters="(是否发送原图,默认为否)"
|
||||
)
|
||||
async def sticker_to_pic(bot: Client, message: Message):
|
||||
origin = bool(message.arguments)
|
||||
reply = message.reply_to_message
|
||||
|
@ -27,25 +27,33 @@ async def export_sticker_to_csv():
|
||||
writer = csv.writer(f)
|
||||
writer.writerow(["name", "short_name", "is_masks", "is_animated", "is_video"])
|
||||
for sticker_set in stickers.sets:
|
||||
writer.writerow([sticker_set.title,
|
||||
sticker_set.short_name,
|
||||
sticker_set.archived if hasattr(sticker_set, "archived") else False,
|
||||
sticker_set.animated if hasattr(sticker_set, "animated") else False,
|
||||
sticker_set.videos if hasattr(sticker_set, "videos") else False, ])
|
||||
writer.writerow(
|
||||
[
|
||||
sticker_set.title,
|
||||
sticker_set.short_name,
|
||||
sticker_set.archived if hasattr(sticker_set, "archived") else False,
|
||||
sticker_set.animated if hasattr(sticker_set, "animated") else False,
|
||||
sticker_set.videos if hasattr(sticker_set, "videos") else False,
|
||||
]
|
||||
)
|
||||
return len(stickers.sets)
|
||||
|
||||
|
||||
async def import_sticker(short_name):
|
||||
await bot.invoke(InstallStickerSet(
|
||||
stickerset=InputStickerSetShortName(short_name=short_name),
|
||||
archived=False,
|
||||
))
|
||||
await bot.invoke(
|
||||
InstallStickerSet(
|
||||
stickerset=InputStickerSetShortName(short_name=short_name),
|
||||
archived=False,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
async def remove_sticker(short_name):
|
||||
await bot.invoke(UninstallStickerSet(
|
||||
stickerset=InputStickerSetShortName(short_name=short_name),
|
||||
))
|
||||
await bot.invoke(
|
||||
UninstallStickerSet(
|
||||
stickerset=InputStickerSetShortName(short_name=short_name),
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
async def import_sticker_from_csv(file_name):
|
||||
@ -92,10 +100,12 @@ async def clear_sets():
|
||||
return success, failed
|
||||
|
||||
|
||||
@listener(command="sticker_transfer",
|
||||
need_admin=True,
|
||||
parameters="导出/导入/清空",
|
||||
description="导出、导入、清空已安装的贴纸包")
|
||||
@listener(
|
||||
command="sticker_transfer",
|
||||
need_admin=True,
|
||||
parameters="导出/导入/清空",
|
||||
description="导出、导入、清空已安装的贴纸包",
|
||||
)
|
||||
async def sticker_transfer(message: Message):
|
||||
if message.arguments == "导出":
|
||||
try:
|
||||
@ -108,7 +118,7 @@ async def sticker_transfer(message: Message):
|
||||
"stickers.csv",
|
||||
caption=f"贴纸包导出文件,成功导出了 {num} 个贴纸包",
|
||||
thumb=f"pagermaid{sep}assets{sep}logo.jpg",
|
||||
reply_to_message_id=message.reply_to_top_message_id
|
||||
reply_to_message_id=message.reply_to_top_message_id,
|
||||
)
|
||||
safe_remove("stickers.csv")
|
||||
await message.safe_delete()
|
||||
|
@ -4,29 +4,36 @@ import contextlib
|
||||
from httpx import get, post
|
||||
|
||||
token = str(sys.argv[1])
|
||||
main = get("https://api.github.com/repos/TeamPGM/PagerMaid_Plugins_Pyro/commits/v2").json()
|
||||
main = get(
|
||||
"https://api.github.com/repos/TeamPGM/PagerMaid_Plugins_Pyro/commits/v2"
|
||||
).json()
|
||||
text = (
|
||||
(
|
||||
(
|
||||
(
|
||||
"#更新日志 #pyro #"
|
||||
+ main['commit']['author']['name'].replace('_', '')
|
||||
+ ' \n\n🔨 ['
|
||||
+ main['sha'][:7]
|
||||
+ main["commit"]["author"]["name"].replace("_", "")
|
||||
+ " \n\n🔨 ["
|
||||
+ main["sha"][:7]
|
||||
)
|
||||
+ '](https://github.com/TeamPGM/PagerMaid_Plugins_Pyro/commit/'
|
||||
+ "](https://github.com/TeamPGM/PagerMaid_Plugins_Pyro/commit/"
|
||||
)
|
||||
+ main['sha']
|
||||
+ main["sha"]
|
||||
)
|
||||
+ '): '
|
||||
) + main['commit']['message']
|
||||
+ "): "
|
||||
) + main["commit"]["message"]
|
||||
|
||||
url = f'https://api.telegram.org/bot{token}/sendMessage'
|
||||
for cid in ['-1001441461877', '-1001319957857']:
|
||||
push_content = {'chat_id': cid, 'disable_web_page_preview': 'True', 'parse_mode': 'markdown', 'text': text}
|
||||
if cid == '-1001441461877':
|
||||
push_content['message_thread_id'] = 1027828
|
||||
url = f"https://api.telegram.org/bot{token}/sendMessage"
|
||||
for cid in ["-1001441461877", "-1001319957857"]:
|
||||
push_content = {
|
||||
"chat_id": cid,
|
||||
"disable_web_page_preview": "True",
|
||||
"parse_mode": "markdown",
|
||||
"text": text,
|
||||
}
|
||||
if cid == "-1001441461877":
|
||||
push_content["message_thread_id"] = 1027828
|
||||
with contextlib.suppress(Exception):
|
||||
main_req = post(url, data=push_content)
|
||||
time.sleep(1)
|
||||
print(main['sha'] + " ok!")
|
||||
print(main["sha"] + " ok!")
|
||||
|
@ -11,11 +11,12 @@ url = "https://t.me/PagerMaid_Modify"
|
||||
temp = """<h3 id="{0}">{0}</h3><p>{1}</p><blockquote>,apt install {0}</blockquote>"""
|
||||
telegraph = Telegraph(token)
|
||||
|
||||
|
||||
def gen():
|
||||
with open("list.json", "r", encoding="utf-8") as f:
|
||||
data = json.load(f)
|
||||
k = []
|
||||
data["list"].sort(key=lambda i:i["name"])
|
||||
data["list"].sort(key=lambda i: i["name"])
|
||||
for i in data["list"]:
|
||||
des = i["des_short"]
|
||||
if i["des"].startswith("这个人很懒") or i["des"] == i["des_short"]:
|
||||
@ -25,4 +26,7 @@ def gen():
|
||||
k.append(temp.format(i["name"], des))
|
||||
return "<hr>".join(k)
|
||||
|
||||
telegraph.edit_page(path=path, title=title, html_content=gen(), author_name=name, author_url=url)
|
||||
|
||||
telegraph.edit_page(
|
||||
path=path, title=title, html_content=gen(), author_name=name, author_url=url
|
||||
)
|
||||
|
@ -6,9 +6,12 @@ from pagermaid.listener import listener
|
||||
from pagermaid.utils import lang, Message
|
||||
|
||||
|
||||
@listener(is_plugin=False, command="teletype",
|
||||
description=lang('teletype_des'),
|
||||
parameters="[message]")
|
||||
@listener(
|
||||
is_plugin=False,
|
||||
command="teletype",
|
||||
description=lang("teletype_des"),
|
||||
parameters="[message]",
|
||||
)
|
||||
async def teletype(message: Message):
|
||||
if not message.arguments:
|
||||
return await message.edit("出错了呜呜呜 ~ 空白的参数。")
|
||||
@ -19,7 +22,7 @@ async def teletype(message: Message):
|
||||
return
|
||||
interval = 0.05
|
||||
cursor = "█"
|
||||
buffer = ''
|
||||
buffer = ""
|
||||
msg = await message.edit(cursor)
|
||||
await sleep(interval)
|
||||
for character in text:
|
||||
|
11
tgbg/main.py
11
tgbg/main.py
@ -8,8 +8,7 @@ from pagermaid.listener import listener
|
||||
from pagermaid.enums import Client, Message
|
||||
|
||||
|
||||
@listener(command="tgbg", description="解析 Telegram 聊天窗口背景图",
|
||||
parameters="t.me/bg/xxx")
|
||||
@listener(command="tgbg", description="解析 Telegram 聊天窗口背景图", parameters="t.me/bg/xxx")
|
||||
async def tg_bg(client: Client, message: Message):
|
||||
argument = message.obtain_message()
|
||||
if url := urlparse(argument):
|
||||
@ -17,11 +16,15 @@ async def tg_bg(client: Client, message: Message):
|
||||
if url.hostname == "t.me" and path.startswith("/bg/"):
|
||||
slug = path[4:]
|
||||
try:
|
||||
bg: WallPaper = await client.invoke(GetWallPaper(wallpaper=InputWallPaperSlug(slug=slug)))
|
||||
bg: WallPaper = await client.invoke(
|
||||
GetWallPaper(wallpaper=InputWallPaperSlug(slug=slug))
|
||||
)
|
||||
except Exception as e:
|
||||
return await message.edit(f"获取失败: {str(e)}")
|
||||
if bg.document:
|
||||
bg_doc = Document._parse(client, document=bg.document, file_name="bg.jpg") # noqa
|
||||
bg_doc = Document._parse(
|
||||
client, document=bg.document, file_name="bg.jpg"
|
||||
) # noqa
|
||||
await client.send_document(
|
||||
message.chat.id,
|
||||
bg_doc.file_id,
|
||||
|
@ -26,17 +26,16 @@ async def today_in_history_subscribe() -> None:
|
||||
text = await get_history()
|
||||
for gid in today_in_history_sub.get_subs():
|
||||
try:
|
||||
await bot.send_message(
|
||||
gid,
|
||||
text
|
||||
)
|
||||
await bot.send_message(gid, text)
|
||||
except Exception as e: # noqa
|
||||
today_in_history_sub.del_id(gid)
|
||||
|
||||
|
||||
@listener(command="today_in_history",
|
||||
parameters="订阅/退订",
|
||||
description="查看历史上的今天,支持订阅/退订每天上午八点定时发送")
|
||||
@listener(
|
||||
command="today_in_history",
|
||||
parameters="订阅/退订",
|
||||
description="查看历史上的今天,支持订阅/退订每天上午八点定时发送",
|
||||
)
|
||||
async def today_in_history(message: Message):
|
||||
if not message.arguments:
|
||||
try:
|
||||
@ -47,7 +46,9 @@ async def today_in_history(message: Message):
|
||||
elif message.arguments == "订阅":
|
||||
if check_manage_subs(message):
|
||||
if today_in_history_sub.check_id(message.chat.id):
|
||||
return await edit_delete(message, "❌ 你已经订阅了历史上的今天", parse_mode=ParseMode.HTML)
|
||||
return await edit_delete(
|
||||
message, "❌ 你已经订阅了历史上的今天", parse_mode=ParseMode.HTML
|
||||
)
|
||||
today_in_history_sub.add_id(message.chat.id)
|
||||
await message.edit("你已经成功订阅了历史上的今天")
|
||||
else:
|
||||
@ -55,7 +56,9 @@ async def today_in_history(message: Message):
|
||||
elif message.arguments == "退订":
|
||||
if check_manage_subs(message):
|
||||
if not today_in_history_sub.check_id(message.chat.id):
|
||||
return await edit_delete(message, "❌ 你还没有订阅摸历史上的今天", parse_mode=ParseMode.HTML)
|
||||
return await edit_delete(
|
||||
message, "❌ 你还没有订阅摸历史上的今天", parse_mode=ParseMode.HTML
|
||||
)
|
||||
today_in_history_sub.del_id(message.chat.id)
|
||||
await message.edit("你已经成功退订了历史上的今天")
|
||||
else:
|
||||
|
269
trace/main.py
269
trace/main.py
@ -16,7 +16,7 @@ from pagermaid.single_utils import sqlite
|
||||
pip_install("emoji")
|
||||
import emoji
|
||||
|
||||
NATIVE_EMOJI = b'\xf0\x9f\x91\x8d\xf0\x9f\x91\x8e\xe2\x9d\xa4\xef\xb8\x8f\xf0\x9f\x94\xa5\xf0\x9f\xa5\xb0\xf0\x9f\x91\x8f\xf0\x9f\x98\x81\xf0\x9f\xa4\x94\xf0\x9f\xa4\xaf\xf0\x9f\x98\xb1\xf0\x9f\xa4\xac\xf0\x9f\x98\xa2\xf0\x9f\x8e\x89\xf0\x9f\xa4\xa9\xf0\x9f\xa4\xae\xf0\x9f\x92\xa9\xf0\x9f\x99\x8f\xf0\x9f\x91\x8c\xf0\x9f\x95\x8a\xf0\x9f\xa4\xa1\xf0\x9f\xa5\xb1\xf0\x9f\xa5\xb4\xf0\x9f\x98\x8d\xf0\x9f\x90\xb3\xe2\x9d\xa4\xef\xb8\x8f\xe2\x80\x8d\xf0\x9f\x94\xa5\xf0\x9f\x8c\x9a\xf0\x9f\x8c\xad\xf0\x9f\x92\xaf\xf0\x9f\xa4\xa3\xe2\x9a\xa1\xef\xb8\x8f\xf0\x9f\x8d\x8c\xf0\x9f\x8f\x86\xf0\x9f\x92\x94\xf0\x9f\xa4\xa8\xf0\x9f\x98\x90\xf0\x9f\x8d\x93\xf0\x9f\x8d\xbe\xf0\x9f\x92\x8b\xf0\x9f\x96\x95\xf0\x9f\x98\x88\xf0\x9f\x98\x82\xf0\x9f\x98\xad'.decode()
|
||||
NATIVE_EMOJI = b"\xf0\x9f\x91\x8d\xf0\x9f\x91\x8e\xe2\x9d\xa4\xef\xb8\x8f\xf0\x9f\x94\xa5\xf0\x9f\xa5\xb0\xf0\x9f\x91\x8f\xf0\x9f\x98\x81\xf0\x9f\xa4\x94\xf0\x9f\xa4\xaf\xf0\x9f\x98\xb1\xf0\x9f\xa4\xac\xf0\x9f\x98\xa2\xf0\x9f\x8e\x89\xf0\x9f\xa4\xa9\xf0\x9f\xa4\xae\xf0\x9f\x92\xa9\xf0\x9f\x99\x8f\xf0\x9f\x91\x8c\xf0\x9f\x95\x8a\xf0\x9f\xa4\xa1\xf0\x9f\xa5\xb1\xf0\x9f\xa5\xb4\xf0\x9f\x98\x8d\xf0\x9f\x90\xb3\xe2\x9d\xa4\xef\xb8\x8f\xe2\x80\x8d\xf0\x9f\x94\xa5\xf0\x9f\x8c\x9a\xf0\x9f\x8c\xad\xf0\x9f\x92\xaf\xf0\x9f\xa4\xa3\xe2\x9a\xa1\xef\xb8\x8f\xf0\x9f\x8d\x8c\xf0\x9f\x8f\x86\xf0\x9f\x92\x94\xf0\x9f\xa4\xa8\xf0\x9f\x98\x90\xf0\x9f\x8d\x93\xf0\x9f\x8d\xbe\xf0\x9f\x92\x8b\xf0\x9f\x96\x95\xf0\x9f\x98\x88\xf0\x9f\x98\x82\xf0\x9f\x98\xad".decode()
|
||||
SPECIAL_EMOJI = "❤⬅↔➡⬆↕⬇" # TO BE ADDED
|
||||
USAGE = f"""```Usage:
|
||||
Reply to a message:
|
||||
@ -50,8 +50,13 @@ if cached_sqlite.get("trace.config.big", None) is None:
|
||||
cached_sqlite["trace.config.big"] = True
|
||||
|
||||
|
||||
async def edit_and_delete(message: Message, text: str, entities: List[MessageEntity] = None,
|
||||
seconds=5, parse_mode: ParseMode = ParseMode.DEFAULT):
|
||||
async def edit_and_delete(
|
||||
message: Message,
|
||||
text: str,
|
||||
entities: List[MessageEntity] = None,
|
||||
seconds=5,
|
||||
parse_mode: ParseMode = ParseMode.DEFAULT,
|
||||
):
|
||||
if entities is None:
|
||||
entities = []
|
||||
await message.edit(text, entities=entities, parse_mode=parse_mode)
|
||||
@ -84,12 +89,18 @@ async def get_all_traced(client: Client) -> Dict:
|
||||
|
||||
def count_offset(text: str) -> int:
|
||||
return sum(
|
||||
1 if c in SPECIAL_EMOJI or c not in SPECIAL_EMOJI and not emoji.is_emoji(c) else 2 for c in text
|
||||
1
|
||||
if c in SPECIAL_EMOJI or c not in SPECIAL_EMOJI and not emoji.is_emoji(c)
|
||||
else 2
|
||||
for c in text
|
||||
)
|
||||
|
||||
|
||||
def append_emoji_to_text(text: str, reaction_list: List[Union[ReactionEmoji, ReactionCustomEmoji]],
|
||||
entities: List[MessageEntity]):
|
||||
def append_emoji_to_text(
|
||||
text: str,
|
||||
reaction_list: List[Union[ReactionEmoji, ReactionCustomEmoji]],
|
||||
entities: List[MessageEntity],
|
||||
):
|
||||
if reaction_list is None:
|
||||
return text, entities
|
||||
text += "["
|
||||
@ -97,12 +108,14 @@ def append_emoji_to_text(text: str, reaction_list: List[Union[ReactionEmoji, Rea
|
||||
if type(reaction) is ReactionEmoji:
|
||||
text += f"{reaction.emoticon}, "
|
||||
elif type(reaction) is ReactionCustomEmoji:
|
||||
entities.append(MessageEntity(
|
||||
type=MessageEntityType.CUSTOM_EMOJI,
|
||||
offset=count_offset(text),
|
||||
length=2,
|
||||
custom_emoji_id=reaction.document_id
|
||||
))
|
||||
entities.append(
|
||||
MessageEntity(
|
||||
type=MessageEntityType.CUSTOM_EMOJI,
|
||||
offset=count_offset(text),
|
||||
length=2,
|
||||
custom_emoji_id=reaction.document_id,
|
||||
)
|
||||
)
|
||||
text += "👋, "
|
||||
else: # Would it reach here?
|
||||
text += str(reaction)
|
||||
@ -111,11 +124,7 @@ def append_emoji_to_text(text: str, reaction_list: List[Union[ReactionEmoji, Rea
|
||||
|
||||
|
||||
def get_keyword_emojis_from_message(message) -> Tuple[str, List[Union[str, int]]]:
|
||||
return (
|
||||
(message.parameter[0], get_emojis_from_message(message))
|
||||
if message
|
||||
else None
|
||||
)
|
||||
return (message.parameter[0], get_emojis_from_message(message)) if message else None
|
||||
|
||||
|
||||
def get_emojis_from_message(message: Message) -> Optional[List[Union[str, int]]]:
|
||||
@ -131,10 +140,12 @@ def get_emojis_from_message(message: Message) -> Optional[List[Union[str, int]]]
|
||||
if len(emoji_list) == 3:
|
||||
break
|
||||
if emoji.is_emoji(c):
|
||||
if message.entities \
|
||||
and len(message.entities) - 1 >= entity_i \
|
||||
and message.entities[entity_i].type == MessageEntityType.CUSTOM_EMOJI \
|
||||
and message.entities[entity_i].offset == index:
|
||||
if (
|
||||
message.entities
|
||||
and len(message.entities) - 1 >= entity_i
|
||||
and message.entities[entity_i].type == MessageEntityType.CUSTOM_EMOJI
|
||||
and message.entities[entity_i].offset == index
|
||||
):
|
||||
emoji_list.append(message.entities[entity_i].custom_emoji_id)
|
||||
entity_i += 1
|
||||
else:
|
||||
@ -157,30 +168,42 @@ def get_name_and_username_from_message(message: Message):
|
||||
return other_name, other_username
|
||||
|
||||
|
||||
def append_username_to_text(text: str, other_name: str, other_username: str, entities: List[MessageEntity],
|
||||
message: Message, user: Optional[User] = None):
|
||||
def append_username_to_text(
|
||||
text: str,
|
||||
other_name: str,
|
||||
other_username: str,
|
||||
entities: List[MessageEntity],
|
||||
message: Message,
|
||||
user: Optional[User] = None,
|
||||
):
|
||||
if other_username:
|
||||
entities.append(MessageEntity(
|
||||
type=MessageEntityType.MENTION,
|
||||
offset=count_offset(text) + 2,
|
||||
length=count_offset(other_username),
|
||||
))
|
||||
entities.append(
|
||||
MessageEntity(
|
||||
type=MessageEntityType.MENTION,
|
||||
offset=count_offset(text) + 2,
|
||||
length=count_offset(other_username),
|
||||
)
|
||||
)
|
||||
text += f" @{other_username}"
|
||||
elif other_name:
|
||||
if user:
|
||||
entities.append(MessageEntity(
|
||||
type=MessageEntityType.TEXT_MENTION,
|
||||
offset=count_offset(text) + 2,
|
||||
length=count_offset(other_name),
|
||||
user=user
|
||||
))
|
||||
entities.append(
|
||||
MessageEntity(
|
||||
type=MessageEntityType.TEXT_MENTION,
|
||||
offset=count_offset(text) + 2,
|
||||
length=count_offset(other_name),
|
||||
user=user,
|
||||
)
|
||||
)
|
||||
else:
|
||||
entities.append(MessageEntity(
|
||||
type=MessageEntityType.TEXT_MENTION,
|
||||
offset=count_offset(text) + 2,
|
||||
length=count_offset(other_name),
|
||||
user=message.reply_to_message.from_user
|
||||
))
|
||||
entities.append(
|
||||
MessageEntity(
|
||||
type=MessageEntityType.TEXT_MENTION,
|
||||
offset=count_offset(text) + 2,
|
||||
length=count_offset(other_name),
|
||||
user=message.reply_to_message.from_user,
|
||||
)
|
||||
)
|
||||
text += f" {other_name}"
|
||||
else:
|
||||
text += "Some unknown ghost"
|
||||
@ -192,12 +215,16 @@ def new_bold_string_entities(text: str) -> Tuple[str, List[MessageEntity]]:
|
||||
return append_bold_string("", text, [])
|
||||
|
||||
|
||||
def append_bold_string(text: str, append_text: str, entities: List[MessageEntity]) -> Tuple[str, List[MessageEntity]]:
|
||||
entities.append(MessageEntity(
|
||||
type=MessageEntityType.BOLD,
|
||||
offset=count_offset(text),
|
||||
length=count_offset(append_text)
|
||||
))
|
||||
def append_bold_string(
|
||||
text: str, append_text: str, entities: List[MessageEntity]
|
||||
) -> Tuple[str, List[MessageEntity]]:
|
||||
entities.append(
|
||||
MessageEntity(
|
||||
type=MessageEntityType.BOLD,
|
||||
offset=count_offset(text),
|
||||
length=count_offset(append_text),
|
||||
)
|
||||
)
|
||||
text += append_text
|
||||
return text, entities
|
||||
|
||||
@ -207,7 +234,13 @@ async def gen_reaction_list(emojis, bot: Client):
|
||||
reaction_list = []
|
||||
if not me.is_premium: # Remove custom emojis if not premium (will it happen?)
|
||||
emojis = [x for x in emojis if type(x) is not int]
|
||||
emojis = reduce(lambda x, y: x if y in x else x + [y], [[], ] + emojis) # Remove replicated
|
||||
emojis = reduce(
|
||||
lambda x, y: x if y in x else x + [y],
|
||||
[
|
||||
[],
|
||||
]
|
||||
+ emojis,
|
||||
) # Remove replicated
|
||||
for emoji in emojis:
|
||||
if type(emoji) is int:
|
||||
reaction_list.append(ReactionCustomEmoji(document_id=emoji))
|
||||
@ -216,12 +249,14 @@ async def gen_reaction_list(emojis, bot: Client):
|
||||
return reaction_list
|
||||
|
||||
|
||||
def append_config(text: str, entities: List[MessageEntity]) -> Tuple[str, List[MessageEntity]]:
|
||||
def append_config(
|
||||
text: str, entities: List[MessageEntity]
|
||||
) -> Tuple[str, List[MessageEntity]]:
|
||||
entities.append(
|
||||
MessageEntity(
|
||||
type=MessageEntityType.BOLD,
|
||||
offset=count_offset(text),
|
||||
length=len(f"\nKeep log: \n {cached_sqlite['trace.config.keep_log']}")
|
||||
length=len(f"\nKeep log: \n {cached_sqlite['trace.config.keep_log']}"),
|
||||
)
|
||||
)
|
||||
text += f"\nKeep log: \n {cached_sqlite['trace.config.keep_log']}"
|
||||
@ -230,29 +265,31 @@ def append_config(text: str, entities: List[MessageEntity]) -> Tuple[str, List[M
|
||||
MessageEntity(
|
||||
type=MessageEntityType.BOLD,
|
||||
offset=count_offset(text),
|
||||
length=len(f"\nUse big : \n {cached_sqlite['trace.config.keep_log']}")
|
||||
length=len(f"\nUse big : \n {cached_sqlite['trace.config.keep_log']}"),
|
||||
)
|
||||
)
|
||||
text += f"\nUse big : \n {cached_sqlite['trace.config.keep_log']}"
|
||||
return text, entities
|
||||
|
||||
|
||||
@listener(command="trace",
|
||||
need_admin=True,
|
||||
diagnostics=False,
|
||||
description=USAGE)
|
||||
@listener(command="trace", need_admin=True, diagnostics=False, description=USAGE)
|
||||
async def trace(bot: Client, message: Message):
|
||||
'''
|
||||
"""
|
||||
# For debug use
|
||||
if len(message.parameter) and message.parameter[0] == "magicword":
|
||||
return await message.edit(str(message))
|
||||
'''
|
||||
"""
|
||||
if len(message.parameter) == 0: # Either untrace someone or throw error
|
||||
if message.reply_to_message is None or message.reply_to_message.from_user is None:
|
||||
if (
|
||||
message.reply_to_message is None
|
||||
or message.reply_to_message.from_user is None
|
||||
):
|
||||
return await print_usage(message)
|
||||
other_id = message.reply_to_message.from_user.id
|
||||
if not cached_sqlite.get(f"trace.user_id.{other_id}", None):
|
||||
return await edit_and_delete(message, "This user is not in the traced list.")
|
||||
return await edit_and_delete(
|
||||
message, "This user is not in the traced list."
|
||||
)
|
||||
prev_emojis = cached_sqlite.get(f"trace.user_id.{other_id}", None)
|
||||
|
||||
del sqlite[f"trace.user_id.{other_id}"]
|
||||
@ -260,9 +297,13 @@ async def trace(bot: Client, message: Message):
|
||||
|
||||
text, entities = new_bold_string_entities("Successfully untraced: \n")
|
||||
other_name, other_username = get_name_and_username_from_message(message)
|
||||
text, entities = append_username_to_text(text, other_name, other_username, entities, message)
|
||||
text, entities = append_username_to_text(
|
||||
text, other_name, other_username, entities, message
|
||||
)
|
||||
text, entities = append_emoji_to_text(text, prev_emojis, entities)
|
||||
return await edit_and_delete(message, text, entities=entities, seconds=5, parse_mode=ParseMode.MARKDOWN)
|
||||
return await edit_and_delete(
|
||||
message, text, entities=entities, seconds=5, parse_mode=ParseMode.MARKDOWN
|
||||
)
|
||||
elif len(message.parameter) == 1:
|
||||
if message.parameter[0] in ["status", "clean"]: # Get all traced info
|
||||
traced_uids = await get_all_traced(bot)
|
||||
@ -280,49 +321,79 @@ async def trace(bot: Client, message: Message):
|
||||
other_name += traced_uids[traced_uid]["user"].last_name
|
||||
other_username = traced_uids[traced_uid]["user"].username
|
||||
|
||||
text, entities = append_username_to_text(text, other_name, other_username, entities, message,
|
||||
traced_uids[traced_uid]["user"])
|
||||
text, entities = append_emoji_to_text(text, traced_uids[traced_uid]["reactions"], entities)
|
||||
text, entities = append_username_to_text(
|
||||
text,
|
||||
other_name,
|
||||
other_username,
|
||||
entities,
|
||||
message,
|
||||
traced_uids[traced_uid]["user"],
|
||||
)
|
||||
text, entities = append_emoji_to_text(
|
||||
text, traced_uids[traced_uid]["reactions"], entities
|
||||
)
|
||||
|
||||
text, entities = append_bold_string(text, "\nTraced keywords: \n", entities)
|
||||
if traced_keywords := cached_sqlite.get("trace.keywordlist", None):
|
||||
for keyword in traced_keywords:
|
||||
reaction_list = cached_sqlite.get(f"trace.keyword.{keyword.encode().hex()}", None)
|
||||
reaction_list = cached_sqlite.get(
|
||||
f"trace.keyword.{keyword.encode().hex()}", None
|
||||
)
|
||||
text += f" {keyword}: "
|
||||
text, entities = append_emoji_to_text(text, reaction_list, entities)
|
||||
if message.parameter[0] == "status":
|
||||
text, entities = append_config(text, entities)
|
||||
if message.parameter[0] == "clean":
|
||||
for (k, v) in cached_sqlite:
|
||||
for k, v in cached_sqlite:
|
||||
if k.startswith("trace."):
|
||||
del cached_sqlite[k]
|
||||
del sqlite[k]
|
||||
return await edit_and_delete(message, text, entities=entities, seconds=5, parse_mode=ParseMode.MARKDOWN)
|
||||
return await edit_and_delete(
|
||||
message,
|
||||
text,
|
||||
entities=entities,
|
||||
seconds=5,
|
||||
parse_mode=ParseMode.MARKDOWN,
|
||||
)
|
||||
elif message.parameter[0] == "resettrace":
|
||||
for (k, v) in cached_sqlite:
|
||||
for k, v in cached_sqlite:
|
||||
if k.startswith("trace."):
|
||||
del cached_sqlite[k]
|
||||
del sqlite[k]
|
||||
return await edit_and_delete(message, "**Database has been reset.**", seconds=5, parse_mode=ParseMode.MARKDOWN)
|
||||
return await edit_and_delete(
|
||||
message,
|
||||
"**Database has been reset.**",
|
||||
seconds=5,
|
||||
parse_mode=ParseMode.MARKDOWN,
|
||||
)
|
||||
else:
|
||||
if emojis := get_emojis_from_message(message):
|
||||
reaction_list = await gen_reaction_list(emojis, bot)
|
||||
if reaction_list:
|
||||
sqlite[f"trace.user_id.{message.reply_to_message.from_user.id}"] = reaction_list
|
||||
cached_sqlite[f"trace.user_id.{message.reply_to_message.from_user.id}"] = reaction_list
|
||||
sqlite[
|
||||
f"trace.user_id.{message.reply_to_message.from_user.id}"
|
||||
] = reaction_list
|
||||
cached_sqlite[
|
||||
f"trace.user_id.{message.reply_to_message.from_user.id}"
|
||||
] = reaction_list
|
||||
await bot.invoke(
|
||||
SendReaction(
|
||||
peer=await bot.resolve_peer(int(message.chat.id)),
|
||||
msg_id=message.reply_to_message_id,
|
||||
reaction=reaction_list,
|
||||
big=cached_sqlite["trace.config.big"]
|
||||
big=cached_sqlite["trace.config.big"],
|
||||
)
|
||||
)
|
||||
text = "Successfully traced: \n"
|
||||
# TODO: Add username
|
||||
text, entities = append_emoji_to_text(text, reaction_list, [])
|
||||
return await edit_and_delete(message, text, entities=entities, seconds=5,
|
||||
parse_mode=ParseMode.MARKDOWN)
|
||||
return await edit_and_delete(
|
||||
message,
|
||||
text,
|
||||
entities=entities,
|
||||
seconds=5,
|
||||
parse_mode=ParseMode.MARKDOWN,
|
||||
)
|
||||
return await edit_and_delete(message, "No valid emojis found!")
|
||||
return await print_usage(message)
|
||||
elif len(message.parameter) == 2: # log t|f; kw del
|
||||
@ -335,7 +406,9 @@ async def trace(bot: Client, message: Message):
|
||||
cached_sqlite["trace.config.keep_log"] = False
|
||||
else:
|
||||
return await print_usage(message)
|
||||
return await message.edit(str(f"**Keep log: \n {cached_sqlite['trace.config.keep_log']}**"))
|
||||
return await message.edit(
|
||||
str(f"**Keep log: \n {cached_sqlite['trace.config.keep_log']}**")
|
||||
)
|
||||
if message.parameter[0] == "big":
|
||||
if message.parameter[1] == "true":
|
||||
sqlite["trace.config.big"] = True
|
||||
@ -345,15 +418,21 @@ async def trace(bot: Client, message: Message):
|
||||
cached_sqlite["trace.config.big"] = False
|
||||
else:
|
||||
return await print_usage(message)
|
||||
return await message.edit(str(f"**Use big : \n {cached_sqlite['trace.config.big']}**"))
|
||||
return await message.edit(
|
||||
str(f"**Use big : \n {cached_sqlite['trace.config.big']}**")
|
||||
)
|
||||
elif message.parameter[1] == "del":
|
||||
keyword = message.parameter[0]
|
||||
keyword_encoded_hex = keyword.encode().hex()
|
||||
keywordlist = cached_sqlite["trace.keywordlist"]
|
||||
if keyword not in keywordlist:
|
||||
return await edit_and_delete(message, f"Keyword \"{keyword}\" is not traced.\n{keywordlist}")
|
||||
return await edit_and_delete(
|
||||
message, f'Keyword "{keyword}" is not traced.\n{keywordlist}'
|
||||
)
|
||||
if not cached_sqlite.get(f"trace.keyword.{keyword_encoded_hex}"):
|
||||
return await edit_and_delete(message, f"Keyword \"{keyword}\" is not traced.")
|
||||
return await edit_and_delete(
|
||||
message, f'Keyword "{keyword}" is not traced.'
|
||||
)
|
||||
|
||||
prev_emojis = cached_sqlite.get(f"trace.keyword.{keyword_encoded_hex}")
|
||||
keywordlist.remove(keyword)
|
||||
@ -362,10 +441,18 @@ async def trace(bot: Client, message: Message):
|
||||
del sqlite[f"trace.keyword.{keyword_encoded_hex}"]
|
||||
del cached_sqlite[f"trace.keyword.{keyword_encoded_hex}"]
|
||||
|
||||
text, entities = new_bold_string_entities("Successfully untraced keyword: \n")
|
||||
text, entities = new_bold_string_entities(
|
||||
"Successfully untraced keyword: \n"
|
||||
)
|
||||
text += f" {keyword}: "
|
||||
text, entities = append_emoji_to_text(text, prev_emojis, entities)
|
||||
return await edit_and_delete(message, text, entities=entities, seconds=5, parse_mode=ParseMode.MARKDOWN)
|
||||
return await edit_and_delete(
|
||||
message,
|
||||
text,
|
||||
entities=entities,
|
||||
seconds=5,
|
||||
parse_mode=ParseMode.MARKDOWN,
|
||||
)
|
||||
else:
|
||||
return await print_usage(message)
|
||||
elif len(message.parameter) == 3:
|
||||
@ -384,10 +471,18 @@ async def trace(bot: Client, message: Message):
|
||||
cached_sqlite["trace.keywordlist"].append(keyword)
|
||||
sqlite["trace.keywordlist"] = cached_sqlite["trace.keywordlist"]
|
||||
|
||||
text, entities = new_bold_string_entities("Successfully traced keyword: \n")
|
||||
text, entities = new_bold_string_entities(
|
||||
"Successfully traced keyword: \n"
|
||||
)
|
||||
text += f" {keyword}: "
|
||||
text, entities = append_emoji_to_text(text, reaction_list, entities)
|
||||
return await edit_and_delete(message, text, entities=entities, seconds=5, parse_mode=ParseMode.MARKDOWN)
|
||||
return await edit_and_delete(
|
||||
message,
|
||||
text,
|
||||
entities=entities,
|
||||
seconds=5,
|
||||
parse_mode=ParseMode.MARKDOWN,
|
||||
)
|
||||
return await edit_and_delete(message, "No valid emojis found!")
|
||||
else:
|
||||
return await print_usage(message)
|
||||
@ -399,14 +494,14 @@ async def trace_user(client: Client, message: Message):
|
||||
return
|
||||
with contextlib.suppress(Exception):
|
||||
if reaction_list := cached_sqlite.get(
|
||||
f"trace.user_id.{message.from_user.id}", None
|
||||
f"trace.user_id.{message.from_user.id}", None
|
||||
):
|
||||
await client.invoke(
|
||||
SendReaction(
|
||||
peer=await client.resolve_peer(int(message.chat.id)),
|
||||
msg_id=message.id,
|
||||
reaction=reaction_list,
|
||||
big=cached_sqlite["trace.config.big"]
|
||||
big=cached_sqlite["trace.config.big"],
|
||||
)
|
||||
)
|
||||
|
||||
@ -421,13 +516,15 @@ async def trace_keyword(client: Client, message: Message):
|
||||
for keyword in keyword_list:
|
||||
if keyword in message.text:
|
||||
if reaction_list := cached_sqlite.get(
|
||||
f"trace.keyword.{keyword.encode().hex()}", None
|
||||
f"trace.keyword.{keyword.encode().hex()}", None
|
||||
):
|
||||
await client.invoke(
|
||||
SendReaction(
|
||||
peer=await client.resolve_peer(int(message.chat.id)),
|
||||
peer=await client.resolve_peer(
|
||||
int(message.chat.id)
|
||||
),
|
||||
msg_id=message.id,
|
||||
reaction=reaction_list,
|
||||
big=cached_sqlite["trace.config.big"]
|
||||
big=cached_sqlite["trace.config.big"],
|
||||
)
|
||||
)
|
||||
|
@ -19,13 +19,17 @@ async def make_zip(source_dir, output_filename):
|
||||
zipf.close()
|
||||
|
||||
|
||||
@listener(command="transfer",
|
||||
description="上传 / 下载文件",
|
||||
parameters="upload [filepath]` 或 `download [filepath]")
|
||||
@listener(
|
||||
command="transfer",
|
||||
description="上传 / 下载文件",
|
||||
parameters="upload [filepath]` 或 `download [filepath]",
|
||||
)
|
||||
async def transfer(bot: Client, message: Message):
|
||||
params = message.parameter
|
||||
if len(params) < 2:
|
||||
message: Message = await message.edit("参数缺失,请使用 `upload [filepath (包括扩展名)]` 或 `download [filepath (包括扩展名)]`")
|
||||
message: Message = await message.edit(
|
||||
"参数缺失,请使用 `upload [filepath (包括扩展名)]` 或 `download [filepath (包括扩展名)]`"
|
||||
)
|
||||
await message.delay_delete(3)
|
||||
return
|
||||
params[1] = " ".join(params[1:])
|
||||
@ -42,7 +46,9 @@ async def transfer(bot: Client, message: Message):
|
||||
token = file_path.split("/")
|
||||
token = token[len(token) - 1]
|
||||
await make_zip(file_path, f"/tmp/{token}.zip")
|
||||
await bot.send_document(chat_id, f"/tmp/{token}.zip", force_document=True)
|
||||
await bot.send_document(
|
||||
chat_id, f"/tmp/{token}.zip", force_document=True
|
||||
)
|
||||
os.remove(f"/tmp/{token}.zip")
|
||||
index += 1
|
||||
message: Message = await message.edit("上传完毕")
|
||||
@ -52,15 +58,17 @@ async def transfer(bot: Client, message: Message):
|
||||
if exists(file_path):
|
||||
message: Message = await message.edit("路径已存在文件")
|
||||
else:
|
||||
message: Message = await message.edit('下载中。。。')
|
||||
message: Message = await message.edit("下载中。。。")
|
||||
try:
|
||||
_file = await reply.download(file_name=file_list[0])
|
||||
except Exception:
|
||||
await message.edit('无法下载此类型的文件。')
|
||||
await message.edit("无法下载此类型的文件。")
|
||||
return
|
||||
message: Message = await message.edit(f"保存成功, 保存路径 `{file_list[0]}`")
|
||||
else:
|
||||
message: Message = await message.edit("未回复消息或回复消息中不包含文件")
|
||||
else:
|
||||
message: Message = await message.edit("未知命令,请使用 `upload [filepath]` 或 `download [filepath]`")
|
||||
message: Message = await message.edit(
|
||||
"未知命令,请使用 `upload [filepath]` 或 `download [filepath]`"
|
||||
)
|
||||
await message.delay_delete(3)
|
||||
|
@ -1,5 +1,11 @@
|
||||
from pyrogram.enums import ChatMemberStatus
|
||||
from pyrogram.errors import ChatAdminRequired, FloodWait, PeerIdInvalid, UsernameInvalid, UserNotParticipant
|
||||
from pyrogram.errors import (
|
||||
ChatAdminRequired,
|
||||
FloodWait,
|
||||
PeerIdInvalid,
|
||||
UsernameInvalid,
|
||||
UserNotParticipant,
|
||||
)
|
||||
from pyrogram.types import Chat
|
||||
|
||||
from pagermaid import bot
|
||||
@ -39,11 +45,13 @@ async def get_uid(chat: Chat, message: Message):
|
||||
return uid, member
|
||||
|
||||
|
||||
@listener(command="unban",
|
||||
description="解除封禁一位用户",
|
||||
need_admin=True,
|
||||
groups_only=True,
|
||||
parameters="[reply|id|username]")
|
||||
@listener(
|
||||
command="unban",
|
||||
description="解除封禁一位用户",
|
||||
need_admin=True,
|
||||
groups_only=True,
|
||||
parameters="[reply|id|username]",
|
||||
)
|
||||
async def unban(client: Client, message: Message):
|
||||
chat = message.chat
|
||||
try:
|
||||
|
@ -35,9 +35,11 @@ def format_time(t):
|
||||
return f"时间:`{unix_to_time(t)}`\n\n时间戳:`{t}`"
|
||||
|
||||
|
||||
@listener(command="unixtime",
|
||||
description="Unix时间戳转换\n参数缺省将当前服务器时间转换为Unix时间戳\n时间格式: `YYYY-MM-DD HH:MM:SS`",
|
||||
parameters="[缺省 / 时间 / Unix时间戳]")
|
||||
@listener(
|
||||
command="unixtime",
|
||||
description="Unix时间戳转换\n参数缺省将当前服务器时间转换为Unix时间戳\n时间格式: `YYYY-MM-DD HH:MM:SS`",
|
||||
parameters="[缺省 / 时间 / Unix时间戳]",
|
||||
)
|
||||
async def unix_time(message: Message):
|
||||
try:
|
||||
return await message.edit(format_time(message.arguments))
|
||||
|
@ -9,7 +9,9 @@ def update_des():
|
||||
list_json = json.load(f)
|
||||
for plugin in list_json["list"]:
|
||||
if os.path.exists(f"{start}{plugin['name']}{os.sep}DES.md"):
|
||||
with open(f"{start}{plugin['name']}{os.sep}DES.md", "r", encoding="utf8") as f:
|
||||
with open(
|
||||
f"{start}{plugin['name']}{os.sep}DES.md", "r", encoding="utf8"
|
||||
) as f:
|
||||
plugin["des"] = f.read().strip()
|
||||
with open(f"{start}list.json", "w", encoding="utf8") as f:
|
||||
json.dump(list_json, f, ensure_ascii=False, indent=4)
|
||||
|
@ -5,20 +5,22 @@ from httpx import get
|
||||
|
||||
from update_des import update_des
|
||||
|
||||
main = get("https://api.github.com/repos/TeamPGM/PagerMaid_Plugins_Pyro/commits/v2").json()
|
||||
main = get(
|
||||
"https://api.github.com/repos/TeamPGM/PagerMaid_Plugins_Pyro/commits/v2"
|
||||
).json()
|
||||
plugins = []
|
||||
alpha_plugins = []
|
||||
list_json_start = ["", "alpha/"]
|
||||
for file in main["files"]:
|
||||
if "list.json" in file["filename"]:
|
||||
print(main['sha'] + " no need!")
|
||||
print(main["sha"] + " no need!")
|
||||
exit()
|
||||
if "/main.py" in file["filename"]:
|
||||
if file["filename"].startswith("alpha"):
|
||||
alpha_plugins.append(file["filename"].split("/")[1])
|
||||
else:
|
||||
plugins.append(file["filename"].split("/")[0])
|
||||
delete = bool(main['commit']['message'].startswith("Delete"))
|
||||
delete = bool(main["commit"]["message"].startswith("Delete"))
|
||||
|
||||
|
||||
for idx, plugins_ in enumerate([plugins, alpha_plugins]):
|
||||
@ -31,18 +33,20 @@ for idx, plugins_ in enumerate([plugins, alpha_plugins]):
|
||||
exist = True
|
||||
old_version = decimal.Decimal(plug_dict["version"])
|
||||
plug_dict["version"] = str(old_version + decimal.Decimal("0.01"))
|
||||
plug_dict["size"] = f"{os.path.getsize(f'{list_json_start[idx]}{plugin}{os.sep}main.py') / 1000} kb"
|
||||
plug_dict[
|
||||
"size"
|
||||
] = f"{os.path.getsize(f'{list_json_start[idx]}{plugin}{os.sep}main.py') / 1000} kb"
|
||||
if delete:
|
||||
list_json["list"].remove(plug_dict)
|
||||
break
|
||||
if not exist:
|
||||
short_des = main['commit']['message'].split("\nCo-authored-by")[0].strip()
|
||||
short_des = main["commit"]["message"].split("\nCo-authored-by")[0].strip()
|
||||
list_json["list"].append(
|
||||
{
|
||||
"name": plugin,
|
||||
"version": "1.0",
|
||||
"section": "chat",
|
||||
"maintainer": main['commit']['author']['name'],
|
||||
"maintainer": main["commit"]["author"]["name"],
|
||||
"size": f"{os.path.getsize(f'{list_json_start[idx]}{plugin}{os.sep}main.py') / 1000} kb",
|
||||
"supported": True,
|
||||
"des_short": short_des,
|
||||
@ -54,4 +58,4 @@ for idx, plugins_ in enumerate([plugins, alpha_plugins]):
|
||||
|
||||
update_des()
|
||||
|
||||
print(main['sha'] + " ok!")
|
||||
print(main["sha"] + " ok!")
|
||||
|
@ -3,17 +3,19 @@ from pagermaid.enums import AsyncClient, Message
|
||||
from pagermaid.utils import alias_command
|
||||
|
||||
|
||||
@listener(command="urbandictionary",
|
||||
parameters="[单词]",
|
||||
description="解释英语俚语词汇")
|
||||
@listener(command="urbandictionary", parameters="[单词]", description="解释英语俚语词汇")
|
||||
async def get_urban_mean(message: Message, httpx: AsyncClient):
|
||||
""" To fetch meaning of the given word from urban dictionary. """
|
||||
"""To fetch meaning of the given word from urban dictionary."""
|
||||
word = message.arguments
|
||||
if not word:
|
||||
return await message.edit(f"[urbandictionary] 使用方法:`,{alias_command('urbandictionary')} <单词>`")
|
||||
return await message.edit(
|
||||
f"[urbandictionary] 使用方法:`,{alias_command('urbandictionary')} <单词>`"
|
||||
)
|
||||
|
||||
try:
|
||||
response = (await httpx.get(f"https://api.urbandictionary.com/v0/define?term={word}")).json()
|
||||
response = (
|
||||
await httpx.get(f"https://api.urbandictionary.com/v0/define?term={word}")
|
||||
).json()
|
||||
except Exception as e:
|
||||
return await message.edit(f"[urbandictionary] API 接口无法访问:{e}")
|
||||
|
||||
@ -23,9 +25,11 @@ async def get_urban_mean(message: Message, httpx: AsyncClient):
|
||||
word = response["list"][0]["word"]
|
||||
definition = response["list"][0]["definition"]
|
||||
example = response["list"][0]["example"]
|
||||
result = f"**Word :** __{word}__\n\n" \
|
||||
f"**Meaning:**\n" \
|
||||
f"`{definition}`\n\n" \
|
||||
f"**Example:**\n" \
|
||||
f"`{example}`"
|
||||
result = (
|
||||
f"**Word :** __{word}__\n\n"
|
||||
f"**Meaning:**\n"
|
||||
f"`{definition}`\n\n"
|
||||
f"**Example:**\n"
|
||||
f"`{example}`"
|
||||
)
|
||||
await message.edit(result)
|
||||
|
@ -6,11 +6,13 @@ from pagermaid.listener import listener
|
||||
from pagermaid.enums import Client, Message
|
||||
|
||||
|
||||
@listener(command="vctools",
|
||||
admins_only=True,
|
||||
groups_only=True,
|
||||
parameters="[开启/关闭]",
|
||||
description="开启/关闭群组直播间")
|
||||
@listener(
|
||||
command="vctools",
|
||||
admins_only=True,
|
||||
groups_only=True,
|
||||
parameters="[开启/关闭]",
|
||||
description="开启/关闭群组直播间",
|
||||
)
|
||||
async def vctools(bot: Client, message: Message):
|
||||
if not message.arguments:
|
||||
return await message.reply("请输入 `开启/关闭`")
|
||||
@ -27,7 +29,11 @@ async def vctools(bot: Client, message: Message):
|
||||
return await message.reply("需要管理员权限")
|
||||
elif message.arguments == "关闭":
|
||||
try:
|
||||
full_chat = (await bot.invoke(GetFullChannel(channel=await bot.resolve_peer(message.chat.id)))).full_chat
|
||||
full_chat = (
|
||||
await bot.invoke(
|
||||
GetFullChannel(channel=await bot.resolve_peer(message.chat.id))
|
||||
)
|
||||
).full_chat
|
||||
if full_chat.call:
|
||||
await bot.invoke(DiscardGroupCall(call=full_chat.call))
|
||||
return await message.edit("已关闭群组直播间")
|
||||
|
82
vip/main.py
82
vip/main.py
@ -4,9 +4,7 @@ from pagermaid.listener import listener
|
||||
from pagermaid.enums import Client, Message
|
||||
|
||||
|
||||
@listener(command="duckduckgo",
|
||||
description="Duckduckgo 搜索",
|
||||
parameters="[query]")
|
||||
@listener(command="duckduckgo", description="Duckduckgo 搜索", parameters="[query]")
|
||||
async def duckduckgo(client: Client, message: Message):
|
||||
text = message.arguments
|
||||
if not text:
|
||||
@ -17,9 +15,7 @@ async def duckduckgo(client: Client, message: Message):
|
||||
await message.edit(answer.text.html, parse_mode=ParseMode.HTML)
|
||||
|
||||
|
||||
@listener(command="caiyun",
|
||||
description="彩云翻译",
|
||||
parameters="[query]")
|
||||
@listener(command="caiyun", description="彩云翻译", parameters="[query]")
|
||||
async def caiyun_translate(client: Client, message: Message):
|
||||
text = message.arguments
|
||||
if not text:
|
||||
@ -30,9 +26,7 @@ async def caiyun_translate(client: Client, message: Message):
|
||||
await message.edit(answer.text)
|
||||
|
||||
|
||||
@listener(command="weather",
|
||||
description="使用彩云天气 api 查询国内实时天气。",
|
||||
parameters="[位置]")
|
||||
@listener(command="weather", description="使用彩云天气 api 查询国内实时天气。", parameters="[位置]")
|
||||
async def weather(client: Client, message: Message):
|
||||
text = message.arguments
|
||||
if not text:
|
||||
@ -43,9 +37,9 @@ async def weather(client: Client, message: Message):
|
||||
await message.edit(answer.text)
|
||||
|
||||
|
||||
@listener(command="weather_pic",
|
||||
description="使用彩云天气 api 查询国内实时天气,但是显示图片。",
|
||||
parameters="[位置]")
|
||||
@listener(
|
||||
command="weather_pic", description="使用彩云天气 api 查询国内实时天气,但是显示图片。", parameters="[位置]"
|
||||
)
|
||||
async def weather_pic(client: Client, message: Message):
|
||||
text = message.arguments
|
||||
if not text:
|
||||
@ -55,14 +49,15 @@ async def weather_pic(client: Client, message: Message):
|
||||
await conv.mark_as_read()
|
||||
await answer.copy(
|
||||
message.chat.id,
|
||||
reply_to_message_id=message.reply_to_message_id or message.reply_to_top_message_id
|
||||
reply_to_message_id=message.reply_to_message_id
|
||||
or message.reply_to_top_message_id,
|
||||
)
|
||||
await message.safe_delete()
|
||||
|
||||
|
||||
@listener(command="weather_he",
|
||||
description="使用和风天气 api 查询国内实时天气,但是显示图片。",
|
||||
parameters="[位置]")
|
||||
@listener(
|
||||
command="weather_he", description="使用和风天气 api 查询国内实时天气,但是显示图片。", parameters="[位置]"
|
||||
)
|
||||
async def weather_he(client: Client, message: Message):
|
||||
text = message.arguments
|
||||
if not text:
|
||||
@ -72,7 +67,8 @@ async def weather_he(client: Client, message: Message):
|
||||
await conv.mark_as_read()
|
||||
await answer.copy(
|
||||
message.chat.id,
|
||||
reply_to_message_id=message.reply_to_message_id or message.reply_to_top_message_id
|
||||
reply_to_message_id=message.reply_to_message_id
|
||||
or message.reply_to_top_message_id,
|
||||
)
|
||||
await message.safe_delete()
|
||||
|
||||
@ -86,51 +82,58 @@ async def az_tts(client: Client, message: Message, mode: str):
|
||||
await conv.mark_as_read()
|
||||
await answer.copy(
|
||||
message.chat.id,
|
||||
reply_to_message_id=message.reply_to_message_id or message.reply_to_top_message_id
|
||||
reply_to_message_id=message.reply_to_message_id
|
||||
or message.reply_to_top_message_id,
|
||||
)
|
||||
await message.safe_delete()
|
||||
|
||||
|
||||
@listener(command="tts_nan",
|
||||
description="通过 Azure 文本到语音 基于字符串生成 简体男声 语音消息。",
|
||||
parameters="[字符串]")
|
||||
@listener(
|
||||
command="tts_nan",
|
||||
description="通过 Azure 文本到语音 基于字符串生成 简体男声 语音消息。",
|
||||
parameters="[字符串]",
|
||||
)
|
||||
async def az_tts_nan(client: Client, message: Message):
|
||||
await az_tts(client, message, "")
|
||||
|
||||
|
||||
@listener(command="tts_nv",
|
||||
description="通过 Azure 文本到语音 基于字符串生成 简体女声 语音消息。",
|
||||
parameters="[字符串]")
|
||||
@listener(
|
||||
command="tts_nv",
|
||||
description="通过 Azure 文本到语音 基于字符串生成 简体女声 语音消息。",
|
||||
parameters="[字符串]",
|
||||
)
|
||||
async def az_tts_nv(client: Client, message: Message):
|
||||
await az_tts(client, message, "nv")
|
||||
|
||||
|
||||
@listener(command="tts_tw",
|
||||
description="通过 Azure 文本到语音 基于字符串生成 繁体男声 语音消息。",
|
||||
parameters="[字符串]")
|
||||
@listener(
|
||||
command="tts_tw",
|
||||
description="通过 Azure 文本到语音 基于字符串生成 繁体男声 语音消息。",
|
||||
parameters="[字符串]",
|
||||
)
|
||||
async def az_tts_tw(client: Client, message: Message):
|
||||
await az_tts(client, message, "tw")
|
||||
|
||||
|
||||
@listener(command="tts_ne",
|
||||
description="通过 Azure 文本到语音 基于字符串生成 简体新闻男声 语音消息。",
|
||||
parameters="[字符串]")
|
||||
@listener(
|
||||
command="tts_ne",
|
||||
description="通过 Azure 文本到语音 基于字符串生成 简体新闻男声 语音消息。",
|
||||
parameters="[字符串]",
|
||||
)
|
||||
async def az_tts_ne(client: Client, message: Message):
|
||||
await az_tts(client, message, "ne")
|
||||
|
||||
|
||||
@listener(command="tts_en",
|
||||
description="通过 Azure 文本到语音 基于字符串生成 英文男声 语音消息。",
|
||||
parameters="[字符串]")
|
||||
@listener(
|
||||
command="tts_en",
|
||||
description="通过 Azure 文本到语音 基于字符串生成 英文男声 语音消息。",
|
||||
parameters="[字符串]",
|
||||
)
|
||||
async def az_tts_en(client: Client, message: Message):
|
||||
await az_tts(client, message, "en")
|
||||
|
||||
|
||||
@listener(
|
||||
command="draw",
|
||||
description="使用 AI 进行绘图。",
|
||||
parameters="prompt"
|
||||
)
|
||||
@listener(command="draw", description="使用 AI 进行绘图。", parameters="prompt")
|
||||
async def draw_photo(client: Client, message: Message):
|
||||
text = message.obtain_message()
|
||||
if not text:
|
||||
@ -140,6 +143,7 @@ async def draw_photo(client: Client, message: Message):
|
||||
await conv.mark_as_read()
|
||||
await answer.copy(
|
||||
message.chat.id,
|
||||
reply_to_message_id=message.reply_to_message_id or message.reply_to_top_message_id
|
||||
reply_to_message_id=message.reply_to_message_id
|
||||
or message.reply_to_top_message_id,
|
||||
)
|
||||
await message.safe_delete()
|
||||
|
@ -26,26 +26,44 @@ icons = {
|
||||
|
||||
|
||||
def timestamp_to_time(timestamp, timeZoneShift):
|
||||
timeArray = datetime.datetime.utcfromtimestamp(timestamp) + datetime.timedelta(seconds=timeZoneShift)
|
||||
timeArray = datetime.datetime.utcfromtimestamp(timestamp) + datetime.timedelta(
|
||||
seconds=timeZoneShift
|
||||
)
|
||||
return timeArray.strftime("%H:%M")
|
||||
|
||||
|
||||
def calcWindDirection(windDirection):
|
||||
dirs = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW']
|
||||
ix = round(windDirection / (360. / len(dirs)))
|
||||
dirs = [
|
||||
"N",
|
||||
"NNE",
|
||||
"NE",
|
||||
"ENE",
|
||||
"E",
|
||||
"ESE",
|
||||
"SE",
|
||||
"SSE",
|
||||
"S",
|
||||
"SSW",
|
||||
"SW",
|
||||
"WSW",
|
||||
"W",
|
||||
"WNW",
|
||||
"NW",
|
||||
"NNW",
|
||||
]
|
||||
ix = round(windDirection / (360.0 / len(dirs)))
|
||||
return dirs[ix % len(dirs)]
|
||||
|
||||
|
||||
@listener(command="weather",
|
||||
description="查询天气",
|
||||
parameters="[城市]")
|
||||
@listener(command="weather", description="查询天气", parameters="[城市]")
|
||||
async def weather(_: Client, message: Message):
|
||||
if not message.arguments:
|
||||
return await message.edit("出错了呜呜呜 ~ 无效的参数。")
|
||||
try:
|
||||
req = await client.get(
|
||||
"http://api.openweathermap.org/data/2.5/weather?appid=973e8a21e358ee9d30b47528b43a8746&units=metric&lang"
|
||||
"=zh_cn&q=" + message.arguments)
|
||||
"=zh_cn&q=" + message.arguments
|
||||
)
|
||||
if req.status_code == 200:
|
||||
data = req.json()
|
||||
cityName = f'{data["name"]}, {data["sys"]["country"]}'
|
||||
|
@ -3,9 +3,7 @@ from pagermaid.enums import Message, AsyncClient
|
||||
from pagermaid.single_utils import safe_remove
|
||||
|
||||
|
||||
@listener(command="weather_lite",
|
||||
description="查询天气",
|
||||
parameters="[城市]")
|
||||
@listener(command="weather_lite", description="查询天气", parameters="[城市]")
|
||||
async def weather_lite(request: AsyncClient, message: Message):
|
||||
if not message.arguments:
|
||||
return await message.edit("请输入城市名称")
|
||||
@ -19,8 +17,9 @@ async def weather_lite(request: AsyncClient, message: Message):
|
||||
f.write(data.content)
|
||||
await message.reply_photo(
|
||||
"weather.png",
|
||||
reply_to_message_id=message.reply_to_message_id or message.reply_to_top_message_id,
|
||||
quote=False
|
||||
reply_to_message_id=message.reply_to_message_id
|
||||
or message.reply_to_top_message_id,
|
||||
quote=False,
|
||||
)
|
||||
await message.safe_delete()
|
||||
safe_remove("weather.png")
|
||||
|
@ -44,7 +44,9 @@ class WebSocket:
|
||||
if self.is_connected():
|
||||
await self.disconnect()
|
||||
if self.uri:
|
||||
self.ws = self.client.ws_connect(self.uri, autoclose=False, autoping=False, timeout=5)
|
||||
self.ws = self.client.ws_connect(
|
||||
self.uri, autoclose=False, autoping=False, timeout=5
|
||||
)
|
||||
self.connection = await self.ws._coro
|
||||
|
||||
async def disconnect(self):
|
||||
@ -105,8 +107,8 @@ class WebSocket:
|
||||
data = json.loads(text)
|
||||
except Exception:
|
||||
return
|
||||
action = data.get('action', None)
|
||||
action_data = data.get('data', None)
|
||||
action = data.get("action", None)
|
||||
action_data = data.get("data", None)
|
||||
|
||||
bot_action = getattr(bot, action)
|
||||
if bot_action and action_data:
|
||||
@ -136,8 +138,10 @@ async def websocket_to_connect(message: Message):
|
||||
if message.arguments:
|
||||
uri = message.arguments
|
||||
if not uri.startswith("ws://"):
|
||||
return await message.edit("[ws] 请输入正确的 uri ,例如:ws://127.0.0.1:1080/ws\n\n"
|
||||
"**请一定使用强路径并且连接到可信 ws ,ws 发送方能够对您的账户执行任意操作!!!**")
|
||||
return await message.edit(
|
||||
"[ws] 请输入正确的 uri ,例如:ws://127.0.0.1:1080/ws\n\n"
|
||||
"**请一定使用强路径并且连接到可信 ws ,ws 发送方能够对您的账户执行任意操作!!!**"
|
||||
)
|
||||
msg: Message = await message.edit("[ws] Websocket 尝试连接中...")
|
||||
try:
|
||||
if ws.is_connected():
|
||||
@ -151,8 +155,10 @@ async def websocket_to_connect(message: Message):
|
||||
bot.loop.create_task(ws.keep_alive())
|
||||
elif not ws.is_connected():
|
||||
if not ws.database_have_uri():
|
||||
return await message.edit("[ws] ws 未链接,请输入正确的 uri ,例如:ws://127.0.0.1:1080/ws\n\n"
|
||||
"**请一定使用强路径并且连接到可信 ws ,ws 发送方能够对您的账户执行任意操作!!!**")
|
||||
return await message.edit(
|
||||
"[ws] ws 未链接,请输入正确的 uri ,例如:ws://127.0.0.1:1080/ws\n\n"
|
||||
"**请一定使用强路径并且连接到可信 ws ,ws 发送方能够对您的账户执行任意操作!!!**"
|
||||
)
|
||||
ws.restore_uri()
|
||||
msg: Message = await message.edit("[ws] Websocket 尝试连接中...")
|
||||
try:
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user