#Error with pycord library when loading cogs
1 messages · Page 1 of 1 (latest)
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'
Imaging sharing bot tokens 
my bot just is in a test server
It was also the first what I was reading
I don't care if they take his token
and that way of thinking will be your doom. You should never share tokens
ok, what about the error?
what do i know
i'm just doing sys admin stuff here
reason?
^
security of what?