示例#1
0
        public async Task SkipRadio(params string[] _)
        {
            if (Context.Guild == null)
            {
                await ReplyAsync(Base.Sentences.CommandDontPm(Context.Guild));

                return;
            }
            Utilities.CheckAvailability(Context.Guild, Program.Module.Radio);
            await p.DoAction(Context.User, Program.Module.Radio);

            RadioChannel radio = p.radios.Find(x => x.m_guildId == Context.Guild.Id);

            if (radio == null)
            {
                await ReplyAsync(Sentences.RadioNotStarted(Context.Guild));
            }
            else
            {
                bool succeed = await radio.Skip(Context.Channel);

                if (!succeed)
                {
                    await ReplyAsync(Sentences.RadioNoSong(Context.Guild));
                }
            }
        }
示例#2
0
        public async Task skipRadio(params string[] words)
        {
            p.doAction(Context.User, Context.Guild.Id, Program.Module.Radio);
            RadioChannel radio = p.radios.Find(x => x.m_guildId == Context.Guild.Id);

            if (radio == null)
            {
                await ReplyAsync(Sentences.radioNotStarted(Context.Guild.Id));
            }
            else
            {
                bool suceed = await radio.Skip(Context.Channel);

                if (!suceed)
                {
                    await ReplyAsync(Sentences.radioNoSong(Context.Guild.Id));
                }
            }
        }