Browse Source

Fix typing issues with group DM nicknames

pull/10109/head
dolfies 3 months ago
parent
commit
353924282a
  1. 2
      discord/state.py
  2. 2
      discord/types/channel.py

2
discord/state.py

@ -2322,7 +2322,7 @@ class ConnectionState:
user = self.store_user(data['user']) user = self.store_user(data['user'])
channel.recipients.append(user) # type: ignore channel.recipients.append(user) # type: ignore
if 'nick' in data: if 'nick' in data:
channel.nicks[user] = data['nick'] channel.nicks[user] = data['nick'] # type: ignore
self.dispatch('group_join', channel, user) self.dispatch('group_join', channel, user)
def parse_channel_recipient_remove(self, data: gw.ChannelRecipientEvent) -> None: def parse_channel_recipient_remove(self, data: gw.ChannelRecipientEvent) -> None:

2
discord/types/channel.py

@ -22,7 +22,7 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE. DEALINGS IN THE SOFTWARE.
""" """
from typing import Dict, List, Literal, Optional, TypedDict, Union from typing import List, Literal, Optional, TypedDict, Union
from typing_extensions import NotRequired from typing_extensions import NotRequired
from .user import PartialUser from .user import PartialUser

Loading…
Cancel
Save