예제 #1
0
        public async Task Enter([Remainder] string text)
        {
            ContextIds ids          = new ContextIds(Context);
            var        user         = UserHandler.GetUser(ids.UserId);
            var        originalText = text;

            text = text.ToLower();

            /* PROMPT STATE MEANINGS-
             * -1- Has no character
             * 0- Awaiting confirmation or cancellation of character creation
             * 1- Character creation confirmed. Awaiting name.
             * 2- Name confirmed. Awaiting partner.
             */
            switch (user.PromptState)
            {
            case 0:
                if (text.Equals("confirm"))
                {
                    user.Char = new Character(true);
                    user.Char.CurrentGuildId   = ids.GuildId;
                    user.Char.CurrentGuildName = Context.Guild.Name;
                    user.PromptState           = 1;
                    await MessageHandler.SendMessage(ids, $"Beginning character creation for {user.Mention}.\nWhat is your name? (use the \"enter\" command to enter your name)");
                }
                else if (text.Equals("cancel"))
                {
                    user.PromptState = -1;
                    await MessageHandler.SendMessage(ids, $"Character creation cancelled for {user.Mention}.");
                }
                else
                {
                    await MessageHandler.SendMessage(ids, $"{user.Mention}, I'm sorry, but I don't recognize that. Please enter \"confirm\" or \"cancel\"");
                }
                break;

            case 1:
                if (text.Length <= 32 && text.Length > 0)
                {
                    user.Char.Name   = originalText;
                    user.PromptState = 2;
                    await MessageHandler.SendMessage(ids, $"{user.Mention}, your character's name is now {originalText}. Now you must choose your partner.");

                    await Context.Channel.SendMessageAsync(
                        "", embed : MonEmbedBuilder.MonDex(new Snoril(true)))
                    .ConfigureAwait(false);

                    await Context.Channel.SendMessageAsync(
                        "", embed : MonEmbedBuilder.MonDex(new Suki(true)))
                    .ConfigureAwait(false);
                }
                else
                {
                    await MessageHandler.SendMessage(ids, $"{user.Mention}, your name must be 32 characters or less.");
                }
                break;

            case 2:
                if (text.Equals("snoril") || text.Equals("1"))
                {
                    user.Char.Party.Add(new Snoril(true)
                    {
                        CatcherID = user.UserId,
                        OwnerID   = user.UserId
                    });
                    user.HasCharacter = true;
                    await MessageHandler.SendMessage(ids, $"{user.Mention}, you have chosen Snoril as your partner! Good luck on your adventure.");
                }
                else if (text.Equals("suki") || text.Equals("2"))
                {
                    user.Char.Party.Add(new Suki(true)
                    {
                        CatcherID = user.UserId,
                        OwnerID   = user.UserId
                    });
                    user.HasCharacter = true;
                    await MessageHandler.SendMessage(ids, $"{user.Mention}, you have chosen Suki as your partner! Good luck on your adventure.");
                }
                else
                {
                    await MessageHandler.SendMessage(ids, $"{user.Mention}, please enter either Snoril or Suki.");
                }
                break;
            }
        }
예제 #2
0
        public async Task ModifyAsyncTest()
        {
            ContextIds idList = new ContextIds(Context);

            await MessageHandler.ModifyAsyncTest(idList, Context.User.Id);
        }
예제 #3
0
        public async Task EmojiTest()
        {
            ContextIds idList = new ContextIds(Context);

            await MessageHandler.EmojiTest(idList);
        }
예제 #4
0
        public async Task GetIds()
        {
            ContextIds idList = new ContextIds(Context);

            await MessageHandler.SendMessage(idList, $"Guild ID: {idList.GuildId}\nChannel ID: {idList.ChannelId}\nMessage ID:{idList.MessageId}");
        }
예제 #5
0
        public async Task Whisper()
        {
            ContextIds idList = new ContextIds(Context);

            await MessageHandler.MoveScreen(idList.UserId);
        }