|
12 | 12 | from interactions.client.const import MISSING, PREMIUM_GUILD_LIMITS, Absent |
13 | 13 | from interactions.client.errors import EventLocationNotProvided, NotFound |
14 | 14 | from interactions.client.mixins.serialization import DictSerializationMixin |
15 | | -from interactions.client.utils.attr_converters import optional, list_converter, timestamp_converter |
| 15 | +from interactions.client.utils.attr_converters import ( |
| 16 | + list_converter, |
| 17 | + optional, |
| 18 | + timestamp_converter, |
| 19 | +) |
16 | 20 | from interactions.client.utils.attr_utils import docs |
17 | 21 | from interactions.client.utils.deserialise_app_cmds import deserialize_app_cmds |
18 | 22 | from interactions.client.utils.serializer import no_export_meta, to_image_data |
|
33 | 37 | DefaultNotificationLevel, |
34 | 38 | ExplicitContentFilterLevel, |
35 | 39 | ForumLayoutType, |
| 40 | + ForumSortOrder, |
36 | 41 | IntegrationExpireBehaviour, |
37 | 42 | MFALevel, |
38 | 43 | NSFWLevel, |
|
41 | 46 | ScheduledEventType, |
42 | 47 | SystemChannelFlags, |
43 | 48 | VerificationLevel, |
44 | | - ForumSortOrder, |
45 | 49 | ) |
46 | 50 | from .snowflake import ( |
47 | 51 | Snowflake_Type, |
@@ -1399,6 +1403,17 @@ async def fetch_custom_sticker(self, sticker_id: Snowflake_Type) -> Optional["mo |
1399 | 1403 | return None |
1400 | 1404 | return models.Sticker.from_dict(sticker_data, self._client) |
1401 | 1405 |
|
| 1406 | + async def fetch_all_webhooks(self) -> List["models.Webhook"]: |
| 1407 | + """ |
| 1408 | + Fetches all the webhooks for this guild. |
| 1409 | +
|
| 1410 | + Returns: |
| 1411 | + A list of webhook objects. |
| 1412 | +
|
| 1413 | + """ |
| 1414 | + webhooks_data = await self._client.http.get_guild_webhooks(self.id) |
| 1415 | + return models.Webhook.from_list(webhooks_data, self._client) |
| 1416 | + |
1402 | 1417 | async def fetch_active_threads(self) -> "models.ThreadList": |
1403 | 1418 | """ |
1404 | 1419 | Fetches all active threads in the guild, including public and private threads. Threads are ordered by their id, in descending order. |
|
0 commit comments