Beispiel #1
0
        private async Task Profile(SocketGuildUser user)
        {
            ProfileEmbed pe = new ProfileEmbed(UserDataManager.GetUserData(user), user);

            UpdateUserNames(user);
            await pe.Display(Context.Channel);
        }
Beispiel #2
0
        public async Task ProfileAsync([Remainder] string username = "")
        {
            if (username == "")
            {
                // user's profile
                SocketGuildUser usr = BotUtils.GetGUser(Context);

                ProfileEmbed pe = new ProfileEmbed(UserDataManager.GetUserData(usr), usr);
                UpdateUserNames(usr);
                await pe.Display(Context.Channel);

                return;
            }

            // else, the requested user's profile

            List <SocketGuildUser> users = BotUtils.GetUser(Context.Message);

            if (users.Count == 0)
            {
                await ReplyAsync(BotUtils.KamtroText("I can't find a user with that name, make sure the name is spelt correctly!"));

                return;
            }
            else if (users.Count > 10)
            {
                await ReplyAsync(BotUtils.KamtroText("Please be more specific! You can attach a discriminator if you need to (Username#1234)"));

                return;
            }
            else if (users.Count == 1)
            {
                await Profile(users[0]);
            }
            else
            {
                UserSelectionEmbed use = new UserSelectionEmbed(users, Profile, BotUtils.GetGUser(Context));
                await use.Display(Context.Channel);
            }
        }