T
T
TheDorik2021-06-14 00:57:13
Python
TheDorik, 2021-06-14 00:57:13

What are the ctx.author (discord.py) arguments?

Hello, I'm making a bot in Discord, now I'm doing the "Profile" command and I can't find how to do something that would show the status of the User, Online / Offline, etc. in other words ctx.author...
I know that there is ctx.author.name , ctx.author.discriminator.

I will be grateful for help. :)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
hoojpop, 2021-06-14
@TheDorik

Have a look at this thread, it might work: How to get information about a discord py user?

A
Alan Gibizov, 2021-06-14
@phaggi

Apparently, it's not about arguments, but about attributes.
Functions and methods have arguments, this is what is passed to the function in brackets.
What you have shown are the attributes. You can view the list of attributes with the command print(dir(obj))
. This will display all the attributes of the obj object in the form of a list (list).

spoiler
Если запустить dir() без аргументов, то получите список доступных имен, видимых в данной области видимости имен.
a = 1
print(dir())

spoiler
Рекомендую ознакомиться с языком на более простых примерах, нежели бот. Боты - довольно сложная штука, и учиться на ботах всё равно, что учиться на хирурга сразу на операциях на сердце. Начните с латыни, биохимии и анатомии.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question