Reputation: 46
I am am making a discord bot in python.
In the output it says that I have 4 errors.
I do not understand why.
I have installed discord.py and I am using Python 3.5.
Any ideas as to what is going on?
Errors:
E0611:No name 'exe' in module 'discord'
E0602:Undefined variable 'message'
E0401:Unable to import 'discord.exe.commands'
E0602:Undefined variable 'message'
Code:
import discord
from discord.exe.commands import Bot
from discord.ext import commands
import asyncio
import time
Client = discord.Client()
client = commands.Bot(command_prefix = ";")
@client.event
async def on_ready():
print("The bot is sailing on the seven seas")
@client.event
async def on_message(maker):
if message.content == "cookie":
await client.send_message(message.channel, ":cookie:")
client.run("1NDE2--CHANGED--L24CMo"))
Upvotes: -1
Views: 1171
Reputation:
First error: You imported discord.exe
; its called discord.ext
Second error: You assigned the message
argument to the name maker
in the on_message
declaration. Change it to on_message(message)
to get the variable
Upvotes: 1