From 1a0453835ed0a584c0b95ae7629d8ce0db725c5c Mon Sep 17 00:00:00 2001 From: dolfies Date: Tue, 9 Nov 2021 19:16:46 -0500 Subject: [PATCH] Minor changes --- discord/http.py | 7 ++----- discord/sticker.py | 8 ++++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/discord/http.py b/discord/http.py index 5a47fd0fc..aba1c328e 100644 --- a/discord/http.py +++ b/discord/http.py @@ -51,20 +51,17 @@ import weakref import aiohttp from types import snowflake -from .context_properties import ContextProperties from .enums import RelationshipAction from .errors import HTTPException, Forbidden, NotFound, LoginFailure, DiscordServerError, GatewayNotFound, InvalidArgument from . import utils +from .tracking import ContextProperties from .utils import MISSING _log = logging.getLogger(__name__) if TYPE_CHECKING: from .file import File - from .enums import ( - AuditLogAction, - InteractionResponseType, - ) + from .enums import AuditLogAction from .types import ( appinfo, diff --git a/discord/sticker.py b/discord/sticker.py index b0b5c678d..711c2fb38 100644 --- a/discord/sticker.py +++ b/discord/sticker.py @@ -99,7 +99,7 @@ class StickerPack(Hashable): 'stickers', 'name', 'sku_id', - 'cover_sticker_id', + '_cover_sticker_id', 'cover_sticker', 'description', '_banner', @@ -115,8 +115,8 @@ class StickerPack(Hashable): self.stickers: List[StandardSticker] = [StandardSticker(state=self._state, data=sticker) for sticker in stickers] self.name: str = data['name'] self.sku_id: int = int(data['sku_id']) - self.cover_sticker_id: int = int(data['cover_sticker_id']) - self.cover_sticker: StandardSticker = get(self.stickers, id=self.cover_sticker_id) # type: ignore + self._cover_sticker_id: int = int(data['cover_sticker_id']) + self.cover_sticker: StandardSticker = get(self.stickers, id=self._cover_sticker_id) # type: ignore self.description: str = data['description'] self._banner: int = int(data['banner_asset_id']) @@ -162,7 +162,7 @@ class _StickerTag(Hashable, AssetMixin): The content of the asset. """ if self.format is StickerFormatType.lottie: - raise TypeError('Cannot read stickers of format "lottie".') + raise TypeError('Cannot read stickers of format "lottie"') return await super().read()