Exemple #1
0
        public async Task RepAuthor(int timeout = 24)
        {
            var userAccount = UserAccounts.GetAuthor();

            var commandUserAcc = UserAccounts.GetAccount(Context.User);

            var difference = DateTime.Now - commandUserAcc.LastGivenRep;

            if (difference.TotalHours < timeout)
            {
                embed.WithTitle("Rep");
                embed.WithDescription($"**{Context.User.Mention} you must wait {(int)(24 - difference.TotalHours)}h {(int)(60 - difference.TotalMinutes)}m {(int)(60 - difference.Seconds)}s " +
                                      $"before you can give rep again!**");
                embed.WithColor(Red);
                BE(); return;
            }
            else
            {
                userAccount.Rep++;
                commandUserAcc.LastGivenRep = DateTime.Now;
                UserAccounts.SaveAccounts();
                Console.WriteLine($"{Context.User.Username}#{Context.User.Discriminator} has given +1 rep to {userAccount.Username}");
                embed.WithTitle("+Rep Author");
                embed.WithDescription("**Successfully gave +1 rep to my creator** uwu.");
                embed.WithFooter("Thank you for showing your support <3");
                embed.WithColor(Pink);
                BE(); return;
            }
        }
Exemple #2
0
        [Command("author")] //utility
        public async Task Author()
        {
            string cmdPrefix = Servers.GetServer(Context.Guild).commandPrefix;

            var author = UserAccounts.GetAuthor();

            embed.WithTitle("Kaguya Author");
            embed.WithDescription($"Programmed with love by `{author.Username}` uwu");
            embed.WithFooter($"{author.Username} is level {author.LevelNumber} with {author.EXP} EXP and has +{author.Rep} rep!" +
                             $"\nTo +rep Stage, type `{cmdPrefix}rep author`!");
            embed.WithColor(Pink);
            BE();
        }
Exemple #3
0
        [Command("author")] //utility
        public async Task Author()
        {
            stopWatch.Start();
            string cmdPrefix = Servers.GetServer(Context.Guild).commandPrefix;

            var author = UserAccounts.GetAuthor();

            embed.WithTitle("Kaguya Author");
            embed.WithDescription($"Programmed with love by `{author.Username}` uwu");
            embed.WithFooter($"{author.Username} is level {author.LevelNumber} with {author.EXP} EXP and has +{author.Rep} rep!" +
                             $"\nTo +rep Stage, type `{cmdPrefix}rep author`!");
            embed.WithColor(Pink);
            await BE(); stopWatch.Stop();
            logger.ConsoleCommandLog(Context, stopWatch.ElapsedMilliseconds);
        }