Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Snowflake is comparable to UInt64 #147

Merged
merged 1 commit into from
Jul 7, 2018
Merged

Snowflake is comparable to UInt64 #147

merged 1 commit into from
Jul 7, 2018

Conversation

z64
Copy link
Contributor

@z64 z64 commented Jul 7, 2018

This makes Snowflake a little easier to work with for a common simple use case, comparing to a known literal value:

client.on_message_create do |payload|
  next unless payload.author.id == 120571255635181568_u64
  # Only process messages from z64 here
end

Currently you need to do payload.author.id.to_u64, etc.

@meew0 meew0 merged commit 500d05c into discordcr:master Jul 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants