mirror of
https://github.com/UiO-Gaming/ShiteMusicBot.git
synced 2026-11-06 14:24:30 +01:00
Merge pull request #39 from r-Norge/feature/add_bot_intents
Request all intents so the bot works...
This commit is contained in:
1 file changed
+5
-3
@@ -1,7 +1,7 @@
|
||||
# Discord Packages
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
from discord.flags import Intents, MemberCacheFlags
|
||||
from discord.flags import MemberCacheFlags
|
||||
|
||||
import codecs
|
||||
import os
|
||||
@@ -42,10 +42,12 @@ def _get_prefix(bot, message):
|
||||
|
||||
class Bot(commands.Bot):
|
||||
def __init__(self, datadir, debug: bool = False):
|
||||
intents = discord.Intents.all()
|
||||
super().__init__(command_prefix=_get_prefix,
|
||||
description=conf["bot"]["description"],
|
||||
intents=Intents(members=True, presences=True, voice_states=True),
|
||||
member_cache_flags=MemberCacheFlags().all())
|
||||
intents=intents,
|
||||
member_cache_flags=MemberCacheFlags.from_intents(intents)
|
||||
)
|
||||
|
||||
self.settings = Settings(datadir, **conf['default server settings'])
|
||||
self.APIkeys = conf.get('APIkeys', {})
|
||||
|
||||
Reference in new issue
Block a user