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 31, 2023
1 parent f45a82f commit 54fddab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions plugins/MoLi4QQChannelPlugin/MoLi4QQChannelPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ public async void ReceivedAtMessage(string botAppId, Message message, QQChannelA
{
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/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@

<!-- Matomo Image Tracker-->
<img referrerpolicy="no-referrer-when-downgrade" src="https://matomo.moeci.com/matomo.php?idsite=2&amp;rec=1&amp;action_name=Plugins.MoLi4QQChannelPlugin-v0.1.6.README" style="border:0" alt="" />
<img referrerpolicy="no-referrer-when-downgrade" src="https://matomo.moeci.com/matomo.php?idsite=2&amp;rec=1&amp;action_name=Plugins.MoLi4QQChannelPlugin-v0.1.7.README" style="border:0" alt="" />
<!-- End Matomo -->
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.6",
"Version": "0.1.7",
"SupportedVersions": [ "0.0.1" ]
}

0 comments on commit 54fddab

Please sign in to comment.