Exemplo n.º 1
0
        public async Task GetAction([Remainder] string Name = null)
        {
            Character c = null;

            if (!Name.NullorEmpty() && Name.ToLower().EndsWith("-c"))
            {
                Name = Name.Replace("-c", "");
                c    = GetCompanion();

                if (c == null)
                {
                    await ReplyAsync("You have no active companion.");

                    return;
                }
            }
            else
            {
                c = GetCharacter();

                if (c == null)
                {
                    await ReplyAsync("You have no active character.");

                    return;
                }
            }

            if (Name.NullorEmpty())
            {
                var fs = await SheetService.GetAllActions(c, Context);

                if (fs == null)
                {
                    await ReplyAsync(c.Name + " has no Activities.");

                    return;
                }
                await ReplyAsync("", fs);

                return;
            }

            var f = await SheetService.GetAction(c, Name, Context);

            if (f == null)
            {
                await ReplyAsync(c.Name + " has no activity that start with that name.");

                return;
            }
            await ReplyAsync("", f);

            return;
        }