A
A
Angeloffy2021-11-15 11:23:33
Python
Angeloffy, 2021-11-15 11:23:33

How to notify user if argument is empty in discord py command?

Good day, here is an example code:

@commands.command(aliases=['ник', 'авторизация', 'ybr'])
async def chnick(self, ctx, nick, serv):
    await ctx.send(f"Пользователь: {nick}-{serv}")


How to track an empty argument and write a warning (ex. )await ctx.send("Вы не указали ник")

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Entelis, 2015-03-04
@DmitriyEntelis

Well, as if everything is written the same.
SQL tells you "there is no column named categories in the msg table "
Why not? And because in the CREATE TABLE code you named it category
PS In general, it looks like not a very good code.
It seems to me a) you should not use sqlite b) you should not create tables in the model code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question