/// <summary> /// Used to register any guild added while the bot was offline. /// </summary> /// <returns></returns> private async Task RegisterNewGuilds() { var guildIds = _discord.Guilds.Select(guild => guild.Id); await _guildFactory.Insert(guildIds); }
/// <summary> /// Handles the on guild joined event. /// Every guild that joins has to ge registered in the database. /// </summary> /// <param name="socketGuild">socketGuild event</param> /// <returns></returns> private async Task OnGuildJoin(SocketGuild socketGuild) { await _guildFactory.Insert(socketGuild.Id); await UpdateBotStatus(); }