- Updated changelog

- Updated all projects to .net6
- Added some exception handling to the cmd source generator
This commit is contained in:
Kwoth
2022-02-01 08:52:40 +01:00
parent 2d90ecaa51
commit d31cfcc5a8
7 changed files with 28 additions and 32 deletions

View File

@@ -23,6 +23,8 @@ public sealed class Bot
public string Mention { get; private set; }
public bool IsReady { get; private set; }
public int ShardId { get; set; }
private readonly IBotCredentials _creds;
private readonly CommandService _commandService;
private readonly DbService _db;
@@ -34,6 +36,7 @@ public sealed class Bot
if (shardId < 0)
throw new ArgumentOutOfRangeException(nameof(shardId));
ShardId = shardId;
_credsProvider = new BotCredsProvider(totalShards);
_creds = _credsProvider.GetCreds();
@@ -64,6 +67,7 @@ public sealed class Bot
#endif
}
public List<ulong> GetCurrentGuildIds()
=> Client.Guilds.Select(x => x.Id).ToList();