Browse Source

Minor changes

pull/10109/head
dolfies 4 years ago
parent
commit
1a0453835e
  1. 7
      discord/http.py
  2. 8
      discord/sticker.py

7
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,

8
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()

Loading…
Cancel
Save