#list timeouted users

1 messages · Page 1 of 1 (latest)

woven ivy
#

Is there a way to get list of all timed out users on server? I have thousands of users so iterating through all of them is not option. I wondered if discord has api for it and its implemented in disnake.

sleek crescent
#

Nope.

rancid vale
#

to avoid this in the future i would suggest storing members that get timed out.

woven ivy
#

thanks anyway

half falcon
#

Guess you can monitor the member_update event to see if someone is timedout using different means

subtle cargo
#

@woven ivy
[member for member in guild.members if member. timeout]

#

Something like this

#

-d disnake.member.timeout_until

harsh krakenBOT
#

await timeout(*, duration=..., until=..., reason=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Times out the member from the guild; until then, the member will not be able to interact with the guild.

Exactly one of `duration` or `until` must be provided. To remove a timeout, set one of the parameters to `None`.

You must have the [`Permissions.moderate_members`](https://docs.disnake.dev/page/api.html#disnake.Permissions.moderate_members "disnake.Permissions.moderate_members") permission to do this.

New in version 2.3.
subtle cargo
#

Or current timeout, I don't remember

woven ivy
#

thank you, is there event i can look on if the timeout was used with only discord ui?

half falcon
#

Member update gets called. You need to to see if current_timeout is set between before and after