コード例 #1
0
ファイル: Misc.cs プロジェクト: ThomasBeHappy/Random-Shit-Bot
        public async Task OpenInventoryAsync()
        {
            var inventory = UserAcounts.GetAcount(Context.User);

            EmbedBuilder builder = new EmbedBuilder();

            foreach (var item in inventory.inventory)
            {
                builder.AddInlineField("Item", item.name + " | " + item.description + Environment.NewLine);
            }

            await ReplyAsync("", false, builder.Build());
        }
コード例 #2
0
ファイル: Misc.cs プロジェクト: ThomasBeHappy/Random-Shit-Bot
        public async Task GetDailyShit()
        {
            UserAcount userAcount = UserAcounts.GetOrCreateAcount(Context.User.Id);

            if (DateTime.Now >= userAcount.DailyBucksReset)
            {
                userAcount.DailyBucksReset = DateTime.Now.AddDays(1);
                userAcount.Money          += 200;
                await ReplyAsync("**FART**, Here is your daily Shit! **200 shit bucks received!**");

                UserAcounts.SaveAcounts();
            }
            else
            {
                TimeSpan Remaining = userAcount.DailyBucksReset - DateTime.Now;
                await ReplyAsync("Sorry! i cant give it to you yet! i have not taken a shit yet! You gotta wait: " + Remaining.ToString(@"hh\:mm\:ss"));
            }
        }
コード例 #3
0
ファイル: Misc.cs プロジェクト: ThomasBeHappy/Random-Shit-Bot
        public async Task additemasync(params string[] args)
        {
            var inventory = UserAcounts.GetOrCreateAcount(Context.User.Id);


            foreach (var word in args)
            {
            }

            Item item = new Item();

            item.name        = args[0];
            item.description = "";
            item.costs       = Convert.ToUInt64(args[args.Length - 1]);
            inventory.inventory.Add(item);

            UserAcounts.SaveAcounts();
        }
コード例 #4
0
ファイル: Misc.cs プロジェクト: ThomasBeHappy/Random-Shit-Bot
        public async Task GiveBallAsync(params string[] args)
        {
            UserAcount userAcount  = UserAcounts.GetOrCreateAcount(Context.Message.MentionedUsers.First().Id);
            UserAcount userAcount2 = UserAcounts.GetOrCreateAcount(Context.User.Id);

            if (userAcount2.Money >= Convert.ToUInt32(args[1]))
            {
                userAcount.Money  += Convert.ToUInt32(args[1]);
                userAcount2.Money -= Convert.ToUInt32(args[1]);

                await ReplyAsync(Context.User.Username + " Just gave " + Context.Message.MentionedUsers.First().Username + " " + args[1] + " Shit Bucks");

                UserAcounts.SaveAcounts();
            }
            else
            {
                await ReplyAsync("Not enough Shitty Bucks!");
            }
        }
コード例 #5
0
ファイル: Misc.cs プロジェクト: ThomasBeHappy/Random-Shit-Bot
        public async Task WorkAsync(params string[] work)
        {
            Random     random     = new Random();
            UserAcount userAcount = UserAcounts.GetOrCreateAcount(Context.User.Id);

            if (DateTime.Now >= userAcount.WorkReset)
            {
                userAcount.WorkReset = DateTime.Now.AddMinutes(30);
                uint Salaris = Convert.ToUInt32(random.Next(10, 50));
                userAcount.Money += Salaris;
                await ReplyAsync("You just worked and received " + Salaris + " Shit bucks!");

                UserAcounts.SaveAcounts();
            }
            else
            {
                TimeSpan Remaining = userAcount.WorkReset - DateTime.Now;
                await ReplyAsync("You cant work yet you gotta take a pause! You have to wait: " + Remaining.ToString(@"hh\:mm\:ss"));
            }
        }
コード例 #6
0
ファイル: Misc.cs プロジェクト: ThomasBeHappy/Random-Shit-Bot
 public async Task ShowBallAsync()
 {
     await ReplyAsync("You have " + UserAcounts.GetOrCreateAcount(Context.User.Id).Money + " Shit Bucks!");
 }