コード例 #1
0
 public async Task NinjaShow(SocketUser user)
 {
     try {
         await ReplyAsync("", false, NinjaProfile.GetOrCreate(user.Id).CreateEmbed(Context.Client));
     } catch (Exception e) {
         await ReplyAsync(e.Message + "\n```\n" + e.StackTrace + "\n```");
     }
 }
コード例 #2
0
        public async Task NinjaNoPrestige(SocketUser user, int exp)
        {
            if (!Context.User.IsAdmin())
            {
                await ReplyAsync("Sorry, only admins can use this command.");

                return;
            }

            NinjaProfile.GetOrCreate(user.Id).Tokens = 0;
        }
コード例 #3
0
        public async Task NinjaGive(SocketUser user, int exp)
        {
            if (!Context.User.IsAdmin())
            {
                await ReplyAsync("Sorry, only admins can use this command.");

                return;
            }

            NinjaProfile.GetOrCreate(user.Id)?.GiveExp(exp);
        }
コード例 #4
0
        public async Task NinjaPrestige()
        {
            var profile = NinjaProfile.GetOrCreate(Context.User.Id);
            var result  = profile.Prestige();

            if (result == 0)
            {
                await ReplyAsync("Pfft... level up a bit!");
            }
            else
            {
                await ReplyAsync("You have obtained " + result + " prestige token(s)! " +
                                 "You feel like you are able to learn faster now...");
            }
        }
コード例 #5
0
        public async Task Ninja(SocketUser user)
        {
            ulong challenger = Context.User.Id, defender = user.Id;

            if (challenger == defender)
            {
                await ReplyAsync("Hey... you can't challenge yourself!");
            }
            else if (NinjaProfile.GetOrCreate(challenger).Game != null ||
                     NinjaProfile.GetOrCreate(defender).Game != null)
            {
                await ReplyAsync("One of you are still engaged in combat. Wait for your next chance to attack!");
            }
            else
            {
                NinjaGame.Games.Add(new NinjaGame(challenger, defender, Context.Channel));
            }
        }
コード例 #6
0
 public async Task NinjaChangeMessage([Remainder] string message)
 {
     NinjaProfile.GetOrCreate(Context.User.Id).ChallengeMessage = message;
     await ReplyAsync("Your challenge message has been changed!");
 }