1

So I was first running my code on replit.com and I decided to switch over to running it localy on my computer. I got it running on Python IDLE 3.10.1 and then I decided to run it on VS Code with the same interpreter and then I got an error:

TypeError: Client.__init__() missing 1 required keyword-only argument: 'intents'

On this line of code:

client = discord.Client()

And this line of code was working both on replit and on IDLE and after running it on VS code it stopped running on IDLE aswell. And after I fixed the error with this I found on stack overflow:

client = discord.Client(intents=discord.Intents.default())

The bot seems to be running in the console, but in reality it isn't running because it isn't responding to my commands.

I also get these weird messages before the bot "starts":

TLDR; Running discord bot on replit, switched to Python IDLE 3.10.1 kept working, switched to VS Code error appeared, fixed error, bot not working anymore on IDLE and VS Code.

Mongonesa
  • 35
  • 3

1 Answers1

-2

Try this :)

from discord.ext import commands

botDescription="Bot"
intents = discord.Intents.all()
client = commands.Bot(command_prefix="?", help_command=None, description=botDescription, intents=intents)

The Bot it self need the right to handle intents. Go to discord.com/developers/applications > Bot > SERVER MEMBERS INTENT > True

  • Doesn't help :/. I get "PrivilegedIntentsRequired" error. And when I replaced intents with .default() instead of .all() the bot still "works", but still doesn't respond to my commands. – Mongonesa Jul 08 '22 at 06:36
  • The Bot it self need the right to handle intents. Go to https://discord.com/developers/applications/ > Bot > SERVER MEMBERS INTENT > True – DasMoorhuhn Jul 08 '22 at 07:52
  • 1
    Please don't just answer with a code snippet. Try to give some explanation. And don't bury further information in the comments, instead edit your answer to include it. – H3AR7B3A7 Jul 08 '22 at 18:56
  • Oh okee thanks for that information, i'm new on stackoverflow – DasMoorhuhn Jul 09 '22 at 19:12