Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【功能建议】对aliases里面的关键词也设置起始命令 #2730

Closed
mengluo04 opened this issue May 22, 2024 · 12 comments
Closed

【功能建议】对aliases里面的关键词也设置起始命令 #2730

mengluo04 opened this issue May 22, 2024 · 12 comments
Labels
invalid This doesn't seem right

Comments

@mengluo04
Copy link

希望能解决的问题

目前cmd命令可以实现匹配命令前缀,但是aliases里面的不行,比如#,*开头的命令都会触发aliases里面的命令

描述所需要的功能

实现和cmd前缀一样的功能,比如环境变量配置文件里面的COMMAND_START参数

@mengluo04 mengluo04 added the enhancement New feature or request label May 22, 2024
Copy link
Member

你先跟我解释一下什么是命令别名

@mengluo04
Copy link
Author

mengluo04 commented May 22, 2024

你先跟我解释一下什么是命令别名

on_command方法里面的这个参数:aliases

@RF-Tar-Railt
Copy link
Member

RF-Tar-Railt commented May 22, 2024

你先跟我解释一下什么是命令别名

on_command方法里面的这个参数:aliases

我在问你它的意义和功能

Copy link
Contributor

你举个实际例子说明一下

@mengluo04
Copy link
Author

你举个实际例子说明一下

群里有原神和星铁两个机器人,原神机器人那边指定是#xx角色面板,星铁这边是xx角色面板,发送#xx角色面板,两边都会触发。看了原神机器人那边不是用的nb开发,是作者用正则匹配的然后走的nobe标准,看起来是插件作者自己处理更合适?

Copy link
Contributor

哦原来你是...

@yanyongyu
Copy link
Member

alias 就是命令的别名,同样受 command start 配置影响

@mengluo04
Copy link
Author

alias 就是命令的别名,同样受 command start 配置影响

不太对,设置了前缀,只有命令生效了,别名还是没有判断前缀,nonebot2的版本是2.2.1
image
image

@RF-Tar-Railt
Copy link
Member

你把.env改成.env.prod看看
要么你把日志等级改成DEBUG

@mengluo04
Copy link
Author

你把.env改成.env.prod看看 要么你把日志等级改成DEBUG

用的是.env.prod,这是debug日志的结果
image

@RF-Tar-Railt
Copy link
Member

你把.env改成.env.prod看看 要么你把日志等级改成DEBUG

用的是.env.prod,这是debug日志的结果
image

你自己去看插件源码。。。xxx面板用的是on_regex,与command无关

@mengluo04
Copy link
Author

你把.env改成.env.prod看看 要么你把日志等级改成DEBUG

用的是.env.prod,这是debug日志的结果
image

你自己去看插件源码。。。xxx面板用的是on_regex,与command无关

好的,非常感谢

@yanyongyu yanyongyu added invalid This doesn't seem right and removed enhancement New feature or request labels May 22, 2024
@yanyongyu yanyongyu closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Development

No branches or pull requests

4 participants