Example #1
0
        public EmbedList(IMessageChannel channel, AudioService service)
        {
            Service = service;

            _totalPages = (uint)Math.Ceiling((Service.GetAvailableFiles().Count() / (double)_songsPerPage));

            Message = channel.SendMessageAsync("", embed: GetPage(0)).GetAwaiter().GetResult();
            Task.Run(async() =>
            {
                await Message.AddReactionAsync(EFirst).ConfigureAwait(false);
                await Message.AddReactionAsync(EBack).ConfigureAwait(false);
                await Message.AddReactionAsync(ENext).ConfigureAwait(false);
                await Message.AddReactionAsync(ELast).ConfigureAwait(false);
                await Message.AddReactionAsync(EDelete).ConfigureAwait(false);
            }).GetAwaiter().GetResult();
        }
 public virtual Task ListCmd()
 {
     return(ReplyAsync($"```\n{String.Join("\n", _service.GetAvailableFiles())}\n```"));
 }