예제 #1
0
            public async Task Description([Remainder] string description = null)
            {
                var user = await _rp.GetRPUser(Context.User);

                if (user != null)
                {
                    if (description == null)
                    {
                        await ReplyAsync($"Your description is ```{user.Description}```");
                    }
                    else
                    {
                        user.Description = description;
                        await _rp.UpdateUser(user);
                        await ReplyAsync($"You description is now ```{user.Description}```");
                    }
                }
            }
예제 #2
0
        public async Task Like(IUser user)
        {
            if (user.Id == Context.User.Id)
            {
                await ReplyAsync("You can't like your own profile.");

                return;
            }
            var userg = await _rp.GetRPUser(Context.User);

            if (userg != null)
            {
                var target = await _rp.GetRPUser(user);

                if (target != null)
                {
                    target.Likes++;
                    await _rp.UpdateUser(target);
                    await ReplyAsync($"You liked the {user.Mention}'s profile  \\👍");
                }
                else
                {
                    await ReplyAsync($"{user.Mention} doesn't have an account.");  this.Context.CooldownCancelled = true;
                }
            }
            else
            {
                await ReplyAsync("... I can't find your account `hb!start`"); this.Context.CooldownCancelled = true;
            }
        }