-1

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"))

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.