示例#1
0
 public async Task listRadio(params string[] words)
 {
     p.doAction(Context.User, Context.Guild.Id, Program.Module.Radio);
     if (!p.radios.Any(x => x.m_guildId == Context.Guild.Id))
     {
         await ReplyAsync(Sentences.radioNotStarted(Context.Guild.Id));
     }
     else
     {
         await ReplyAsync(p.radios.Find(x => x.m_guildId == Context.Guild.Id).GetPlaylist(Context.Guild.Id));
     }
 }
示例#2
0
        public async Task stopRadio(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
            {
                await radio.Stop();

                p.radios.Remove(radio);
                await ReplyAsync(Sentences.doneStr(Context.Guild.Id));
            }
        }
示例#3
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));
                }
            }
        }