/[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 81 by rakin, Mon Jul 29 17:28:31 2024 UTC revision 127 by rakin, Mon Jul 29 17:28:42 2024 UTC
# Line 5  import { Config } from './Config'; Line 5  import { Config } from './Config';
5  import Database from './Database';  import Database from './Database';
6  import path from 'path';  import path from 'path';
7  import Logger from '../automod/Logger';  import Logger from '../automod/Logger';
 import SpamFilter from '../automod/SpamFilter';  
8  import SnippetManager from '../services/SnippetManager';  import SnippetManager from '../services/SnippetManager';
9  import AFKEngine from '../services/AFKEngine';  import AFKEngine from '../services/AFKEngine';
10  import Auth from '../services/Auth';  import Auth from '../services/Auth';
# Line 20  import RandomStatus from '../services/Ra Line 19  import RandomStatus from '../services/Ra
19  import DebugLogger from '../services/DebugLogger';  import DebugLogger from '../services/DebugLogger';
20  import BaseCLICommand from '../utils/structures/BaseCLICommand';  import BaseCLICommand from '../utils/structures/BaseCLICommand';
21  import discordModals from 'discord-modals';  import discordModals from 'discord-modals';
22    import SpamFilter from '../automod/SpamFilter';
23    import Verification from '../services/Verification';
24    
25  export default class DiscordClient extends Client {  export default class DiscordClient extends Client {
26      private _commands = new Collection<string, BaseCommand>();      private _commands = new Collection<string, BaseCommand>();
# Line 45  export default class DiscordClient exten Line 46  export default class DiscordClient exten
46      autoClear: AutoClear;      autoClear: AutoClear;
47      randomStatus: RandomStatus;      randomStatus: RandomStatus;
48      debugLogger: DebugLogger;      debugLogger: DebugLogger;
49        verification: Verification;
50    
51      static client: DiscordClient;      static client: DiscordClient;
52    
53      constructor(options: ClientOptions, rootdir: string = __dirname) {      constructor(options: ClientOptions, rootdir: string = __dirname) {
54          super({          super({
55              ws: {              ws: {
56                  properties: {                  properties: {
57                      $browser: "Discord iOS"                      $browser: "Discord iOS"
58                  }                  }
59              },              },
60              ...options              ...options
61          });          });
62            
63            console.log('init');        
64    
65          this.rootdir = rootdir;          this.rootdir = rootdir;
66            
67            DiscordClient.client = this;
68    
69          this.config = new Config(this);          this.config = new Config(this);
70          this.db = new Database(path.resolve(rootdir, 'database.db'), this);          this.db = new Database(path.resolve(rootdir, 'database.db'), this);
# Line 76  export default class DiscordClient exten Line 82  export default class DiscordClient exten
82          this.autoClear = new AutoClear(this);          this.autoClear = new AutoClear(this);
83          this.randomStatus = new RandomStatus(this);          this.randomStatus = new RandomStatus(this);
84          this.debugLogger = new DebugLogger(this);          this.debugLogger = new DebugLogger(this);
85            this.verification = new Verification(this);
86                    
87          DiscordClient.client = this;          discordModals(this);        
         discordModals(this);  
88      }      }
89    
90      get commands(): Collection<string, BaseCommand> {      get commands(): Collection<string, BaseCommand> {

Legend:
Removed from v.81  
changed lines
  Added in v.127

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26