예제 #1
0
파일: Register.cs 프로젝트: ZitaRR/Nix
        public async Task RegisterChannel(SocketGuildChannel channel)
        {
            if (channel is SocketCategoryChannel)
            {
                return;
            }

            await nixProvider.Channels.Store(channel.GetNixChannel());
        }
예제 #2
0
        public async Task <NixChannel> Get(SocketGuildChannel channel)
        {
            NixChannel nixChannel = await Get(channel.Id, channel.Guild.Id);

            if (nixChannel is null)
            {
                nixChannel = channel.GetNixChannel();
                await Store(nixChannel);

                return(nixChannel);
            }

            return(nixChannel);
        }
예제 #3
0
파일: Register.cs 프로젝트: ZitaRR/Nix
 public async Task UnregisterChannel(SocketGuildChannel channel)
 {
     await nixProvider.Channels.Remove(channel.GetNixChannel());
 }