首次提交
This commit is contained in:
15
danding_bot/plugins/danding_help/HelpCaiDan.md
Normal file
15
danding_bot/plugins/danding_help/HelpCaiDan.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# 欢迎使用蛋定助手🎇
|
||||
## 发送以下关键词获取帮助🤝🏻
|
||||
1. 下载(dl)
|
||||
2. 帮助文档(wd)
|
||||
3. 公益版(gyb)
|
||||
4. 正式版(zsb)
|
||||
5. 下单(xd)
|
||||
|
||||
## 部分教程关键字✨️
|
||||
1. 正式版御魂双开(dyh)
|
||||
2. 正式版如何运行(htr)
|
||||
|
||||
## 活动🔥🔥
|
||||
1. 每日试用(mrss) - 永久活动,单设备每日可试用1小时!
|
||||
|
||||
30
danding_bot/plugins/danding_help/__init__.py
Normal file
30
danding_bot/plugins/danding_help/__init__.py
Normal file
@@ -0,0 +1,30 @@
|
||||
from nonebot import get_plugin_config
|
||||
from nonebot.plugin import PluginMetadata
|
||||
from . import help
|
||||
from .config import Config
|
||||
|
||||
__plugin_meta__ = PluginMetadata(
|
||||
name="danding_help",
|
||||
description="蛋定助手帮助信息",
|
||||
usage="""
|
||||
# 蛋定助手帮助系统
|
||||
## 基础指令
|
||||
- 帮助 / help:显示帮助菜单图片
|
||||
- 下载 / dl / downdload:获取下载相关信息
|
||||
- 帮助文档 / wd:获取在线帮助文档链接
|
||||
|
||||
## 版本信息
|
||||
- 公益版 / free / gyb:查看公益版相关说明
|
||||
- 正式版 / pro / zsb:查看正式版相关说明
|
||||
|
||||
## 使用教程
|
||||
- 正式版御魂双开 / dyh:查看御魂双开教程
|
||||
- 正式版如何运行 / htr:查看软件运行教程
|
||||
- 正式版内测计划 / zsbnc:查看内测相关信息
|
||||
|
||||
注意:本插件仅在特定群组中可用
|
||||
""",
|
||||
config=Config,
|
||||
)
|
||||
|
||||
|
||||
45
danding_bot/plugins/danding_help/config.py
Normal file
45
danding_bot/plugins/danding_help/config.py
Normal file
@@ -0,0 +1,45 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class Config(BaseModel):
|
||||
"""Plugin Config Here"""
|
||||
HelpStr:str = """\
|
||||
# 欢迎使用蛋定助手
|
||||
## 发送以下关键词获取帮助
|
||||
1. 下载
|
||||
2. 下单
|
||||
3. 公益版(暂未进行维护!)
|
||||
4. 正式版
|
||||
|
||||
## 部分教程关键字
|
||||
1. 正式版御魂双开
|
||||
2. 正式版如何运行
|
||||
|
||||
## 活动
|
||||
1. 每日试用"""
|
||||
|
||||
DowndLoadStr:str = """\
|
||||
公益版提供群文件下载一种方式;
|
||||
正式版下载:https://file.x-tools.top
|
||||
后缀为Cx结尾的版本是修正版本,用新不用旧;"""
|
||||
|
||||
FreeStr:str = """公益版(暂时没有精力维护)
|
||||
1. 不定时更新,仅维护现有功能;
|
||||
2. 不提供技术支持;
|
||||
3. 仅供群文件下载;
|
||||
若出现初始化闪退问题,请@开发者更新共享注册码;"""
|
||||
|
||||
ProStr:str = """正式版
|
||||
1. 全新的框架、全新UI、更稳的功能;
|
||||
2. 更新、维护频率快;
|
||||
3. 提供技术支持;
|
||||
4. 提供多种下载方式;"""
|
||||
|
||||
OrderStr:str = """\
|
||||
1. 蛋定の卡铺1:https://shop.danding.vip
|
||||
2. 蛋定の卡铺2:https://ka.x-tools.top
|
||||
"""
|
||||
|
||||
DailyTrialStr:str = """\
|
||||
永久活动-每日试用:单设备支持每日试用1小时的脚本时长!
|
||||
请在购买或支持蛋定助手前,一定要先试用,确保自己可以正常使用脚本!"""
|
||||
99
danding_bot/plugins/danding_help/help.py
Normal file
99
danding_bot/plugins/danding_help/help.py
Normal file
@@ -0,0 +1,99 @@
|
||||
from nonebot import on_command, get_plugin_config,logger
|
||||
from nonebot.rule import fullmatch
|
||||
from .config import Config
|
||||
import os
|
||||
from nonebot_plugin_saa import Text, Image, MessageFactory
|
||||
from nonebot.adapters.onebot.v11.event import GroupMessageEvent
|
||||
import random
|
||||
import asyncio
|
||||
|
||||
async def rule_fun(e:GroupMessageEvent):
|
||||
id = e.group_id
|
||||
if id in [621016172]:
|
||||
return True
|
||||
return False
|
||||
|
||||
plugin_config = get_plugin_config(Config)
|
||||
|
||||
help = on_command("帮助", rule=rule_fun and fullmatch(('帮助','help')), aliases={"help"}, priority=1, block=True)
|
||||
@help.handle()
|
||||
async def _():
|
||||
# 获取当前脚本所在目录的绝对路径
|
||||
current_dir = os.path.dirname(__file__)
|
||||
# 构造图片的绝对路径
|
||||
image_path = os.path.join(current_dir, "img", "帮助菜单.jpg")
|
||||
# 发送图片
|
||||
with open(image_path, "rb") as f:
|
||||
image_bytes = f.read()
|
||||
await asyncio.sleep(random.uniform(2, 3))
|
||||
await MessageFactory([Image(image_bytes)]).send(
|
||||
at_sender=True, reply=True
|
||||
)
|
||||
|
||||
downdload = on_command("下载", rule=rule_fun and fullmatch(('下载',"dl","downdload")), aliases={"dl","downdload"}, priority=1, block=True)
|
||||
@downdload.handle()
|
||||
async def _():
|
||||
await asyncio.sleep(random.uniform(2, 3))
|
||||
await downdload.finish(plugin_config.DowndLoadStr)
|
||||
|
||||
wd = on_command("帮助文档", rule=rule_fun and fullmatch(('帮助文档',"wd")), aliases={"wd"}, priority=1, block=True)
|
||||
@wd.handle()
|
||||
async def _():
|
||||
await asyncio.sleep(random.uniform(2, 3))
|
||||
await wd.finish("https://www.danding.vip")
|
||||
|
||||
|
||||
free = on_command("公益版", rule=rule_fun and fullmatch(('公益版',"free","gyb")), aliases={"free","gyb"}, priority=1, block=True)
|
||||
@free.handle()
|
||||
async def _():
|
||||
await asyncio.sleep(random.uniform(2, 3))
|
||||
await help.finish(plugin_config.FreeStr)
|
||||
|
||||
pro = on_command("正式版", rule=rule_fun and fullmatch(('正式版',"pro","zsb")), aliases={"pro","zsb"}, priority=1, block=True)
|
||||
@pro.handle()
|
||||
async def _():
|
||||
await asyncio.sleep(random.uniform(2, 3))
|
||||
await help.finish(plugin_config.ProStr)
|
||||
|
||||
dyh = on_command("正式版御魂双开", rule=rule_fun and fullmatch(('正式版御魂双开',"dyh")), aliases={"dyh"}, priority=1, block=True)
|
||||
@dyh.handle()
|
||||
async def _():
|
||||
# 获取当前脚本所在目录的绝对路径
|
||||
current_dir = os.path.dirname(__file__)
|
||||
# 构造图片的绝对路径
|
||||
image_path = os.path.join(current_dir, "img", "御魂双开方法.jpg")
|
||||
# 发送图片
|
||||
with open(image_path, "rb") as f:
|
||||
image_bytes = f.read()
|
||||
await asyncio.sleep(random.uniform(2, 3))
|
||||
await MessageFactory([Text("御魂双开方法见下图"),Image(image_bytes)]).send(
|
||||
at_sender=True, reply=True
|
||||
)
|
||||
|
||||
|
||||
htr = on_command("正式版如何运行", rule=rule_fun and fullmatch(('正式版如何运行',"htr")), aliases={"htr"}, priority=1, block=True)
|
||||
@htr.handle()
|
||||
async def _():
|
||||
# 获取当前脚本所在目录的绝对路径
|
||||
current_dir = os.path.dirname(__file__)
|
||||
# 构造图片的绝对路径
|
||||
image_path = os.path.join(current_dir, "img", "开软件教程.jpg")
|
||||
# 发送图片
|
||||
with open(image_path, "rb") as f:
|
||||
image_bytes = f.read()
|
||||
await asyncio.sleep(random.uniform(2, 3))
|
||||
await MessageFactory([Text("How To Run? Look!"),Image(image_bytes)]).send(
|
||||
at_sender=True, reply=True
|
||||
)
|
||||
|
||||
order = on_command("下单", rule=rule_fun and fullmatch(('下单',"xd")), aliases={"xd"}, priority=1, block=True)
|
||||
@order.handle()
|
||||
async def _():
|
||||
await asyncio.sleep(random.uniform(2, 3))
|
||||
await order.finish(plugin_config.OrderStr)
|
||||
|
||||
daily_trial = on_command("每日试用", rule=rule_fun and fullmatch(('每日试用',"mrss")), aliases={"mrss"}, priority=1, block=True)
|
||||
@daily_trial.handle()
|
||||
async def _():
|
||||
await asyncio.sleep(random.uniform(2, 3))
|
||||
await daily_trial.finish(plugin_config.DailyTrialStr)
|
||||
BIN
danding_bot/plugins/danding_help/img/帮助菜单.jpg
Normal file
BIN
danding_bot/plugins/danding_help/img/帮助菜单.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 111 KiB |
BIN
danding_bot/plugins/danding_help/img/开软件教程.jpg
Normal file
BIN
danding_bot/plugins/danding_help/img/开软件教程.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
BIN
danding_bot/plugins/danding_help/img/御魂双开方法.jpg
Normal file
BIN
danding_bot/plugins/danding_help/img/御魂双开方法.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 128 KiB |
Reference in New Issue
Block a user