File tree Expand file tree Collapse file tree 2 files changed +33
-7
lines changed Expand file tree Collapse file tree 2 files changed +33
-7
lines changed Original file line number Diff line number Diff line change @@ -2969,6 +2969,22 @@ async def welcome_screen(self):
2969
2969
"""
2970
2970
data = await self ._state .http .get_welcome_screen (self .id )
2971
2971
return WelcomeScreen (data = data , guild = self )
2972
+
2973
+
2974
+ @overload
2975
+ async def edit_welcome_screen (
2976
+ self ,
2977
+ * ,
2978
+ description : Optional [str ] = ...,
2979
+ welcome_channels : Optional [List [WelcomeChannel ]] = ...,
2980
+ enabled : Optional [bool ] = ...,
2981
+ ) -> WelcomeScreen :
2982
+ ...
2983
+
2984
+ @overload
2985
+ async def edit_welcome_screen (self ) -> None :
2986
+ ...
2987
+
2972
2988
2973
2989
async def edit_welcome_screen (self , ** options ):
2974
2990
"""|coro|
@@ -3012,7 +3028,7 @@ async def edit_welcome_screen(self, **options):
3012
3028
3013
3029
for channel in welcome_channels :
3014
3030
if not isinstance (channel , WelcomeScreenChannel ):
3015
- raise InvalidArgument ('welcome_channels parameter must be a list of WelcomeScreenChannel.' )
3031
+ raise TypeError ('welcome_channels parameter must be a list of WelcomeScreenChannel.' )
3016
3032
3017
3033
welcome_channels_data .append (channel .to_dict ())
3018
3034
Original file line number Diff line number Diff line change @@ -140,6 +140,21 @@ def enabled(self) -> bool:
140
140
def guild (self ) -> Guild :
141
141
""":class:`Guild`: The guild this welcome screen belongs to."""
142
142
return self ._guild
143
+
144
+
145
+ @overload
146
+ async def edit (
147
+ self ,
148
+ * ,
149
+ description : Optional [str ] = ...,
150
+ welcome_channels : Optional [List [WelcomeChannel ]] = ...,
151
+ enabled : Optional [bool ] = ...,
152
+ ) -> None :
153
+ ...
154
+
155
+ @overload
156
+ async def edit (self ) -> None :
157
+ ...
143
158
144
159
async def edit (self , ** options ):
145
160
"""|coro|
@@ -184,19 +199,14 @@ async def edit(self, **options):
184
199
NotFound
185
200
This welcome screen does not exist.
186
201
187
- Returns
188
- --------
189
-
190
- :class:`WelcomeScreen`
191
- The updated welcome screen.
192
202
"""
193
203
194
204
welcome_channels = options .get ('welcome_channels' , [])
195
205
welcome_channels_data = []
196
206
197
207
for channel in welcome_channels :
198
208
if not isinstance (channel , WelcomeScreenChannel ):
199
- raise InvalidArgument ('welcome_channels parameter must be a list of WelcomeScreenChannel.' )
209
+ raise TypeError ('welcome_channels parameter must be a list of WelcomeScreenChannel.' )
200
210
201
211
welcome_channels_data .append (channel .to_dict ())
202
212
You can’t perform that action at this time.
0 commit comments