I followed the tutorial exactly and it keeps saying this:

Traceback (most recent call last): File “main.py”, line 4, in
client = discord.Client()TypeError: init() missing 1 required keyword-only argument: ‘intents’

hi, welcome to the fCC forum.
I am going to reclassify your post to the Python sub-forum as it seems you are asking about Python problem.
Another thing you should know is that there are too many tutorials in fCC so when you say “I followed the tutorial”, we cannot possibly guess which one unless you tell us (by posting a link to whichever tutorial or step you are following).
Finally, it is best when asking a coding related question to post either a link to your code online or provide a complete code snippet (or the whole thing if you’re not sure where the issue is happening).

I hope these suggestions prove useful in the future.

Code a Discord Bot with Python - Host for Free in the Cloud - YouTube - the video

import discord
import os

client = discord.Client()

async def on_ready():
    print('We have logged in as{0.user}'.format(client))

async def on_message(message):
  if message.author == client.user:

  if message.content.startswith('$hello'):
    await message.channel.send('h3110!')


^^^ my code

and I’m sorry about the classification. when I created an account it changed subs

the tutorial is outdated, the new version of the discord API requires the use of intents.

Check its documentation

1 Like