-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
160 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from core.fun.silence_toggle import * | ||
from core.fun.welcome import * | ||
from core.fun.admin_controller import * | ||
from core.fun.ping import * | ||
from core.fun.ping import * | ||
from core.fun.gethelp import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
""" | ||
:Author: NekoRabi | ||
:Create: 2022/8/18 2:19 | ||
:Update: / | ||
:Describe: 获取机器人帮助,或者说是呼出指令面板 | ||
:Version: 0.0.1 | ||
""" | ||
|
||
import re | ||
from mirai import MessageEvent, Plain, Image | ||
from core import bot, commandpre, commands_map, config | ||
from utils.MessageChainBuilder import messagechain_builder | ||
|
||
_settings = config.get('settings') | ||
|
||
__all__ = ['getsyshelp', 'getprojectlink'] | ||
|
||
|
||
@bot.on(MessageEvent) | ||
async def getsyshelp(event: MessageEvent): | ||
msg = "".join(map(str, event.message_chain[Plain])) | ||
m = re.match( | ||
fr"^{commandpre}{commands_map['sys']['help']}", msg.strip()) | ||
if m and _settings['help']: | ||
# if not cmdbuffer.updategroupcache(groupcommand(event.group.id, event.sender.id, 'help')): | ||
# return bot.send(event, messagechain_builder()(text="帮助文档刚刚才发过哦~", rndimg=True, at=event.sender.id)) | ||
return await bot.send(event, Image(path="./images/grouphelp.png")) | ||
|
||
|
||
@bot.on(MessageEvent) | ||
async def getprojectlink(event: MessageEvent): | ||
msg = "".join(map(str, event.message_chain[Plain])) | ||
m = re.match(fr"^{commandpre}项目地址\s*$", msg.strip()) | ||
if m: | ||
return await bot.send(event, messagechain_builder(text="Github : https://github.com/NekoRabi/Majsoul-QQBot\n" | ||
"如果觉得好可以点个star⭐")) | ||
|
||
# 与机器人互动 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.