Example #1
0
            public Bot()
            {
                BotUser = new DiscordClient(x =>
                {
                    x.LogLevel = LogSeverity.Info;
                });
                BotUser.Log.Message += (s, e) => Console.WriteLine($"[{e.Severity}] {e.Source}: {e.Message}");

                BotUser.UsingCommands(x =>
                {
                    x.PrefixChar         = '-';
                    x.AllowMentionPrefix = true;
                });
                commands = BotUser.GetService <CommandService>();
                RoleManagementCommands    rmc = new RoleManagementCommands(BotUser, commands);
                AccountManagementCommands amc = new AccountManagementCommands(BotUser, commands);
                RoleManagementTrigger     roleManagementTrigger = new RoleManagementTrigger(BotUser, commands);
                RegionCommands            regionCommands        = new RegionCommands(BotUser, commands);
                RoleCommand          roleCommand        = new RoleCommand(BotUser, commands);
                ManagementTools      managementTools    = new ManagementTools(BotUser, commands);
                ServerInfoCommands   serverInfoCommands = new ServerInfoCommands(BotUser, commands);
                MasteryCommands      masteryCommands    = new MasteryCommands(BotUser, commands);
                ServerManagement     serverManagement   = new ServerManagement(BotUser, commands);
                RankCommands         rankCommands       = new RankCommands(BotUser, commands);
                SummonerInfo         summonerInfo       = new SummonerInfo(commands);
                BotManagement        botManagement      = new BotManagement(commands, BotUser);
                Interaction          inter               = new Interaction(BotUser, commands);
                CreateRoles          createRoles         = new CreateRoles(commands);
                Matchmaking_Settings matchmakingSettings = new Matchmaking_Settings(commands);
                CoachCommands        coachCommands       = new CoachCommands(commands);
                Stopwatch            stopwatch           = new Stopwatch();

                stopwatch.Start();
                MatchmakingTrigger  trigger             = new MatchmakingTrigger(BotUser, commands);
                MatchmakingCommands matchmakingCommands = new MatchmakingCommands(commands, BotUser, trigger);

                new HelpCommand(BotUser, commands);
                Task.Run(() => trigger.TimedClear(stopwatch));
                matchmakingCommands.CreateCommands();
                matchmakingSettings.ChannelSettings();
                coachCommands.CreateCommands();
                createRoles.CreateRank();
                summonerInfo.SelfInfo();
                summonerInfo.OtherInfo();
                serverManagement.ServerAdded();
                serverManagement.VerifyServer();
                serverInfoCommands.InviteLink();
                amc.ClaimAccount();
                amc.Claim();
                rankCommands.GetRank();
                new Universal_Role(BotUser, commands).UniversalRole();
                regionCommands.GetRegion();
                roleCommand.GetRole();
                rmc.Update();
                rmc.GetRoles();
                managementTools.ChangeType();
                managementTools.ChangeCommandAllowed();
                managementTools.OverrideSystem();
                serverInfoCommands.ServerInfo();
                serverInfoCommands.Description();
                serverManagement.CheckForNewServer();
                managementTools.Admin();
                roleCommand.GetRoleParameter();
                Legal();
                roleManagementTrigger.JoiningRoleGive();
                masteryCommands.GetMasteryPoints();
                managementTools.AdminMastery();

                Test();
                BotUser.ExecuteAndWait(async() =>
                {
                    await BotUser.Connect(global::Keys.Keys.discordKey, TokenType.Bot);
                });
            }