-
Notifications
You must be signed in to change notification settings - Fork 0
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
[kook] support kook adapter #1
base: master
Are you sure you want to change the base?
Conversation
@inclyc 这些东西需要你的帮助,我不清楚PSMB的具体情况 还有dotenv的map怎么写我也不清楚 |
ENVIRONMENT=prod | ||
ENVIRONMENT=dev | ||
|
||
kook_bots=[{"token": "1/MTI0MDU=/tD9NHswpnFPvIj1Pmcpk1A=="}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是适合写到仓库里的吗?不是的话最好别写(安全性)
你可以force-push这个分支,或者我之后rebase掉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件理应不commit上来,你本地开发过后别stage这个文件就行,远程写成prod
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个地方是公用配置 而且已经是失效的token作为例子,没有安全担忧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
一般.dot
文件里只有一个字段ENVIRONMENT
,指定用哪个env。比如用prod
则程序会读入.env.prod
。你本地开发可以把测试字段写在.env.dev
文件当中,而不修改.env
文件
@@ -29,5 +29,6 @@ | |||
|
|||
|
|||
if __name__ == "__main__": | |||
logger.warning("Always use `nb run` to start the bot instead of manually running!") | |||
logger.warning( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
格式化有关的不要出现在同一个commit当中,你可以单独格式化一个commit直接提交到主线,消息中注明NFC,不需要review.
client_id: int # 客户端ID用来鉴别是否为自己,ID相同,则认为是同一个 | ||
client_name: str # 客户端名,用来在MC服务端中写策略 | ||
group_id: int # 对哪个群作出反应,群号 | ||
psmb_host: str # PSMB Server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
@@ -6,5 +6,5 @@ CLIENT_ID=1 | |||
CLIENT_NAME=qqbot | |||
PSMB_ID_PATTERN=topic | |||
PSMB_TOPIC=topic | |||
GROUP_ID=123456 | |||
GROUP_SERVER_MAPPING={"CHANNEL":"SERVER"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个CHANNEL是填写类似频道UUID/ID之类的东西还是填写频道名字?最好是频道ID,因为之后可能改名。
"SERVER" 同上,psmb其实是给了每个服务器一个id的
pydantic | ||
pydantic~=1.9.2 | ||
|
||
loguru~=0.6.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
似乎没有看到import loguru,这个应该会被按照依赖安装
我们可能不是migrate到Kook, 而是support这个平台。 见 hit-mc/hitmc#3 现在这个平台还不是特别完善。 可能需要一些时间等玩家迁移到Kook, QQ群用于广播消息 |
CC @alxndrt0512 |
TODO List
KMarkdown
格式的消息(使用Kook官方工具设计)