private async Task AnnounceTipsInNewGuild(GuildConfig guildConfig, bool importExistingBans) { if (!string.IsNullOrEmpty(guildConfig.ModInternalNotificationWebhook)) { _logger.LogInformation($"Sending internal tips webhook to {guildConfig.ModInternalNotificationWebhook} for guild {guildConfig.GuildId}."); try { using var scope = _serviceProvider.CreateScope(); EmbedBuilder embed = await guildConfig.CreateTipsEmbedForNewGuilds(scope.ServiceProvider); await _discordAPI.ExecuteWebhook(guildConfig.ModInternalNotificationWebhook, embed.Build(), null); } catch (Exception e) { _logger.LogError(e, $"Error while announcing tips to {guildConfig.ModInternalNotificationWebhook} for guild {guildConfig.GuildId}."); } } }