Reputation: 27
I made this script for my discord bot:
import discord
from discord.ext import commands
from keep_alive import keep_alive
bot = commands.Bot(command_prefix = '+')
bot.remove_command('help')
@bot.event()
async def on_ready():
await bot.change_presence(activity = discord.Streaming(name = "", url=""))
keep_alive()
bot.run('it is my token >:(')
and i got this error:
Traceback (most recent call last):
File "main.py", line 8, in <module>
@bot.event()
TypeError: event() missing 1 required positional argument: 'coro'
Then how can i fix this?
Upvotes: 0
Views: 509
Reputation: 2425
I'm guessing the problem is with your decorator.
I believe it should be just:
@bot.event
async def on_ready():
await bot.change_presence(activity = discord.Streaming(name = "", url=""))
Upvotes: 2