I didn't get it...
C:\Users\WxyLife_\PycharmProjects\WxyBot\venv\Scripts\python.exe C:/Users/WxyLife_/PycharmProjects/WxyBot/main.py
Traceback (most recent call last):
File "C:/Users/WxyLife_/PycharmProjects/WxyBot/main.py", line 10, in
@asyncio.coroutine
TypeError: event() missing 1 required positional argument: 'coro'
Process finished with exit code 1
import asyncio as asyncio
import discord
import SECRETS
client = discord.Client
@client.event
@asyncio.coroutine
async def on_ready():
print("--------------------------------")
print("Der WxyBot wurde gestartet.")
print("Version 0.1")
print("Made by Nutzloses Wesen.#8038")
print("Auf folgenden Server zu finden:\n")
for s in client.servers:
print(" - %s (%s)" % (s.name, s.id))
print("--------------------------------")
client.run(SECRETS.TOKEN)
Or i'm just stupid... ._.
This is erroring because you're initializing client as the Client class itself instead of an instance of it, with discord.Client().
Also, import asyncio as asyncio is unnecessarily redundant, as is @asyncio.coroutine when you're already defining on_ready as a coroutine with async def.
For future questions like this, you should join either the official discord.py server or the Discord API server for help, as the README recommends.
Most helpful comment
This is erroring because you're initializing
clientas theClientclass itself instead of an instance of it, withdiscord.Client().Also,
import asyncio as asynciois unnecessarily redundant, as is@asyncio.coroutinewhen you're already definingon_readyas a coroutine withasync def.For future questions like this, you should join either the official discord.py server or the Discord API server for help, as the README recommends.