Can someone help me? I keep getting this error message when I try to start up my discord bot.
JavaScript
x
2
1
[2022-08-23 14:32:12] [WARNING ] discord.ext.commands.bot: Privileged message content intent is missing, commands may not work as expected.
2
This is the code for the bot and after this is just commands and events and client.run(My_Token)
JavaScript
1
21
21
1
import os
2
import random
3
import discord
4
from discord.ext import commands
5
from discord.ext import tasks
6
from discord.ext.commands import has_permissions, MissingPermissions
7
from discord.utils import get
8
from itertools import cycle
9
import json
10
import random
11
12
13
intents = discord.Intents.default()
14
intents.members = True
15
intents.typing = True
16
intents.presences = True
17
18
client = commands.Bot(command_prefix = "?", intents=intents)
19
client.remove_command('help')
20
status = cycle(["Minecraft", "Roblox", "Yo-Kai Watch"])
21
Advertisement
Answer
You’ve got to change
JavaScript
1
2
1
intents = discord.Intents.default()
2
to
JavaScript
1
2
1
intents = discord.Intents.all()
2
It was an unmentioned change in the v2.0 discord.py update. https://discordpy.readthedocs.io/en/latest/migrating.html