v5.0.0
$getAuditLogs
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 option:

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.

Action Filter:

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

Example Command:

Simple usage without optional fields:
1
bot.command({
2
name: "audit-logs",
3
code: `
4
Last audit log entries:
5
$getAuditLogs
6
`
7
})
Copied!
Example command to filter last 5 bans and list their mentions:
1
bot.command({
2
name: "audit-logs",
3
code: `
4
Last audit log entries:
5
$getAuditLogs[5;everyone;$guildID;MEMBER_BAN_ADD;<@!{target.id}>]
6
`
7
})
Copied!
Last modified 1mo ago
Copy link
Edit on GitHub