diff options
| author | Stocker <[email protected]> | 2021-08-23 05:22:36 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-23 05:22:36 -0400 |
| commit | cdf46127ae2e1a183e5c94d9eb970bbccbed64af (patch) | |
| tree | 4cd972134eb6897bf611f5c1a4945cd9fa28ec40 | |
| parent | Fix permissions.py typing (diff) | |
| download | discord.py-cdf46127ae2e1a183e5c94d9eb970bbccbed64af.tar.xz discord.py-cdf46127ae2e1a183e5c94d9eb970bbccbed64af.zip | |
Added type: ignores where needed to activity.py
| -rw-r--r-- | discord/activity.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/discord/activity.py b/discord/activity.py index 3f89c477..51205377 100644 --- a/discord/activity.py +++ b/discord/activity.py @@ -830,10 +830,12 @@ def create_activity(data: Optional[ActivityPayload]) -> Optional[ActivityTypes]: except KeyError: return Activity(**data) else: - return CustomActivity(name=name, **data) + # we removed the name key from data already + return CustomActivity(name=name, **data) # type: ignore elif game_type is ActivityType.streaming: if 'url' in data: - return Streaming(**data) + # the url won't be None here + return Streaming(**data) # type: ignore return Activity(**data) elif game_type is ActivityType.listening and 'sync_id' in data and 'session_id' in data: return Spotify(**data) |