Esempio n. 1
0
        public async Task getfeature([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.GetAllFeatures(c, Context);

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

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

                return;
            }

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

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

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

            return;
        }