Esempio n. 1
0
        private async Task SetMottoAsync([Remainder] string motto = null)
        {
            await Context.Message.DeleteAsync();

            while (!ProfileDatabase.Ready())
            {
                await Task.Delay(50);
            }

            LoriUser profile = ProfileDatabase.GetUser(Context.User.Id);

            if (profile == null)
            {
                await MessageUtil.SendErrorAsync((Context.Channel as ITextChannel), "Profile Not Found", $"That users profile could not be found?", false);

                return;
            }

            if (motto == null)
            {
                motto = "";
            }

            ProfileDatabase.SetUserMotto(Context.User.Id, motto);
            await ViewProfileAsync(Context, (Context.User as IUser));
        }