Ejemplo n.º 1
0
        private static async Task DisplayList(ISocketMessageChannel context)
        {
            if (_trackedList != null)
            {
                await _trackedList.DeleteMessage();
            }

            var msg = "```diff\r\n";

            for (int i = 10 * _indx; i < (i + 10 > _listContents.Count() ? _listContents.Count() : i + 10); i++)
            {
                msg += $"-{_listContents[i]}\r\n";
            }
            msg += "```";

            _trackedList = await context.SendMessageAsync(msg);

            await _trackedList.RemoveReactions();

            await _trackedList.AddNavigations(_indx, (int)Math.Ceiling((decimal)_listContents.Count() / 10));
        }