Skip to content

Commit f42c732

Browse files
Upgrade DSharpPlus to alpha.5
1 parent 9ab886b commit f42c732

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

src/Kattbot/Infrastructure/NoWayGateway.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,21 @@ namespace Kattbot.Infrastructure;
66
// ReSharper disable once ClassNeverInstantiated.Global
77
public class NoWayGateway : IGatewayController
88
{
9-
public Task ZombiedAsync(IGatewayClient client)
9+
public async Task ZombiedAsync(IGatewayClient client)
1010
{
11-
// TODO implement zombie handling
12-
return Task.CompletedTask;
11+
await client.ReconnectAsync();
1312
}
1413

1514
public Task HeartbeatedAsync(IGatewayClient client)
1615
{
1716
return Task.CompletedTask;
1817
}
1918

19+
public Task ResumeAttemptedAsync(IGatewayClient client)
20+
{
21+
return Task.CompletedTask;
22+
}
23+
2024
public Task ReconnectRequestedAsync(IGatewayClient client)
2125
{
2226
return Task.CompletedTask;

src/Kattbot/Kattbot.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.1" />
2222
<PackageReference Include="TiktokenSharp" Version="1.1.6" />
2323
<PackageReference Include="CommandLineArgumentsParser" Version="3.0.23" />
24-
<PackageReference Include="DSharpPlus" Version="5.0.0-nightly-02356" />
25-
<PackageReference Include="DSharpPlus.CommandsNext" Version="5.0.0-nightly-02356" />
26-
<PackageReference Include="DSharpPlus.Interactivity" Version="5.0.0-nightly-02356" />
24+
<PackageReference Include="DSharpPlus" Version="5.0.0-alpha.5" />
25+
<PackageReference Include="DSharpPlus.CommandsNext" Version="5.0.0-alpha.5" />
26+
<PackageReference Include="DSharpPlus.Interactivity" Version="5.0.0-alpha.5" />
2727
<PackageReference Include="MediatR" Version="12.4.1" />
2828
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
2929
<PackageReference Include="Microsoft.Extensions.Hosting.Systemd" Version="8.0.0" />

src/Kattbot/Workers/DiscordLoggerWorker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ await errorLogChannel.SendMessageAsync(
8686
}
8787
catch (Exception ex)
8888
{
89-
_logger.LogError(ex, "Welp");
89+
_logger.LogCritical(ex, "Welp");
9090
}
9191
}
9292

@@ -101,6 +101,6 @@ private async Task<DiscordChannel> ResolverLogChannel(ulong guildId, ulong chann
101101

102102
discordGuild.Channels.TryGetValue(channelId, out DiscordChannel? discordChannel);
103103

104-
return discordChannel ??= await discordGuild.GetChannelAsync(channelId);
104+
return discordChannel ?? await discordGuild.GetChannelAsync(channelId);
105105
}
106106
}

0 commit comments

Comments
 (0)