Skip to content

Commit

Permalink
fix(plugins/moli4qqchannelplugin/): 前缀
Browse files Browse the repository at this point in the history
  • Loading branch information
yiyungent committed Jan 29, 2023
1 parent 1b80970 commit a4b251a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions plugins/MoLi4QQChannelPlugin/MoLi4QQChannelPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ public void ReceivedUserMessage(string botAppId, Message message, QQChannelApi q
{
return;
}
if (!string.IsNullOrEmpty(settingsModel.Prefix) && text.Trim().StartsWith(settingsModel.Prefix))
{
// 移除前缀, 不考虑空格前缀
text = text.Trim().Substring(settingsModel.Prefix.Length);
}

Console.WriteLine("茉莉准备回复: ");
MoLiApiResponseModel resModel = new MoLiApiResponseModel();
Expand Down
2 changes: 1 addition & 1 deletion plugins/MoLi4QQChannelPlugin/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"DisplayName": "茉莉频道机器人",
"Description": "对接 茉莉 API",
"Author": "yiyun",
"Version": "0.1.1",
"Version": "0.1.2",
"SupportedVersions": [ "0.0.1" ]
}

0 comments on commit a4b251a

Please sign in to comment.