Skip to content

Commit

Permalink
fix(plugins/elechoplugin/): 自动断开链接
Browse files Browse the repository at this point in the history
RunAsync -> StartAsync
  • Loading branch information
yiyungent committed Jun 10, 2023
1 parent 1d65631 commit d00da19
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions plugins/EleChoPlugin/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public async Task<ActionResult> Start()
if (botConfig.Enable)
{
BotItem(botConfig, settingsModel);
//await BotItem(botConfig, settingsModel);
}
}

Expand All @@ -139,7 +140,7 @@ public async Task<ActionResult> Download()

#region NonActions
[NonAction]
public async void BotItem(SettingsModel.EleChoConfigItemModel botConfig, SettingsModel settings)
public async Task BotItem(SettingsModel.EleChoConfigItemModel botConfig, SettingsModel settings)
{
var bot = new EleChoBotStore.BotItemModel();
bot.ConfigId = botConfig.ConfigId;
Expand All @@ -161,7 +162,7 @@ public async void BotItem(SettingsModel.EleChoConfigItemModel botConfig, Setting
});

// 启动
await bot.CqRHttpSession.RunAsync();
await bot.CqRHttpSession.StartAsync();

#region 注册事件
// 使用 EleCho 特性: 主动使用插件
Expand Down
4 changes: 2 additions & 2 deletions plugins/EleChoPlugin/EleChoPlugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageId>PluginCore.EleChoPlugin</PackageId>
<Version>0.1.1</Version>
<Version>0.1.2</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>0.1.1.0</FileVersion>
<FileVersion>0.1.2.0</FileVersion>
<Company>yiyun</Company>
<Authors>yiyun</Authors>
<Description>PluginCore 插件: QQ基础插件</Description>
Expand Down
2 changes: 1 addition & 1 deletion plugins/EleChoPlugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
> 本项目基于 [OrgEleCho/EleCho.GoCqHttpSdk: 专为 Go-CqHttp 打造, 完全遵守 C# 编码规范, 优雅与便捷的通信 SDK](https://github.com/OrgEleCho/EleCho.GoCqHttpSdk)
<!-- 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.EleChoPlugin-v0.1.1.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.EleChoPlugin-v0.1.2.README" style="border:0" alt="" />
<!-- End Matomo -->

2 changes: 1 addition & 1 deletion plugins/EleChoPlugin/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"DisplayName": "QQ插件",
"Description": "QQ基础插件 for go-cqhttp",
"Author": "yiyun",
"Version": "0.1.1",
"Version": "0.1.2",
"SupportedVersions": [ "0.0.1" ]
}

0 comments on commit d00da19

Please sign in to comment.