コード例 #1
0
        private async Task <string> GetReportChanValue(string input)
        {
            if (input == "None")
            {
                return("None");
            }
            ITextChannel chan = await Context.Guild.GetTextChannelAsync(ulong.Parse(input));

            return(chan == null ? "Unknown (" + input + ")" : chan.ToString() + " (" + input + ")");
        }
コード例 #2
0
ファイル: Xp.cs プロジェクト: Doko-Demo-Doa/AsunaBot
        public async Task XpExclude(Channel _, [Leftover] ITextChannel channel = null)
        {
            if (channel == null)
            {
                channel = (ITextChannel)ctx.Channel;
            }

            var ex = _service.ToggleExcludeChannel(ctx.Guild.Id, channel.Id);

            await ReplyConfirmLocalizedAsync((ex ? "excluded" : "not_excluded"), Format.Bold(channel.ToString())).ConfigureAwait(false);
        }