mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-21 21:54:36 +00:00
Update dependencies
Minor changes to account for dependency additions
This commit is contained in:
parent
56db1a6f9d
commit
4325fdacf2
4 changed files with 10 additions and 6 deletions
|
@ -5,7 +5,7 @@
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<Version>3.2.4</Version>
|
<Version>3.2.5</Version>
|
||||||
<Authors>NoiTheCat</Authors>
|
<Authors>NoiTheCat</Authors>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
@ -22,10 +22,10 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CommandLineParser" Version="2.8.0" />
|
<PackageReference Include="CommandLineParser" Version="2.8.0" />
|
||||||
<PackageReference Include="Discord.Net" Version="3.0.0-dev-20210822.1" />
|
<PackageReference Include="Discord.Net" Version="3.1.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="NodaTime" Version="3.0.9" />
|
<PackageReference Include="NodaTime" Version="3.0.9" />
|
||||||
<PackageReference Include="Npgsql" Version="6.0.1" />
|
<PackageReference Include="Npgsql" Version="6.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -43,6 +43,8 @@ static class Common {
|
||||||
// For guilds of size over 30, require 85% or more of the members to be known
|
// For guilds of size over 30, require 85% or more of the members to be known
|
||||||
// (26/30, 42/50, 255/300, etc)
|
// (26/30, 42/50, 255/300, etc)
|
||||||
int threshold = (int)(guild.MemberCount * 0.85);
|
int threshold = (int)(guild.MemberCount * 0.85);
|
||||||
|
Program.Log(nameof(HasMostMembersDownloaded),
|
||||||
|
$"Passing with {guild.DownloadedMemberCount}/{guild.MemberCount} in cache for guild {guild.Id}.");
|
||||||
return guild.DownloadedMemberCount >= threshold;
|
return guild.DownloadedMemberCount >= threshold;
|
||||||
} else {
|
} else {
|
||||||
// For smaller guilds, fail if two or more members are missing
|
// For smaller guilds, fail if two or more members are missing
|
||||||
|
|
|
@ -70,13 +70,16 @@ class ShardInstance : IDisposable {
|
||||||
private Task Client_Log(LogMessage arg) {
|
private Task Client_Log(LogMessage arg) {
|
||||||
// Suppress certain messages
|
// Suppress certain messages
|
||||||
if (arg.Message != null) {
|
if (arg.Message != null) {
|
||||||
// TODO remove below line ideally when D.Net bug is fixed
|
// These warnings appear often as of Discord.Net v3...
|
||||||
if (arg.Message.StartsWith("Unknown Dispatch ") || arg.Message.StartsWith("Unknown Channel")) return Task.CompletedTask;
|
if (arg.Message.StartsWith("Unknown Dispatch ") || arg.Message.StartsWith("Unknown Channel")) return Task.CompletedTask;
|
||||||
switch (arg.Message) // Connection status messages replaced by ShardManager's output
|
switch (arg.Message) // Connection status messages replaced by ShardManager's output
|
||||||
{
|
{
|
||||||
case "Connecting":
|
case "Connecting":
|
||||||
case "Connected":
|
case "Connected":
|
||||||
case "Ready":
|
case "Ready":
|
||||||
|
case "Disconnecting":
|
||||||
|
case "Disconnected":
|
||||||
|
case "Resumed previous session":
|
||||||
case "Failed to resume previous session":
|
case "Failed to resume previous session":
|
||||||
case "Discord.WebSocket.GatewayReconnectException: Server requested a reconnect":
|
case "Discord.WebSocket.GatewayReconnectException: Server requested a reconnect":
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
|
@ -115,8 +115,7 @@ class ShardManager : IDisposable {
|
||||||
ShardId = shardId,
|
ShardId = shardId,
|
||||||
TotalShards = Config.ShardTotal,
|
TotalShards = Config.ShardTotal,
|
||||||
LogLevel = LogSeverity.Info,
|
LogLevel = LogSeverity.Info,
|
||||||
DefaultRetryMode = RetryMode.RetryRatelimit,
|
DefaultRetryMode = RetryMode.AlwaysRetry,
|
||||||
MessageCacheSize = 0, // not needed at all
|
|
||||||
GatewayIntents = GatewayIntents.Guilds | GatewayIntents.GuildMembers | GatewayIntents.GuildMessages
|
GatewayIntents = GatewayIntents.Guilds | GatewayIntents.GuildMembers | GatewayIntents.GuildMessages
|
||||||
};
|
};
|
||||||
var newClient = new DiscordSocketClient(clientConf);
|
var newClient = new DiscordSocketClient(clientConf);
|
||||||
|
|
Loading…
Reference in a new issue