Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
How can I get all members of chat ids? I tried app.get_chat_members, but i need only user id, and nothing else. Tried this:
countingusers=app.get_chat_members(f"{link}")
app.get_chat_members() only returns 200 members at a time. If you want to iterate over all members, you can use app.iter_chat_members() instead. To get just the user_id's, you could use a list comprehension:
counting_users = [x.user.id for x in app.iter_chat_members(chat_id)]
Then your counting_users variable is a list of user_id's.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 days ago.
Improve this question
I would like to declare nested dictionaries and I want both of the dictionaries to be empty. Is that possible?
Because later I want to add inside a dictionary inside of a dictionary
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 days ago.
Improve this question
I want to know how when somebody uses a slash command and puts a id / number it will store that id and if they use it again it will give them the same answer but im using import random.
Can someone just drop a code below or tell me how please?
Didn't try anything yet.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
There are my lists:
i1,i2,i3,i4,i5 = [],[],[],[],[]
and I need the string "test" to be appended to each list. How can I do that?
I thought about using a loop but couldn't manage to do that.
Are there any other ways to append to all the five lists?
easy busy
i1,i2,i3,i4,i5 = 5*[['test']]
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I’d like to add a command that checks how many messages a user sent in the entire server in the last x amount of time (say, a week).
Yes, but you'd have to use the TextChannel.history method for each text channel, filter the messages by checking for that user as the author, and add up the number of messages yourself.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
Hi everyone where i can find the value for each color for Discord embed?
color=16711680
Is there a sort of list where I can find all the values like 16711680?
Thanks to everyone in advance
See the class methods of the discord.Colour class. Those will generate Colour instances with a value attribute that is the number you're looking for.