mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-06-28 01:32:42 +02:00
fix command permission handling and push discord to v10 (#640)
Co-authored-by: Max Isom <hi@maxisom.me>
This commit is contained in:
parent
1ef05aba9d
commit
eb2885b206
38 changed files with 1214 additions and 644 deletions
|
@ -2,7 +2,7 @@ import 'reflect-metadata';
|
|||
import {Container} from 'inversify';
|
||||
import {TYPES} from './types.js';
|
||||
import Bot from './bot.js';
|
||||
import {Client, Intents} from 'discord.js';
|
||||
import {Client, GatewayIntentBits} from 'discord.js';
|
||||
import ConfigProvider from './services/config.js';
|
||||
|
||||
// Managers
|
||||
|
@ -41,12 +41,10 @@ import KeyValueCacheProvider from './services/key-value-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)
|
||||
const intents: GatewayIntentBits[] = [];
|
||||
intents.push(GatewayIntentBits.Guilds); // To listen for guildCreate event
|
||||
intents.push(GatewayIntentBits.GuildMessageReactions); // To listen for message reactions (messageReactionAdd event)
|
||||
intents.push(GatewayIntentBits.GuildVoiceStates); // To listen for voice state changes (voiceStateUpdate event)
|
||||
|
||||
// Bot
|
||||
container.bind<Bot>(TYPES.Bot).to(Bot).inSingletonScope();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue