1

Previous question that I have looked over suggests that the name of the file is 'Discord.py' however this isn't the issue this time. Currently I am running:

import discord

client = discord.Client()

Which then returns

AttributeError: partially initialized module 'discord' has no attribute 'Client' (most likely due to a circular import)

How can I fix this? and thank you in advance

Taku
  • 31,927
  • 11
  • 74
  • 85

2 Answers2

0

make sure that you do not name your file discord

  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 24 '21 at 17:16
0

Maybe you have to add the prefix in there? and import discord commands

import discord
from discord.ext import commands
client = commands.Bot(command_prefix = "pefix") 
Derek
  • 98
  • 10