A
A
Amir02042020-11-27 20:42:40
Python
Amir0204, 2020-11-27 20:42:40

How to count number in discord.py library?

I am making a discord bot in python using the dicrord.py library, please correct the commands so that I read the number and immediately drive it into the
Commands variable:

@bot.command()
async def (здесь мы считываем и вставляем в переменную)(ctx):
if (число) > 50
  await ctx.send('правильно')

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Nevzorov, 2020-11-28
@Amir0204

@bot.command()
async def cmd(ctx, number: int):
    await ctx.send(number)

A
Amir0204, 2020-11-28
@Amir0204

Maxim Nevzorov and what to enter to the bot, and what has become a variable for us

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question