Don't attempt to send log messages if the bot doesn't have permissions

This commit is contained in:
Ske
2020-02-22 01:54:10 +01:00
parent 493f7b12e5
commit 8d3be79d33
4 changed files with 15 additions and 11 deletions

View File

@@ -128,7 +128,7 @@ namespace PluralKit.Bot {
foreach (var channel in await guild.GetTextChannelsAsync())
{
// TODO: do we need to hide channels here to prevent info-leaking?
var perms = await channel.PermissionsIn();
var perms = channel.PermissionsIn();
// We use a bitfield so we can set individual permission bits in the loop
ulong missingPermissionField = 0;