Reorg third party services & config

This commit is contained in:
Max Isom 2021-09-19 19:50:25 -04:00
parent 79e7e88fab
commit efcdeb78c8
No known key found for this signature in database
GPG key ID: 25C9B1A7F6798880
10 changed files with 99 additions and 64 deletions

View file

@ -10,6 +10,7 @@ import handleGuildCreate from './events/guild-create';
import handleVoiceStateUpdate from './events/voice-state-update';
import errorMsg from './utils/error-msg';
import {isUserInVoice} from './utils/channels';
import Config from './services/config';
@injectable()
export default class {
@ -18,10 +19,10 @@ export default class {
private readonly token: string;
private readonly commands!: Collection<string, Command>;
constructor(@inject(TYPES.Client) client: Client, @inject(TYPES.Services.NaturalLanguage) naturalLanguage: NaturalLanguage, @inject(TYPES.Config.DISCORD_TOKEN) token: string) {
constructor(@inject(TYPES.Client) client: Client, @inject(TYPES.Services.NaturalLanguage) naturalLanguage: NaturalLanguage, @inject(TYPES.Config) config: Config) {
this.client = client;
this.naturalLanguage = naturalLanguage;
this.token = token;
this.token = config.DISCORD_TOKEN;
this.commands = new Collection();
}