#on_raw_member_update(member) with timeout?
1 messages · Page 1 of 1 (latest)
I'm not sure what the issue is
for example lets say i give user timeout. could it be that the user is not cached? so i can only retrieve his update via on_raw_member_update? im working on logging module and it would be good to know if i can use the on_memeber_update rather than the on_raw
okay so there can be uncached user that can get timeout, simple as that 
I read the docs just wasnt sure if it also implies to timeout, how can you timeout someone you most likely dont see on server because he is not cached
Dude what?

you can timeout someone who is not cached on your Bot by using
-d disnake.Guild.timeout
await timeout(user, *, 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`.
The user must meet the [`abc.Snowflake`](https://docs.disnake.dev/en/latest/api/abc.html#disnake.abc.Snowflake "disnake.abc.Snowflake") abc.
You must have the [`moderate_members`](https://docs.disnake.dev/en/latest/api/permissions.html#disnake.Permissions.moderate_members "disnake.Permissions.moderate_members") permission to do this.
New in version 2.3.
so yes your Bot can receive an event regarding a user who is not cached
thank you,
but when doing manually timeout in application the user should be cached right?
What does that have to do with bot cache?
Not necessarly, it depends on what you do / you're using
for example using the method that i sent before you can timeout a Member that is potentially not cached therefore it'll fires an event and your Bot won't still have that member cached
In the over 24 hours since you posted you could have created a second discord user, invited them to your server, and timed them out and checked for yourself .
I guess its better if I explain what im trying to do,
My aim is to create a logging module where if moderator times out someone i can log the creation of timeout, duration, but from raw update i dont think its possible
if i've understood well he's asking if timeout on a non cached member will fire the raw update event
Well yeah.. that's the entire point of raw events
and I'm sorry just wanted another point of view
There is only one point of view. It either works or don't work. Raw events are always fired, cache or no cache
you can use audit logs for that
will try that, thank you
I did same think, it's possible 100%
-d disnake.Guild.audit_logs
async for ... in audit_logs(*, limit=100, before=None, after=None, user=None, action=None, oldest_first=False)```
Returns an [`AsyncIterator`](https://docs.disnake.dev/en/latest/api/misc.html#disnake.AsyncIterator "disnake.AsyncIterator") that enables receiving the guild’s audit logs.
You must have [`view_audit_log`](https://docs.disnake.dev/en/latest/api/permissions.html#disnake.Permissions.view_audit_log "disnake.Permissions.view_audit_log") permission to use this.
Entries are returned in order from newest to oldest by default; pass `oldest_first=True` to reverse the iteration order.
Examples
Getting the first 100 entries...
A member has updated. This triggers in the following situations:
• A nickname was changed
• They were server muted or deafened (or it was undone)
• They were timed out
When this is the action, the type of target is the Member or User who got updated. If the user is not found then it is a Object with the user’s ID...
for the duration you do the audit log created at minus timeout
yes, thanks, I just couldn't describe properly my situation and made dlchamp mad 
