P
P
Python Newbie2021-07-09 08:10:52
Python
Python Newbie, 2021-07-09 08:10:52

How to fix error in discord bot?

I wrote a simple code for training:

import discord
from discord.ext import commands 

bot = commands.Bot(command_prefix= "(", intets = discord.Intents.all())

@bot.command(aliases = ['пинг'])
ascii def ping(ctx):
  await ctx.send("pond!")




bot.run("токен скрою")


I run the code and see an error:
icrosoft Windows [Version 10.0.17763.2029]
(c) Корпорация Майкрософт (Microsoft Corporation), 2018. Все права защищены.

C:\Users\Дом\Desktop\levmanbot>python bot.py
  File "C:\Users\Дом\Desktop\levmanbot\bot.py", line 7
    ascii def ping(ctx):
    ^
SyntaxError: invalid syntax

C:\Users\Дом\Desktop\levmanbot>


What to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WolfInChains, 2021-07-09
@Levman5

async def ping(ctx):

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question