Skip to content

Sequencing of events? #55

Description

@MorrowM

This is more of a question than an issue, but is there a way to figure out which event occurred first between two events?

My use-case is that I have a bot that sends join and leave messages into a text channel whenever someone joins or leaves an associated voice channel. I have a handler which reacts to VoiceStateUpdateEvts and sends the appropriate message. The issue is that sometimes someone joins and immediately leaves a voice channel (or vice-versa). When that occurs it can sometimes happen that the leave event is handled before the join event which means the messages are sent out of order.

So my question is whether there's a way to recover such ordering information. From the Discord API I see there's some sort of sequence number but I'm not sure whether that's suitable for this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions