mirror of
https://github.com/TeamPGM/PagerMaid_Plugins_Pyro.git
synced 2024-11-16 05:45:24 +00:00
批量修改帮助参数
This commit is contained in:
parent
a005580011
commit
0597c5aa13
@ -52,7 +52,7 @@ class Game:
|
||||
@listener(command="1A2B",
|
||||
groups_only=True,
|
||||
description="Play a game of 1A2B",
|
||||
parameters="<start/stop/answer>")
|
||||
parameters="[start/stop/answer]")
|
||||
async def play_game_1a2b(message: Message):
|
||||
if not message.arguments:
|
||||
return await message.edit("Please specify a command.")
|
||||
|
@ -25,7 +25,7 @@ def del_aff() -> None:
|
||||
|
||||
@listener(command="aff",
|
||||
description="在别人要打算买机场的时候光速发出自己的aff信息(请尽量配合短链接)",
|
||||
parameters="<save|remove> (可选,回复一条消息,用于保存|删除aff信息)")
|
||||
parameters="[save|remove] (可选,回复一条消息,用于保存|删除aff信息)")
|
||||
async def aff(message: Message):
|
||||
if not message.parameter:
|
||||
msg, web_page = get_aff()
|
||||
|
@ -96,7 +96,7 @@ async def alicloud_startup() -> None:
|
||||
|
||||
@listener(command="alicloud",
|
||||
description="获取阿里云盘掉落福利信息",
|
||||
parameters="<订阅/退订>")
|
||||
parameters="[订阅/退订]")
|
||||
async def set_alicloud_notice(message: Message):
|
||||
if not message.arguments:
|
||||
try:
|
||||
|
@ -7,7 +7,7 @@ from pagermaid.enums import Client, Message
|
||||
@listener(command="atadmins",
|
||||
description="一键 AT 本群管理员(仅在群组中有效)",
|
||||
groups_only=True,
|
||||
parameters="<要说的话>")
|
||||
parameters="[要说的话]")
|
||||
async def at_admins(client: Client, message: Message):
|
||||
admins = []
|
||||
async for m in client.get_chat_members(message.chat.id, filter=ChatMembersFilter.ADMINISTRATORS):
|
||||
|
@ -6,7 +6,7 @@ from base64 import b64decode, b64encode
|
||||
|
||||
@listener(command="b64e",
|
||||
description="将文本转为Base64",
|
||||
parameters="<text>")
|
||||
parameters="[text]")
|
||||
async def b64e(_: Client, message: Message):
|
||||
msg = message.arguments
|
||||
if not msg:
|
||||
@ -18,7 +18,7 @@ async def b64e(_: Client, message: Message):
|
||||
|
||||
@listener(command="b64d",
|
||||
description="将Base64转为文本",
|
||||
parameters="<text>")
|
||||
parameters="[text]")
|
||||
async def b64d(_: Client, message: Message):
|
||||
msg = message.arguments
|
||||
if not msg:
|
||||
|
@ -46,7 +46,7 @@ def init() -> None:
|
||||
|
||||
@listener(command="bc",
|
||||
description="coins",
|
||||
parameters="<num> <coin1> <coin2>")
|
||||
parameters="[num] [coin1] [coin2]")
|
||||
async def coin(_: Client, message: Message) -> None:
|
||||
""" coin change """
|
||||
init()
|
||||
|
@ -11,7 +11,7 @@ import requests
|
||||
|
||||
@listener(command="bin",
|
||||
description="查询信用卡信息",
|
||||
parameters="<bin(4到8位数字)>")
|
||||
parameters="[bin(4到8位数字)]")
|
||||
async def card(_: Client, message: Message):
|
||||
await message.edit('正在查询中...')
|
||||
try:
|
||||
|
@ -5,7 +5,7 @@ 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="<基本运算>")
|
||||
parameters="[基本运算]")
|
||||
async def cal(_: Client, message: Message):
|
||||
command = message.arguments
|
||||
if not command:
|
||||
@ -23,7 +23,7 @@ async def cal(_: Client, message: Message):
|
||||
|
||||
@listener(command="con",
|
||||
description="换算\n示例:\n`,con 2 99`将99转换为2进制",
|
||||
parameters="<进制(数字)> <数值>")
|
||||
parameters="[进制(数字)] [数值]")
|
||||
async def con(_: Client, message: Message):
|
||||
command = message.arguments.split()
|
||||
if not command:
|
||||
|
@ -27,7 +27,7 @@ async def delete_private_chat(cid: int):
|
||||
@listener(command="clear_private_chat",
|
||||
need_admin=True,
|
||||
description="通过指定关键词清除私聊",
|
||||
parameters="<关键词>")
|
||||
parameters="[关键词]")
|
||||
async def clear_private_chat(message: Message):
|
||||
""" 通过指定关键词清除私聊记录 """
|
||||
if not message.arguments:
|
||||
|
@ -101,7 +101,7 @@ NewsBot = NewsData()
|
||||
|
||||
@listener(command="covid",
|
||||
description="获取新冠疫情信息。",
|
||||
parameters="<地区>")
|
||||
parameters="[地区]")
|
||||
async def covid_info(message: Message):
|
||||
global POLICY_ID, NewsBot
|
||||
if not POLICY_ID:
|
||||
|
@ -11,7 +11,7 @@ from pagermaid.utils import alias_command
|
||||
groups_only=True,
|
||||
need_admin=True,
|
||||
description="删除群内所有消息。(非群组管理员只删除自己的消息)",
|
||||
parameters="<true>")
|
||||
parameters="[true]")
|
||||
async def da(bot: Client, message: Message):
|
||||
if message.arguments != "true":
|
||||
return await message.edit(f"[da] 呜呜呜,请执行 `,{alias_command('da')} true` 来删除所有消息。")
|
||||
|
@ -12,7 +12,7 @@ dictionary_data = PyDictionary()
|
||||
|
||||
|
||||
@listener(command="dictionary",
|
||||
parameters="<单词>",
|
||||
parameters="[单词]",
|
||||
description="查询英语单词的意思")
|
||||
async def get_word_mean(message: Message):
|
||||
""" Look up a word in the dictionary. """
|
||||
|
@ -198,7 +198,7 @@ async def downloadFileByIds(ids, context):
|
||||
"当第二个参数是/开头时,在/后面加url则从url下载配置文件保存到本地,如果就一个/,则直接更新配置文件,删除则是/delete;或者/后面加模版id可以手动更新指定模版配置\n\n"
|
||||
"当第二个参数是-开头时,在-后面加上模版id,即可设置默认模版-eat直接使用该模版,删除默认模版是-eat -\n\n"
|
||||
"当第二个参数是!或者!开头时,列出当前可用模版",
|
||||
parameters="<username/uid> [随意内容]")
|
||||
parameters="[username/uid] [随意内容]")
|
||||
async def eat(client_: Client, context: Message):
|
||||
if len(context.parameter) > 2:
|
||||
await context.edit("出错了呜呜呜 ~ 无效的参数。")
|
||||
|
@ -86,7 +86,7 @@ async def fa_dian_refresher_data():
|
||||
|
||||
@listener(command="fadian",
|
||||
description="快速对着指定人物发电",
|
||||
parameters="<query>")
|
||||
parameters="[query]")
|
||||
async def fa_dian_process(message: Message):
|
||||
if fa_dian.data.get("date") == 0:
|
||||
await fa_dian.fetch()
|
||||
|
@ -28,7 +28,7 @@ async def post(host):
|
||||
|
||||
|
||||
@listener(command="gfw",
|
||||
parameters="<text>",
|
||||
parameters="[text]",
|
||||
description="查询是否被墙")
|
||||
async def gfw(message: Message):
|
||||
text = None
|
||||
|
@ -10,7 +10,7 @@ from magic_google import MagicGoogle
|
||||
|
||||
@listener(command="google",
|
||||
description=lang('google_des'),
|
||||
parameters="<query>")
|
||||
parameters="[query]")
|
||||
async def google(message: Message):
|
||||
""" Searches Google for a string. """
|
||||
query = message.arguments
|
||||
|
@ -4,7 +4,7 @@ from pagermaid.enums import Client, Message, AsyncClient
|
||||
from pagermaid.listener import listener
|
||||
|
||||
|
||||
@listener(command="httpcat", description="获取 HTTP 状态码的图片。", parameters="<http 状态码>")
|
||||
@listener(command="httpcat", description="获取 HTTP 状态码的图片。", parameters="[http 状态码]")
|
||||
async def httpcat(client: Client, message: Message, request: AsyncClient):
|
||||
try:
|
||||
code = int(message.arguments)
|
||||
|
@ -56,7 +56,7 @@ async def icp_search(domain):
|
||||
|
||||
|
||||
@listener(command="icp",
|
||||
parameters="<域名>",
|
||||
parameters="[域名]",
|
||||
description="查询域名是否已备案")
|
||||
async def icp_bei_an(message: Message):
|
||||
url = None
|
||||
|
@ -36,7 +36,7 @@ async def get_ip_info(url: str) -> str:
|
||||
|
||||
@listener(command="ip",
|
||||
description="IPINFO (或者回复一句话)",
|
||||
parameters="<ip/域名>")
|
||||
parameters="[ip/域名]")
|
||||
async def ipinfo(message: Message):
|
||||
reply = message.reply_to_message
|
||||
message: Message = await message.edit('正在查询中...')
|
||||
|
@ -90,7 +90,7 @@ class JIKIPedia:
|
||||
|
||||
|
||||
@listener(command="jikipedia",
|
||||
parameters="<关键词>",
|
||||
parameters="[关键词]",
|
||||
description="梗查询")
|
||||
async def jikipedia(message: Message):
|
||||
if not message.arguments:
|
||||
|
@ -102,7 +102,7 @@ async def create_lottery(chat_id: int, num: int, win: int, title: str, keyword:
|
||||
@listener(command="lottery",
|
||||
groups_only=True,
|
||||
need_admin=True,
|
||||
parameters="<奖品数/人数> <关键词> <标题> / 强制开奖",
|
||||
parameters="[奖品数/人数] [关键词] [标题] / 强制开奖",
|
||||
description=f"举行抽奖活动\n\n例如:,{alias_command('lottery')} 1/10 测试 测试")
|
||||
async def lottery(message: Message):
|
||||
if not message.arguments:
|
||||
|
@ -74,7 +74,7 @@ async def netease_id(music_id: str, message: Message):
|
||||
|
||||
@listener(command="netease",
|
||||
description="Netease Music",
|
||||
parameters="<query>",)
|
||||
parameters="[query]",)
|
||||
async def netease_music(message: Message):
|
||||
if not message.arguments:
|
||||
return await message.edit(Netease_Help_Msg)
|
||||
|
@ -12,7 +12,7 @@ no_mentions_sub = Sub("no_mentions")
|
||||
|
||||
@listener(command="no_mentions",
|
||||
description="自动消除某个对话的 @ 提醒",
|
||||
parameters="<true|false|status>")
|
||||
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')}")
|
||||
|
@ -19,7 +19,7 @@ no_reactions_sub = Sub("no_reactions")
|
||||
|
||||
@listener(command="no_reactions",
|
||||
description="自动已读某个对话的消息表态",
|
||||
parameters="<true|false|status>")
|
||||
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')}")
|
||||
|
@ -16,7 +16,7 @@ from pyqrcode import create
|
||||
|
||||
@listener(is_plugin=False, outgoing=True, command="genqr",
|
||||
description=lang('genqr_des'),
|
||||
parameters="<string>")
|
||||
parameters="[string]")
|
||||
async def gen_qr(client: Client, message: Message):
|
||||
""" Generate QR codes. """
|
||||
text = message.obtain_message()
|
||||
|
@ -15,18 +15,18 @@ 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 "
|
||||
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."}
|
||||
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"
|
||||
f"使用方法: `,{alias_command('rate')} [from_] [to_] [NUM],其中 [NUM] 是可省略的`\n\n"
|
||||
"支持货币: \n",
|
||||
"nc": "不是支持的货币. \n\n支持货币: \n",
|
||||
"notice": "数据每日八点更新",
|
||||
|
@ -68,7 +68,7 @@ async def get_uid(chat: Chat, message: Message):
|
||||
description=lang('sb_des'),
|
||||
need_admin=True,
|
||||
groups_only=True,
|
||||
parameters="<reply|id|username> <do_not_del_all>")
|
||||
parameters="[reply|id|username> <do_not_del_all]")
|
||||
async def super_ban(message: Message):
|
||||
chat = message.chat
|
||||
try:
|
||||
|
@ -27,7 +27,7 @@ async def set_custom_emoji(bot: Client, custom_emoji_id: int):
|
||||
|
||||
|
||||
@listener(command="set_status",
|
||||
parameters="<大会员自定义 emoji>",
|
||||
parameters="[大会员自定义 emoji]",
|
||||
need_admin=True,
|
||||
description="快速设置大会员自定义 emoji 状态")
|
||||
async def set_emoji_status(bot: Client, message: Message):
|
||||
|
@ -134,7 +134,7 @@ async def connect_sillyGirl():
|
||||
|
||||
|
||||
|
||||
@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,"连接中,建议重启...")
|
||||
|
@ -244,7 +244,7 @@ class Sticker:
|
||||
|
||||
@listener(
|
||||
command="s",
|
||||
parameters="<贴纸包名/cancel>",
|
||||
parameters="[贴纸包名/cancel]",
|
||||
description="保存贴纸到自己的贴纸包",
|
||||
need_admin=True,
|
||||
)
|
||||
|
@ -8,7 +8,7 @@ from pagermaid.utils import lang, Message
|
||||
|
||||
@listener(is_plugin=False, command="teletype",
|
||||
description=lang('teletype_des'),
|
||||
parameters="<message>")
|
||||
parameters="[message]")
|
||||
async def teletype(message: Message):
|
||||
if not message.arguments:
|
||||
return await message.edit("出错了呜呜呜 ~ 空白的参数。")
|
||||
|
@ -43,7 +43,7 @@ async def get_uid(chat: Chat, message: Message):
|
||||
description="解除封禁一位用户",
|
||||
need_admin=True,
|
||||
groups_only=True,
|
||||
parameters="<reply|id|username>")
|
||||
parameters="[reply|id|username]")
|
||||
async def unban(client: Client, message: Message):
|
||||
chat = message.chat
|
||||
try:
|
||||
|
@ -37,7 +37,7 @@ def format_time(t):
|
||||
|
||||
@listener(command="unixtime",
|
||||
description="Unix时间戳转换\n参数缺省将当前服务器时间转换为Unix时间戳\n时间格式: `YYYY-MM-DD HH:MM:SS`",
|
||||
parameters="<缺省 / 时间 / Unix时间戳>")
|
||||
parameters="[缺省 / 时间 / Unix时间戳]")
|
||||
async def unix_time(message: Message):
|
||||
try:
|
||||
return await message.edit(format_time(message.arguments))
|
||||
|
@ -4,7 +4,7 @@ from pagermaid.utils import alias_command
|
||||
|
||||
|
||||
@listener(command="urbandictionary",
|
||||
parameters="<单词>",
|
||||
parameters="[单词]",
|
||||
description="解释英语俚语词汇")
|
||||
async def get_urban_mean(message: Message, httpx: AsyncClient):
|
||||
""" To fetch meaning of the given word from urban dictionary. """
|
||||
|
@ -9,7 +9,7 @@ from pagermaid.enums import Client, Message
|
||||
@listener(command="vctools",
|
||||
admins_only=True,
|
||||
groups_only=True,
|
||||
parameters="<开启/关闭>",
|
||||
parameters="[开启/关闭]",
|
||||
description="开启/关闭群组直播间")
|
||||
async def vctools(bot: Client, message: Message):
|
||||
if not message.arguments:
|
||||
|
20
vip/main.py
20
vip/main.py
@ -6,7 +6,7 @@ from pagermaid.enums import Client, Message
|
||||
|
||||
@listener(command="duckduckgo",
|
||||
description="Duckduckgo 搜索",
|
||||
parameters="<query>")
|
||||
parameters="[query]")
|
||||
async def duckduckgo(client: Client, message: Message):
|
||||
text = message.arguments
|
||||
if not text:
|
||||
@ -19,7 +19,7 @@ async def duckduckgo(client: Client, message: Message):
|
||||
|
||||
@listener(command="caiyun",
|
||||
description="彩云翻译",
|
||||
parameters="<query>")
|
||||
parameters="[query]")
|
||||
async def caiyun_translate(client: Client, message: Message):
|
||||
text = message.arguments
|
||||
if not text:
|
||||
@ -32,7 +32,7 @@ async def caiyun_translate(client: Client, message: Message):
|
||||
|
||||
@listener(command="weather",
|
||||
description="使用彩云天气 api 查询国内实时天气。",
|
||||
parameters="<位置>")
|
||||
parameters="[位置]")
|
||||
async def weather(client: Client, message: Message):
|
||||
text = message.arguments
|
||||
if not text:
|
||||
@ -45,7 +45,7 @@ async def weather(client: Client, message: Message):
|
||||
|
||||
@listener(command="weather_pic",
|
||||
description="使用彩云天气 api 查询国内实时天气,但是显示图片。",
|
||||
parameters="<位置>")
|
||||
parameters="[位置]")
|
||||
async def weather_pic(client: Client, message: Message):
|
||||
text = message.arguments
|
||||
if not text:
|
||||
@ -62,7 +62,7 @@ async def weather_pic(client: Client, message: Message):
|
||||
|
||||
@listener(command="weather_he",
|
||||
description="使用和风天气 api 查询国内实时天气,但是显示图片。",
|
||||
parameters="<位置>")
|
||||
parameters="[位置]")
|
||||
async def weather_he(client: Client, message: Message):
|
||||
text = message.arguments
|
||||
if not text:
|
||||
@ -93,34 +93,34 @@ async def az_tts(client: Client, message: Message, mode: str):
|
||||
|
||||
@listener(command="tts_nan",
|
||||
description="通过 Azure 文本到语音 基于字符串生成 简体男声 语音消息。",
|
||||
parameters="<字符串>")
|
||||
parameters="[字符串]")
|
||||
async def az_tts_nan(client: Client, message: Message):
|
||||
await az_tts(client, message, "")
|
||||
|
||||
|
||||
@listener(command="tts_nv",
|
||||
description="通过 Azure 文本到语音 基于字符串生成 简体女声 语音消息。",
|
||||
parameters="<字符串>")
|
||||
parameters="[字符串]")
|
||||
async def az_tts_nv(client: Client, message: Message):
|
||||
await az_tts(client, message, "nv")
|
||||
|
||||
|
||||
@listener(command="tts_tw",
|
||||
description="通过 Azure 文本到语音 基于字符串生成 繁体男声 语音消息。",
|
||||
parameters="<字符串>")
|
||||
parameters="[字符串]")
|
||||
async def az_tts_tw(client: Client, message: Message):
|
||||
await az_tts(client, message, "tw")
|
||||
|
||||
|
||||
@listener(command="tts_ne",
|
||||
description="通过 Azure 文本到语音 基于字符串生成 简体新闻男声 语音消息。",
|
||||
parameters="<字符串>")
|
||||
parameters="[字符串]")
|
||||
async def az_tts_ne(client: Client, message: Message):
|
||||
await az_tts(client, message, "ne")
|
||||
|
||||
|
||||
@listener(command="tts_en",
|
||||
description="通过 Azure 文本到语音 基于字符串生成 英文男声 语音消息。",
|
||||
parameters="<字符串>")
|
||||
parameters="[字符串]")
|
||||
async def az_tts_en(client: Client, message: Message):
|
||||
await az_tts(client, message, "en")
|
||||
|
@ -38,7 +38,7 @@ def calcWindDirection(windDirection):
|
||||
|
||||
@listener(command="weather",
|
||||
description="查询天气",
|
||||
parameters="<城市>")
|
||||
parameters="[城市]")
|
||||
async def weather(_: Client, message: Message):
|
||||
if not message.arguments:
|
||||
return await message.edit("出错了呜呜呜 ~ 无效的参数。")
|
||||
|
@ -5,7 +5,7 @@ from pagermaid.single_utils import safe_remove
|
||||
|
||||
@listener(command="weather_lite",
|
||||
description="查询天气",
|
||||
parameters="<城市>")
|
||||
parameters="[城市]")
|
||||
async def weather_lite(request: AsyncClient, message: Message):
|
||||
if not message.arguments:
|
||||
return await message.edit("请输入城市名称")
|
||||
|
@ -131,7 +131,7 @@ async def websocket_push(message: Message):
|
||||
await ws.push(message.__str__())
|
||||
|
||||
|
||||
@listener(command="websocket", description="Websocket Connect", parameters="<uri>")
|
||||
@listener(command="websocket", description="Websocket Connect", parameters="[uri]")
|
||||
async def websocket_to_connect(message: Message):
|
||||
if message.arguments:
|
||||
uri = message.arguments
|
||||
|
@ -35,7 +35,7 @@ async def guess(_: Client, message: Message):
|
||||
|
||||
@listener(is_plugin=True, command="wiki",
|
||||
description="查询维基百科词条",
|
||||
parameters="<词组>")
|
||||
parameters="[词组]")
|
||||
async def wiki(_: Client, message: Message):
|
||||
text = message.arguments
|
||||
if not text:
|
||||
|
@ -104,7 +104,7 @@ async def start_download(message: Message, url: str):
|
||||
|
||||
@listener(command="ytdl",
|
||||
description="Upload Youtube、Bilibili video to telegram",
|
||||
parameters="<url>")
|
||||
parameters="[url]")
|
||||
async def ytdl(message: Message):
|
||||
global ytdl_is_downloading
|
||||
if not message.arguments:
|
||||
|
Loading…
Reference in New Issue
Block a user