Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Member.joined_at is now nullable due to breaking API change #1811

Closed
2 tasks done
hypergonial opened this issue Jan 20, 2024 · 0 comments · Fixed by #1812
Closed
2 tasks done

Member.joined_at is now nullable due to breaking API change #1811

hypergonial opened this issue Jan 20, 2024 · 0 comments · Fixed by #1812
Labels
bug Something isn't working

Comments

@hypergonial
Copy link
Contributor

hypergonial commented Jan 20, 2024

Steps to reproduce

  1. Invite guest via guest invite
  2. Try deserializing the incoming events that contain the member (VOICE_STATE_UPDATE is definitely affected, unsure about the rest)
  3. Bot explod

Expected result

Bot not explod

Actual result

Bot explod

TypeError: argument must be str
E 2024-01-20 01:05:35,693 asyncio: Exception occurred in raw event dispatch conduit
task: <Task pending name='dispatch VOICE_STATE_UPDATE' coro=<EventManagerBase._handle_dispatch() running at \hikari\impl\event_manager_base.py:609>>
Traceback (most recent call last):
  File "\hikari\impl\event_manager_base.py", line 602, in _handle_dispatch
    await consumer.callback(shard, payload)
  File "\hikari\impl\event_manager.py", line 810, in on_voice_state_update
    event = self._event_factory.deserialize_voice_state_update_event(shard, payload, old_state=old)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\hikari\impl\event_factory.py", line 919, in deserialize_voice_state_update_event
    state = self._app.entity_factory.deserialize_voice_state(payload)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\hikari\impl\entity_factory.py", line 3598, in deserialize_voice_state
    member = self.deserialize_member(payload["member"], guild_id=guild_id)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\hikari\impl\entity_factory.py", line 1809, in deserialize_member
    joined_at = time.iso8601_datetime_string_to_datetime(payload["joined_at"])
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Further info

The joined_at field is now nullable, according to this PR on the DAPI docs:

discord/discord-api-docs#6247

This seems to only affect VOICE_STATE_UPDATE for now(?)

Checklist

  • I have made sure to remove ANY sensitive information (bot token, passwords, credentials, personal details, etc.).
  • I have searched the issue tracker and have made sure it's not a duplicate. If it is a follow up of another issue, I have specified it.
@hypergonial hypergonial added the bug Something isn't working label Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant