/[sudobot]/trunk/src/client/Client.ts
ViewVC logotype

Diff of /trunk/src/client/Client.ts

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 227 by rakin, Mon Jul 29 17:29:07 2024 UTC revision 234 by rakin, Mon Jul 29 17:29:08 2024 UTC
# Line 24  import Verification from '../services/Ve Line 24  import Verification from '../services/Ve
24  import Welcomer from '../services/Welcomer';  import Welcomer from '../services/Welcomer';
25  import Antijoin from '../automod/Antijoin';  import Antijoin from '../automod/Antijoin';
26  import Automute from '../automod/Automute';  import Automute from '../automod/Automute';
27    import ServiceManager from './ServiceManager';
28    
29  export default class DiscordClient extends Client {  export default class DiscordClient extends Client {
30      private _commands = new Collection<string, BaseCommand>();      private _commands = new Collection<string, BaseCommand>();
# Line 35  export default class DiscordClient exten Line 36  export default class DiscordClient exten
36    
37      config: Config;      config: Config;
38      db: Database;      db: Database;
     logger: Logger;  
     snippetManager: SnippetManager;  
     afkEngine: AFKEngine;  
     auth: Auth;  
     spamFilter: SpamFilter;  
     messageFilter: MessageFilter;  
     antiraid: AntiRaid;  
     starboard: Starboard;  
39      server: Server;      server: Server;
40      cooldown: Cooldown;      serviceManager: ServiceManager;
41      startupManager: StartupManager;  
42      autoClear: AutoClear;      logger: Logger = {} as Logger;
43      randomStatus: RandomStatus;      snippetManager: SnippetManager = {} as SnippetManager;
44      debugLogger: DebugLogger;      afkEngine: AFKEngine = {} as AFKEngine;
45      verification: Verification;      auth: Auth = {} as Auth;
46      welcomer: Welcomer;      spamFilter: SpamFilter = {} as SpamFilter;
47      antijoin: Antijoin;      messageFilter: MessageFilter = {} as MessageFilter;
48      automute: Automute;      antiraid: AntiRaid = {} as AntiRaid;
49        starboard: Starboard = {} as Starboard;
50        cooldown: Cooldown = {} as Cooldown;
51        startupManager: StartupManager = {} as StartupManager;
52        autoClear: AutoClear = {} as AutoClear;
53        randomStatus: RandomStatus = {} as RandomStatus;
54        debugLogger: DebugLogger = {} as DebugLogger;
55        verification: Verification = {} as Verification;
56        welcomer: Welcomer = {} as Welcomer;
57        antijoin: Antijoin = {} as Antijoin;
58        automute: Automute = {} as Automute;
59    
60        aliases = {
61            automod: path.resolve(__dirname, '..', 'automod'),
62            services: path.resolve(__dirname, '..', 'services'),
63        };
64    
65        services = {
66            "@automod/Logger": "logger",
67            "@services/SnippetManager": "snippetManager",
68            "@services/AFKEngine": "afkEngine",
69            "@services/Auth": "auth",
70            "@automod/SpamFilter": "spamFilter",
71            "@automod/MessageFilter": "messageFilter",
72            "@automod/AntiRaid": "antiraid",
73            "@services/Starboard": "starboard",
74            "@automod/Cooldown": "cooldown",
75            "@services/StartupManager": "startupManager",
76            "@automod/AutoClear": "autoClear",
77            "@services/RandomStatus": "randomStatus",
78            "@services/DebugLogger": "debugLogger",
79            "@services/Verification": "verification",
80            "@services/Welcomer": "welcomer",
81            "@automod/Antijoin": "antijoin",
82            "@automod/Automute": "automute",
83        };
84    
85      static client: DiscordClient;      static client: DiscordClient;
86    
# Line 74  export default class DiscordClient exten Line 102  export default class DiscordClient exten
102    
103          this.config = new Config(this);          this.config = new Config(this);
104          this.db = new Database(path.resolve(rootdir, 'database.db'), this);          this.db = new Database(path.resolve(rootdir, 'database.db'), this);
105          this.logger = new Logger(this);          this.serviceManager = new ServiceManager(this, this.aliases);
106          this.snippetManager = new SnippetManager(this);          this.serviceManager.load(this.services);
107          this.afkEngine = new AFKEngine(this);  
108          this.auth = new Auth(this);          // this.logger = new Logger(this);
109          this.spamFilter = new SpamFilter(this);          // this.snippetManager = new SnippetManager(this);
110          this.messageFilter = new MessageFilter(this);          // this.afkEngine = new AFKEngine(this);
111          this.antiraid = new AntiRaid(this);          // this.auth = new Auth(this);
112          this.starboard = new Starboard(this);          // this.spamFilter = new SpamFilter(this);
113            // this.messageFilter = new MessageFilter(this);
114            // this.antiraid = new AntiRaid(this);
115            // this.starboard = new Starboard(this);
116            // this.cooldown = new Cooldown(this);
117            // this.startupManager = new StartupManager(this);
118            // this.autoClear = new AutoClear(this);
119            // this.randomStatus = new RandomStatus(this);
120            // this.debugLogger = new DebugLogger(this);
121            // this.verification = new Verification(this);
122            // this.welcomer = new Welcomer(this);
123            // this.antijoin = new Antijoin(this);
124            // this.automute = new Automute(this);
125    
126          this.server = new Server(this);          this.server = new Server(this);
         this.cooldown = new Cooldown(this);  
         this.startupManager = new StartupManager(this);  
         this.autoClear = new AutoClear(this);  
         this.randomStatus = new RandomStatus(this);  
         this.debugLogger = new DebugLogger(this);  
         this.verification = new Verification(this);  
         this.welcomer = new Welcomer(this);  
         this.antijoin = new Antijoin(this);  
         this.automute = new Automute(this);  
127                    
128          discordModals(this);                  discordModals(this);        
129      }      }

Legend:
Removed from v.227  
changed lines
  Added in v.234

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26