forked from TeamInklings/Octobot
Add more information to guild loaded log message (#179)
This PR adds additional information in the log about guilds as they are being loaded. The new information is the owner tag & ID and member count
This commit is contained in:
parent
f12d6d13c5
commit
f785efcbc0
1 changed files with 8 additions and 1 deletions
|
@ -64,7 +64,14 @@ public class GuildLoadedResponder : IResponder<IGuildCreate>
|
|||
return await SendDataLoadFailed(guild, data, bot, ct);
|
||||
}
|
||||
|
||||
_logger.LogInformation("Loaded guild {ID} (\"{Name}\")", guild.ID, guild.Name);
|
||||
var ownerResult = await _userApi.GetUserAsync(guild.OwnerID, ct);
|
||||
if (!ownerResult.IsDefined(out var owner))
|
||||
{
|
||||
return Result.FromError(ownerResult);
|
||||
}
|
||||
|
||||
_logger.LogInformation("Loaded guild \"{Name}\" ({ID}) owned by {Owner} ({OwnerID}) with {MemberCount} members",
|
||||
guild.Name, guild.ID, owner.GetTag(), owner.ID, guild.MemberCount);
|
||||
|
||||
if (!GuildSettings.ReceiveStartupMessages.Get(cfg))
|
||||
{
|
||||
|
|
Reference in a new issue