- Updated Changelog.md

- Fixed intent error message condition
This commit is contained in:
Kwoth
2022-03-03 02:45:18 +01:00
parent 03367c5ec4
commit f82c4c7019
2 changed files with 9 additions and 3 deletions

View File

@@ -7,6 +7,10 @@ Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog.
- More cool stuff coming soon
## [4.0.1] - 03.03.2022
- Added `usePrivilegedIntents` to creds.yml if you don't have or don't want (?) to use them
- Added a human-readable, detailed error message if logging in fails due to missing privileged intents
## [4.0.0] - 02.03.2022

View File

@@ -53,6 +53,9 @@ public sealed class Bot
50;
#endif
if(!_creds.UsePrivilegedIntents)
Log.Warning("You are not using privileged intents. Some features will not work properly");
Client = new(new()
{
MessageCacheSize = messageCacheSize,
@@ -255,7 +258,6 @@ public sealed class Bot
await clientReady.Task.ConfigureAwait(false);
Client.Ready -= SetClientReady;
Client.JoinedGuild += Client_JoinedGuild;
Client.LeftGuild += Client_LeftGuild;
@@ -342,9 +344,9 @@ public sealed class Bot
if (arg.Message?.Contains("unknown dispatch", StringComparison.InvariantCultureIgnoreCase) ?? false)
return Task.CompletedTask;
if (arg.Exception is WebSocketClosedException { CloseCode: 4014 })
if (arg.Exception is { InnerException: WebSocketClosedException { CloseCode: 4014 } })
{
Log.Warning(@"
Log.Error(@"
Login failed.
*** Please enable privileged intents ***