Skip to content

Conversation

@GeomKid
Copy link
Contributor

@GeomKid GeomKid commented Jan 14, 2023

About

This pull request is about adding the Guild Audit Log Entry Event

Checklist

  • The pre-commit code linter has been run over all edited files to ensure the code is linted.
  • I've ensured the change(s) work on 3.8.6 and higher.
  • I have added the versionadded, versionchanged and deprecated to any new or changed user-facing function I committed.

Pull-Request specification

I've made this pull request: (check all that apply)

  • For the documentation
  • To add a new feature
  • As a general enhancement
  • As a refactor of the library/the library's code
  • To fix an existing bug
  • To resolve #ISSUENUMBER

This is:

  • A breaking change

Copy link
Member

@Damego Damego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inner payload is an Audit Log Entry object with an additional guild_id key

@Damego Damego changed the title fix: Guild audit log entry event feat: Add support for guild audit log entry create event Jan 14, 2023
@Damego Damego added the enhancement New feature or request label Jan 14, 2023
Copy link
Member

@Damego Damego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

example of the event payload

{
 'action_type': 25,
 'changes': [{'key': '$add',
              'new_value': [{'id': '855471113685172224',
                             'name': 'new role'}]}],
 'guild_id': '829333896561819648',
 'id': '1063731503076491275',
 'target_id': '972871411741888572',
 'user_id': '143773579320754177'
}

@Damego
Copy link
Member

Damego commented Jan 14, 2023

You could just subclass AuditLogEntry

@GeomKid
Copy link
Contributor Author

GeomKid commented Jan 14, 2023

I'll just do a subclass

@Damego Damego changed the title feat: Add support for guild audit log entry create event feat: Add support for the event GUILD_AUDIT_LOG_ENTRY_CREATE Jan 14, 2023
@Damego Damego requested a review from FayeDel January 14, 2023 08:45
@Damego Damego merged commit f26dfd3 into interactions-py:unstable Jan 14, 2023
@GeomKid GeomKid deleted the GuildAuditLogEntry-event branch January 14, 2023 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants