Reputation: 39
I'm coding a discord bot but it gives me an error on a simple print command and I can't understand why.
#iports the discord folder and commands for our bot
import discord
from discord.ext import commands
from discord import Member
from discord.ext.commands import has_permissions
from discord.ext import tasks
#defining veriables
#water_reminder_members = []
#sets the command prefix
Client = commands.Bot(command_prefix = "!")
#print Nuggie is ready in the console when the bot is activeted
@Client.event
async def on_ready():
await Client.change_presence(status=discord.Status.online))
print("Bot is ready")
@Client.command()
async def list(ctx):
nNum = len(codes)
codesStr = await client.wait_for('message', check=check(context.author), timeout=30
print(codesStr)
#bot's client code
Client.run('my_token')
and the error I get is:
print(codesStr)
^
SyntaxError: invalid syntax
anyone know why?
Upvotes: 0
Views: 241
Reputation: 4743
There's no )
at the end of the line
codesStr = await client.wait_for('message', check=check(context.author), timeout=30
And There's one more )
at the line
await Client.change_presence(status=discord.Status.online))
You should delete one of the parentheses.
Upvotes: 2