#module 'discord' has no attribute 'Bot'

1 messages · Page 1 of 1 (latest)

forest lance
#

Pycord not even installing after following quickstart guide.

py-cord package is installed.

import discord
import os

client = discord.Bot()

@client.event
async def on_ready():
    print(f'We have logged in as {client.user}')

@client.slash_command(guild_ids=[860169374278352906])
async def hello(ctx):
    await ctx.respond("Hello!")

token = os.environ['token']

client.run(token)
remote coral
#

if it is 1.7.3, that's the wrong version, uninstall py-cord like this: pip uninstall py-cord and run this pip install py-cord==2.0.0rc1

prisma kindle
#

show output

#

its beta

forest lance
#

I've got it now, thanks from help elsewhere here. I didn't have 2.0.0 installed, thanks too @remote coral

queen girder
#

install git 🙂 and in console write this command
pip install -U git+https://github.com/Pycord-Development/pycord

#

and repair

#
@client.slash_command()
async def hello(ctx):
    await ctx.respond(f"Hello!")


forest lance
#

How to close post lol.

remote coral
forest lance
#

Ah ok.

remote coral