public async Task UnregisterGuild(SocketGuild guild) { await nixProvider.Guilds.Remove(guild.GetNixGuild()); foreach (SocketGuildChannel channel in guild.Channels) { await UnregisterChannel(channel); } foreach (SocketGuildUser user in guild.Users) { await UnregisterUser(user); } }
public async Task <NixGuild> Get(SocketGuild guild) { NixGuild nixGuild = await Get(guild.Id); if (nixGuild is null) { nixGuild = guild.GetNixGuild(); await Store(nixGuild); return(nixGuild); } return(nixGuild); }