示例#1
0
        private void SelectGuild()
        {
            var guilds = _miunie.Impersonation.GetAvailableGuilds();
            var menu   = new ConsoleMenu <GuildView>(guilds, g => g.Name);

            menu.SetTitle(ConsoleStrings.SELECT_GUILD);
            _currentGuild = menu.Present();
        }
示例#2
0
        private async Task SelectChannelAsync()
        {
            var channels = await _miunie.Impersonation.GetAvailableTextChannelsAsync(_currentGuild.Id);

            var menu = new ConsoleMenu <TextChannelView>(channels, c => c.Name + (c.CanSendMessages ? string.Empty : " (read only)"));

            menu.SetTitle(ConsoleStrings.SELECT_CHANNEL);
            _currentChannel = menu.Present();
        }