示例#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());
 }