A StreamIntegration object is sometimes passed to on_integration_update instead of an Integration object.
Reproduction Steps
Run the code below.
Wait for the on_integration_update event to be called for a Twitch or YouTube integration. I'm not sure exactly when it's called, but it seemed to happen fairly often with guilds of large YouTubers.
Look at what the code prints.
Code
import discord
client = discord.Client()
@client.event
async def on_integration_update(integration):
print(type(integration).__name__) # Should always be "Integration" according to docs
client.run("<token>")
Expected Results
When an on_integration_update event occurs, the code should print:
Integration
According to the docs, the argument passed to on_integration_update should be an Integration.
Actual Results
If the integration is a Twitch or YouTube integration, the code prints:
StreamIntegration
System Information
- Python v3.10.6-final
- discord.py-self v2.0.0-alpha
- discord.py-self pkg_resources: v2.0.0a2
- aiohttp v3.8.4
- system info: Linux 5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023
Checklist
[X] I have searched the open issues for duplicates.
[X] I have shared the entire traceback.
[X] I am using a user token (and it isn't visible in the code).
Summary
A StreamIntegration object is sometimes passed to on_integration_update instead of an Integration object.
Reproduction Steps
Run the code below. Wait for the
on_integration_update
event to be called for a Twitch or YouTube integration. I'm not sure exactly when it's called, but it seemed to happen fairly often with guilds of large YouTubers. Look at what the code prints.Code
Expected Results
When an
on_integration_update
event occurs, the code should print:According to the docs, the argument passed to
on_integration_update
should be anIntegration
.Actual Results
If the integration is a Twitch or YouTube integration, the code prints:
System Information
Checklist
Additional Information
No response