public Task GuildAvailable(DiscordClient client, GuildCreateEventArgs e) { var clientEventModel = new ClientEventModel { GuildName = e.Guild.Name, GuildId = e.Guild.Id, }; (string message, object[] args) = clientEventModel.ToEventLogTuple(message: "Guild available."); client.Logger.LogInformation(DockordEventId.BotClientGuildAvailable, message, args); return(Task.CompletedTask); }
public Task ClientErrored(DiscordClient client, ClientErrorEventArgs e) { var clientEventModel = new ClientEventModel { Username = client.CurrentUser.Username, UserDiscriminator = client.CurrentUser?.Discriminator, UserId = client.CurrentUser?.Id, }; (string message, object[] args) = clientEventModel.ToEventLogTuple(message: "Discord client error occurred."); client.Logger.LogError(DockordEventId.BotClientError, e.Exception, message, args); return(Task.CompletedTask); }