#Error with pycord library when loading cogs

1 messages · Page 1 of 1 (latest)

hearty wedgeBOT
gloomy jackal
#
import discord
bot = discord.Bot()

events = []

@bot.event
async def on_ready():
    print(f"Logged as {bot.user}")

bot.load_extension("cogs.game")

@bot.slash_command()
async def create_channel(ctx, channel_name, emoji, category_id):
    category = bot.get_channel(category_id)
    await category.create_text_channel(f'《{emoji}{channel_name}')
    

bot.run('TOKEN')```



Error:
```diff
- discord.errors.ExtensionFailed: Extension 'cogs.game' raised an error: AttributeError: 'Bot' object has no attribute 'add_command'
normal raven
#

Imaging sharing bot tokens doggokek

gloomy jackal
steady lion
#

It was also the first what I was reading

gloomy jackal
#

I don't care if they take his token

normal raven
gloomy jackal
#

ok, what about the error?

normal raven
#

what do i know doggokek i'm just doing sys admin stuff here

normal raven
#

fr..

#

before you continue coding please think/learn about security..

steady lion
#

^

gloomy jackal
#

security of what?