Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New gateway events: INTEGRATION_CREATE/UPDATE/DELETE #2121

Closed
Erk- opened this issue Oct 2, 2020 · 3 comments · Fixed by #2533
Closed

New gateway events: INTEGRATION_CREATE/UPDATE/DELETE #2121

Erk- opened this issue Oct 2, 2020 · 3 comments · Fixed by #2533

Comments

@Erk-
Copy link
Contributor

Erk- commented Oct 2, 2020

We have begun getting a event on the following form, is this an event that will be documented?

{
  "t": "INTEGRATION_UPDATE",
  "s": 16435,
  "op": 0,
  "d": {
    "user": {
      "username": "Foo Bar",
      "public_flags": 0,
      "id": "1234",
      "discriminator": "1337",
      "avatar": "somehash"
    },
    "type": "youtube",
    "syncing": false,
    "synced_at": "2020-10-02T22:08:19.042000+00:00",
    "subscriber_count": 3,
    "role_id": "2341",
    "revoked": false,
    "name": "Foo Bar",
    "id": "4321",
    "expire_grace_period": 1,
    "expire_behavior": 0,
    "enabled": true,
    "enable_emoticons": false,
    "account": {
      "name": "Foo Bar",
      "id": "ABCD1337asdf"
    },
    "guild_id": "123456789"
  }
}
@ghost
Copy link

ghost commented Oct 3, 2020

Are we meant to now keep a cache of integrations locally?

Is there any unexpected behaviour relating to how this is dispatched, given the REST endpoint is apparently intended to give arbitrary unpredictable results if more than 50 integrations exist? (Night confirmed this is working as intended in #1990 but this leaves this part of the API somewhat unusable given there is no guarantee it will actually work in an idempotent way for anyone).

Is anyone able to confirm how this will work?

Additionally, how does this differ to the GUILD_INTEGRATIONS_UPDATE payload, other than it contains useful information other than just the guild id?

@Erk-
Copy link
Contributor Author

Erk- commented Oct 8, 2020

There are also two other events

INTEGRATION_CREATE

{
    "t":"INTEGRATION_CREATE",
    "s":25,
    "op":0,
    "d":{
        "user":{
            "username":"Erk",
            "public_flags":131584,
            "id":"77469400222932992",
            "discriminator":"2048",
            "avatar":"ca38426aca0884f0b636a6d588131b96"},
        "type":"discord",
        "name":"Dumblebot",
        "id":"763674548452851712",
        "enabled":true,
        "application":{
            "summary":"Stupid bot",
            "name":"Dumblebot",
            "id":"407532991313739776",
            "icon":"00fa646dc73c173d31404a095985eb57",
            "description":"Stupid bot",
            "bot":{
                "username":"Dumblebot",
                "public_flags":0,
                "id":"407532991313739776",
                "discriminator":"0288",
                "bot":true,
                "avatar":"00fa646dc73c173d31404a095985eb57"
            }
        },
        "account":{
            "name":"Dumblebot",
            "id":"407532991313739776"
        },
        "guild_id":"285899321705103361"
    }
}

INTEGRATION_DELETE

{
    "t":"INTEGRATION_DELETE",
    "s":13,
    "op":0,
    "d":{
        "id":"763672605810884639",
        "application_id":"407532991313739776",
        "guild_id":"285899321705103361"}
}

@Erk- Erk- changed the title New gateway event: INTEGRATION_UPDATE New gateway events: INTEGRATION_CREATE/UPDATE/DELETE Oct 8, 2020
@Erk-
Copy link
Contributor Author

Erk- commented Oct 12, 2020

This seems to be connected with #1886 As the application field is the one present here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants