Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…-Bot into v0.11.2
  • Loading branch information
GardenHamster committed Dec 30, 2023
2 parents a520568 + a632b3b commit 0921e70
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public async Task SendWeeklyR18Ranking(GroupCommand command)
await ReplyRanking(command, rankingMode, rankingItem);
}

public async Task HandleRankingSubscribeAsync(PixivRankingTimer rankingTimer, PixivRankingItem rankingItem, PixivRankingMode rankingMode)
public async Task PushRankingAsync(PixivRankingTimer rankingTimer, PixivRankingItem rankingItem, PixivRankingMode rankingMode)
{
try
{
Expand Down
12 changes: 6 additions & 6 deletions Theresa3rd-Bot/TheresaBot.Main/TheresaBot.Main.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AngleSharp" Version="0.17.1" />
<PackageReference Include="AngleSharp" Version="1.0.7" />
<PackageReference Include="jieba.NET" Version="0.42.2" />
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.22" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Quartz" Version="3.6.3" />
<PackageReference Include="Quartz" Version="3.8.0" />
<PackageReference Include="SharpZipLib" Version="1.4.0" />
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
<PackageReference Include="SkiaSharp" Version="2.88.6" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.6" />
<PackageReference Include="SqlSugar.IOC" Version="2.0.0" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.89" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.129" />
<PackageReference Include="WordCloud.NetCore" Version="1.1.0" />
<PackageReference Include="YamlDotNet" Version="13.1.1" />
<PackageReference Include="YamlDotNet" Version="13.7.1" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions Theresa3rd-Bot/TheresaBot.Main/Timers/SchedulerManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,8 @@ private static async Task DestroyAsync(this IScheduler scheduler)
try
{
if (scheduler is null) return;
if (scheduler.IsShutdown) return;
await scheduler.Shutdown(false);
await scheduler.DestroyAsync();
await scheduler.Clear();
}
catch (Exception ex)
{
Expand Down
18 changes: 9 additions & 9 deletions Theresa3rd-Bot/TheresaBot.Main/Timers/TimingRankingJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,47 +44,47 @@ private async Task HandleTiming(BaseSession session, BaseReporter reporter, Pixi
var rankingHandler = new PixivRankingHandler(session, reporter);
if (rankingName == "daily")
{
await rankingHandler.HandleRankingSubscribeAsync(rankingTimer, BotConfig.PixivRankingConfig.Daily, PixivRankingMode.Daily);
await rankingHandler.PushRankingAsync(rankingTimer, BotConfig.PixivRankingConfig.Daily, PixivRankingMode.Daily);
return;
}
if (rankingName == "dailyai")
{
await rankingHandler.HandleRankingSubscribeAsync(rankingTimer, BotConfig.PixivRankingConfig.DailyAI, PixivRankingMode.DailyAI);
await rankingHandler.PushRankingAsync(rankingTimer, BotConfig.PixivRankingConfig.DailyAI, PixivRankingMode.DailyAI);
return;
}
if (rankingName == "male")
{
await rankingHandler.HandleRankingSubscribeAsync(rankingTimer, BotConfig.PixivRankingConfig.Male, PixivRankingMode.Male);
await rankingHandler.PushRankingAsync(rankingTimer, BotConfig.PixivRankingConfig.Male, PixivRankingMode.Male);
return;
}
if (rankingName == "weekly")
{
await rankingHandler.HandleRankingSubscribeAsync(rankingTimer, BotConfig.PixivRankingConfig.Weekly, PixivRankingMode.Weekly);
await rankingHandler.PushRankingAsync(rankingTimer, BotConfig.PixivRankingConfig.Weekly, PixivRankingMode.Weekly);
return;
}
if (rankingName == "monthly")
{
await rankingHandler.HandleRankingSubscribeAsync(rankingTimer, BotConfig.PixivRankingConfig.Monthly, PixivRankingMode.Monthly);
await rankingHandler.PushRankingAsync(rankingTimer, BotConfig.PixivRankingConfig.Monthly, PixivRankingMode.Monthly);
return;
}
if (rankingName == "dailyr18")
{
await rankingHandler.HandleRankingSubscribeAsync(rankingTimer, BotConfig.PixivRankingConfig.Daily, PixivRankingMode.Daily_R18);
await rankingHandler.PushRankingAsync(rankingTimer, BotConfig.PixivRankingConfig.Daily, PixivRankingMode.Daily_R18);
return;
}
if (rankingName == "dailyair18")
{
await rankingHandler.HandleRankingSubscribeAsync(rankingTimer, BotConfig.PixivRankingConfig.DailyAI, PixivRankingMode.DailyAI_R18);
await rankingHandler.PushRankingAsync(rankingTimer, BotConfig.PixivRankingConfig.DailyAI, PixivRankingMode.DailyAI_R18);
return;
}
if (rankingName == "maler18")
{
await rankingHandler.HandleRankingSubscribeAsync(rankingTimer, BotConfig.PixivRankingConfig.Male, PixivRankingMode.Male_R18);
await rankingHandler.PushRankingAsync(rankingTimer, BotConfig.PixivRankingConfig.Male, PixivRankingMode.Male_R18);
return;
}
if (rankingName == "weeklyr18")
{
await rankingHandler.HandleRankingSubscribeAsync(rankingTimer, BotConfig.PixivRankingConfig.Weekly, PixivRankingMode.Weekly_R18);
await rankingHandler.PushRankingAsync(rankingTimer, BotConfig.PixivRankingConfig.Weekly, PixivRankingMode.Weekly_R18);
return;
}
}
Expand Down

0 comments on commit 0921e70

Please sign in to comment.