AuditLogIterator
An async iterator over a guild's audit logs.
Attributes application_commands :
A dictionary that contains the mentioned application commands by the audi log entries. The keys are the id
-s of the application commands, meanwhile the values are the application commands themselves.
A dictionary that contains the auto moderation rules mentioned inside of the audit log entries. The keys are the id
-s of the rules and the values are the rules themselves.
The client, who will execute the api requests.
list
of AuditLogEntry
A list of audit log entries that the audit log contains.
int
The audit logs' respective guild's identifier.
A dictionary that contains the mentioned integrations by the audit log's entries. The keys are the id
-s of the integrations, meanwhile the values are the integrations themselves.
A dictionary containing the scheduled events mentioned inside of the audit logs.
A dictionary containing the mentioned threads inside of the audit logs.
A dictionary that contains the mentioned users by the audit log's entries. The keys are the id
-s of the users, meanwhile the values are the users themselves.
A dictionary that contains the mentioned webhook by the audit log's entries. The keys are the id
-s of the webhooks, meanwhile the values are the values themselves.
dict
of (str
, object
) itemsData to be sent to Discord when requesting an another audit log chunk. Contains some information, which are not stored by any attributes of the audit log iterator, these are the filtering user
and event
options.
int
The next audit log entries index to yield.
Weak reference to the audit log itself.
Properties
guild
Methods
(client, guild_id, ...)
__new__Creates an audit log iterator with the given parameters.
This method is a coroutine.
Parameter | Type | Optional | Default | Description |
---|---|---|---|---|
client | The client, who will execute the api requests. | |||
guild_id |
| The guild what's audit logs will be requested. | ||
user |
|
| Whether the audit logs should be filtered only to those, which were created by the given user. | |
entry_type |
|
| Whether the audit logs should be filtered only on the given event. |
Raises
TypeError
- If
guild
was not given neither asGuild
, nor asint
. - If
user
was not given neither asNone
,ClientUserBase
nor asint
. - If
entry_type
as not not given neither asNone
,AuditLogEntryType
nor asint
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
()
load_allLoads all not yet loaded audit logs of the audit log iterator's guild.
This method is a coroutine.
()
transform()
_get_self_reference(data)
_populatePopulates the audit log entry with the given data.
Parameter | Type | Description |
---|---|---|
data |
| Audit log data. |
Returns
populated : bool
Whether any entry was added to the audit log.
()
__aiter__Returns self and resets the .index
.
()
__anext__Yields the next entry of the audit log iterator.
This method is a coroutine.
()
__getattr__Drops a rich attribute error.
()
__getitem__Returns the specific audit log entry at the given index.
()
__iter__Iterates over the audit log's entries.
()
__len__Returns the amount of entries that the audit lgo contain.
()
__repr__Returns the representation of the Audit log.
()
__reversed__Reversed iterator over the audit log's entries.