diff --git a/discord/channel.py b/discord/channel.py index 0fdef6c78..172137371 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -190,6 +190,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): def __init__(self, *, state: ConnectionState, guild: Guild, data: Union[TextChannelPayload, NewsChannelPayload]): self._state: ConnectionState = state self.id: int = int(data['id']) + self._type: Literal[0, 5] = data['type'] self._update(guild, data) def __repr__(self) -> str: diff --git a/discord/components.py b/discord/components.py index f8bca4cea..77e076f2d 100644 --- a/discord/components.py +++ b/discord/components.py @@ -449,7 +449,16 @@ class TextInput(Component): 'max_length', ) - __repr_info__: ClassVar[Tuple[str, ...]] = __slots__ + __repr_info__: ClassVar[Tuple[str, ...]] = ( + 'style', + 'label', + 'custom_id', + 'placeholder', + 'required', + 'min_length', + 'max_length', + 'default', + ) def __init__(self, data: TextInputPayload, *args) -> None: self.style: TextStyle = try_enum(TextStyle, data['style']) diff --git a/discord/flags.py b/discord/flags.py index 383cdd4b0..ac32c3e1f 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -1938,6 +1938,7 @@ class ApplicationDiscoveryFlags(BaseFlags): return 1 << 16 +@fill_with_flags() class FriendSourceFlags(BaseFlags): r"""Wraps up the Discord friend source flags. diff --git a/discord/gateway.py b/discord/gateway.py index 43159179e..af22d0a16 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -575,16 +575,15 @@ class DiscordWebSocket: return if event == 'READY': - self._trace = trace = data.get('_trace', []) + self._trace = data.get('_trace', []) self.sequence = msg['s'] self.session_id = data['session_id'] self.gateway = yarl.URL(data['resume_gateway_url']) - _log.info('Connected to Gateway: %s (Session ID: %s).', ', '.join(trace), self.session_id) + _log.info('Connected to Gateway (Session ID: %s).', self.session_id) await self.voice_state() # Initial OP 4 elif event == 'RESUMED': - self._trace = trace = data.get('_trace', []) - _log.info('Gateway has successfully RESUMED session %s under trace %s.', self.session_id, ', '.join(trace)) + _log.info('Gateway has successfully RESUMED session %s.', self.session_id) try: func = self._discord_parsers[event]