Skip to content

Commit

Permalink
修个小bug
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealKamisama committed Mar 5, 2023
1 parent b96b09f commit 6927fb4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions WFBot/Orichalt/MiguelNetwork.cs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,8 @@ public static void Broadcast(RichMessages content)

// 这特么写的太屎了, 但是我真的想不出别的方法了, 妈的Kook.Net真傻逼啊
// 我找了大概一个小时的文档才弄明白该这么写, Kook.Net的文档也一坨, 我都去查Discord.Net了.
if (content.Any(c => c is AtMessage { IsAll: true }))
var isAll = content.Any(c => c is AtMessage { IsAll: true });
if (isAll)
{
cb.AddModule(new SectionModuleBuilder()
{
Expand All @@ -507,7 +508,10 @@ public static void Broadcast(RichMessages content)

await channel.SendCardAsync(cb.Build());

cb.Modules.RemoveAt(cb.Modules.Count - 1);
if (isAll)
{
cb.Modules.RemoveAt(cb.Modules.Count - 1);
}



Expand Down

0 comments on commit 6927fb4

Please sign in to comment.