-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Parse and display multiple snowflakes #157
Comments
Interesting, I didn't know about this. What would you expect the result to be? |
adding something like snowflake = snowflake.split("-").at(-1) before https://github.com/vegeta897/snow-stamp/blob/main/src/convert.js#L13 should do the trick as we dont care for the left hand side part after the split |
I'm sort of wondering if it would be better to strip it out of the input box on paste before it reaches validation, because syncing the URL with that two-part snowflake might get kind of messy. |
yh that is also a good approach, i was just looking at convert js so didnt think of the lol |
The only part I don't like about automatically stripping it out is that it's kind of bad UX if the user doesn't understand what's happening when they see something different than what they pasted. I could use this opportunity to develop support for pasting in multiple snowflakes. If it detects multiple, however delimited, it could convert the input into a multi-line and show a snowflake on each line, and let you select which one to show the conversion for (with one selected automatically by default, to avoid requiring an extra click in this use-case). The URL would be the selected snowflake. |
i would recommend against it, as take this |
If that is the channel ID then yes, it would be when the channel is created. Snow-Stamp's job is to convert snowflakes to timestamps, so I want to keep the input>output results as unsurprising as possible. Automatically ignoring the first snowflake in a pair like that just because the user likely copied it from a message feels like bad design to me. By automatically splitting up the input into the two snowflakes, the user can understand what happened and get the result they were looking for, it seems like win/win to me. |
This multi-input idea would also be a good start for implementing #155 Now I have to decide whether I want to do all this before or after a typescript/sveltekit rewrite. |
When you hold shift on a message it opens a new context menu that lets one quickly copy the id but the return value is different
returns
423250272316293120-938804470408699954
(channel_id-message-id) instead of just938803791346679809
(message-id)currently using this will yield
The text was updated successfully, but these errors were encountered: