| description | Returns audit log information. |
|---|
With this function you can check Audit Log entries. Every field is optional. Action field defaults to everything, user field to everyone.
Raw usage: $getAuditLogs[limit;userID;action;guildID;format]
Format is an optional field where you can customize the response of the bot. Here you can use the following options to replace each with it's audit log response:
{executor.username}=> username who triggered the audit log{executor.tag}=> username and discriminator of the user that executed the audit log{executor.id}=> userID of the user that triggered the audit log entry{executor.mention}=> mention of the user that executed the audit log entry{target.id}=> the id of the target (can be a channel/message/user id or the guild id){action}=> see list below.
You can use the options at the bootom of the page to filter the audit logs:
- ALL
- GUILD_UPDATE
- CHANNEL_CREATE
- CHANNEL_UPDATE
- CHANNEL_DELETE
- CHANNEL_OVERWRITE_CREATE
- CHANNEL_OVERWRITE_UPDATE
- CHANNEL_OVERWRITE_DELETE
- MEMBER_KICK
- MEMBER_PRUNE
- MEMBER_BAN_ADD
- MEMBER_BAN_REMOVE
- MEMBER_UPDATE
- MEMBER_ROLE_UPDATE
- MEMBER_MOVE
- MEMBER_DISCONNECT
- BOT_ADD
- ROLE_CREATE
- ROLE_UPDATE
- ROLE_DELETE
- INVITE_CREATE
- INVITE_UPDATE
- INVITE_DELETE
- WEBHOOK_CREATE
- WEBHOOK_UPDATE
- WEBHOOK_DELETE
- EMOJI_CREATE
- EMOJI_UPDATE
- EMOJI_DELETE
- MESSAGE_DELETE
- MESSAGE_BULK_DELETE
- MESSAGE_PIN
- MESSAGE_UNPIN
- INTEGRATION_CREATE
- INTEGRATION_UPDATE
- INTEGRATION_DELETE
Simple usage without optional fields:
bot.command({
name: "audit-logs",
code: `
Last audit log entries:
$getAuditLogs
`
})
Example command to filter last 5 bans and list their mentions:
bot.command({
name: "audit-logs",
code: `
Last audit log entries:
$getAuditLogs[5;everyone;$guildID;MEMBER_BAN_ADD;<@!{target.id}>]
`
})