diff --git a/discord/guild.py b/discord/guild.py index 6f3897c867..103ceb6b37 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -45,7 +45,6 @@ from . import abc, utils from .asset import Asset -from .channel import * from .channel import _guild_channel_factory, _threaded_guild_channel_factory from .colour import Colour from .emoji import Emoji diff --git a/discord/http.py b/discord/http.py index 0913707315..2aeb76bc5a 100644 --- a/discord/http.py +++ b/discord/http.py @@ -87,12 +87,10 @@ template, threads, user, - voice, webhook, welcome_screen, widget, ) - from .types.message import Attachment from .types.snowflake import Snowflake, SnowflakeList T = TypeVar("T") @@ -114,7 +112,7 @@ async def json_or_text(response: aiohttp.ClientResponse) -> Union[Dict[str, Any] class Route: - BASE: ClassVar[str] = "https://discord.com/api/v9" + BASE: ClassVar[str] = "https://discord.com/api/v10" def __init__(self, method: str, path: str, **parameters: Any) -> None: self.path: str = path @@ -2633,9 +2631,9 @@ async def get_gateway(self, *, encoding: str = "json", zlib: bool = True) -> str except HTTPException as exc: raise GatewayNotFound() from exc if zlib: - value = "{0}?encoding={1}&v=9&compress=zlib-stream" + value = "{0}?encoding={1}&v=10&compress=zlib-stream" else: - value = "{0}?encoding={1}&v=9" + value = "{0}?encoding={1}&v=10" return value.format(data["url"], encoding) async def get_bot_gateway( @@ -2647,9 +2645,9 @@ async def get_bot_gateway( raise GatewayNotFound() from exc if zlib: - value = "{0}?encoding={1}&v=9&compress=zlib-stream" + value = "{0}?encoding={1}&v=10&compress=zlib-stream" else: - value = "{0}?encoding={1}&v=9" + value = "{0}?encoding={1}&v=10" return data["shards"], value.format(data["url"], encoding) def get_user(self, user_id: Snowflake) -> Response[user.User]: