Skip to content

Commit 36d2cd5

Browse files
authored
Merge pull request #522 from QwireTeam/master
Fix WelcomeScreen typings
2 parents 52060a1 + dea2d05 commit 36d2cd5

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

discord/guild.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3025,7 +3025,7 @@ async def edit_welcome_screen(
30253025
self,
30263026
*,
30273027
description: Optional[str] = ...,
3028-
welcome_channels: Optional[List[WelcomeChannel]] = ...,
3028+
welcome_channels: Optional[List[WelcomeScreenChannel]] = ...,
30293029
enabled: Optional[bool] = ...,
30303030
) -> WelcomeScreen:
30313031
...

discord/http.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
threads,
8686
voice,
8787
sticker,
88+
welcome_screen,
8889
)
8990
from .types.snowflake import Snowflake, SnowflakeList
9091
from .types.message import Attachment

discord/welcome_screen.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
from __future__ import annotations
2727

28-
from typing import TYPE_CHECKING, List, Union, overload
28+
from typing import TYPE_CHECKING, Optional, List, Union, overload
2929
from .utils import _get_as_snowflake, get
3030
from .partial_emoji import _EmojiTag
3131

@@ -88,7 +88,7 @@ def to_dict(self) -> WelcomeScreenChannelPayload:
8888
return dict_
8989

9090
@classmethod
91-
def _from_dict(cls, data: WelcomeScreenChannelPayload, guild: Guild) -> WelcomeChannel:
91+
def _from_dict(cls, data: WelcomeScreenChannelPayload, guild: Guild) -> WelcomeScreenChannel:
9292
channel_id = _get_as_snowflake(data, 'channel_id')
9393
channel = guild.get_channel(channel_id)
9494
description = data.get('description')
@@ -145,7 +145,7 @@ async def edit(
145145
self,
146146
*,
147147
description: Optional[str] = ...,
148-
welcome_channels: Optional[List[WelcomeChannel]] = ...,
148+
welcome_channels: Optional[List[WelcomeScreenChannel]] = ...,
149149
enabled: Optional[bool] = ...,
150150
reason: Optional[str] = ...,
151151
) -> None:

0 commit comments

Comments
 (0)