diff options
| author | Max Isom <[email protected]> | 2021-11-17 16:07:29 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-11-17 16:07:29 -0500 |
| commit | 41b050a2f1fe4e2cb94629e2add1b490a69a2004 (patch) | |
| tree | 78a10ca06380acfa6a114b734b206325b06610ad /src/inversify.config.ts | |
| parent | a4e67d63839154916783e7b4a5f6c65006e759f3 (diff) | |
| parent | 96bf53b28a9cfa30e1d171ae0539f52fd926e1c2 (diff) | |
| download | muse-41b050a2f1fe4e2cb94629e2add1b490a69a2004.tar.xz muse-41b050a2f1fe4e2cb94629e2add1b490a69a2004.zip | |
Merge pull request #397 from Hellysonrp/discord-js-v13
Diffstat (limited to 'src/inversify.config.ts')
| -rw-r--r-- | src/inversify.config.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/inversify.config.ts b/src/inversify.config.ts index 00a2507..b45c588 100644 --- a/src/inversify.config.ts +++ b/src/inversify.config.ts @@ -2,7 +2,7 @@ import 'reflect-metadata'; import {Container} from 'inversify'; import {TYPES} from './types.js'; import Bot from './bot.js'; -import {Client} from 'discord.js'; +import {Client, Intents} from 'discord.js'; import ConfigProvider from './services/config.js'; // Managers @@ -32,9 +32,17 @@ import CacheProvider from './services/cache.js'; const container = new Container(); +// Intents +const intents = new Intents(); +intents.add(Intents.FLAGS.GUILDS); // To listen for guildCreate event +intents.add(Intents.FLAGS.GUILD_MESSAGES); // To listen for messages (messageCreate event) +intents.add(Intents.FLAGS.DIRECT_MESSAGE_REACTIONS); // To listen for message reactions (messageReactionAdd event) +intents.add(Intents.FLAGS.DIRECT_MESSAGES); // To receive the prefix message +intents.add(Intents.FLAGS.GUILD_VOICE_STATES); // To listen for voice state changes (voiceStateUpdate event) + // Bot container.bind<Bot>(TYPES.Bot).to(Bot).inSingletonScope(); -container.bind<Client>(TYPES.Client).toConstantValue(new Client()); +container.bind<Client>(TYPES.Client).toConstantValue(new Client({intents})); // Managers container.bind<PlayerManager>(TYPES.Managers.Player).to(PlayerManager).inSingletonScope(); |
