vegeta897/snow-stamp

Allow URLs in input box

Nixill opened this issue · 1 comments

Nixill commented

Channels, forum posts, threads, and messages have direct links that are accessible without developer mode enabled. For messages, there is a right-click menu option labeled "Copy Message Link", and it's also accessible in the holding-shift button bar atop messages. For all the others, the option is just "Copy Link".

On mobile, message links are also available via sharing, but my discord client is woefully outdated so I don't know exactly what that looks like.

On Discord's web client, channel links are also available as the current address.

Those links look like one of these (snowflakes anonymized just in case):

  • For a channel, thread, or forum post: https://discord.com/channels/299000000000000000/1058000000000000000
  • For a message: https://discord.com/channels/1039000000000000000/1039000000000000000/1109000000000000000

If such a URL is pasted in the textbox, the snowflake should just be detected as the last section of the URL.

Perhaps the other snowflakes in the URL could be analyzed as well and displayed in a smaller font size? Note that the first snowflake, the guild ID, may instead be replaced with @me in a valid Discord URL when the channel is a DM or Group DM.

Good request, thanks!

When multiple snowflakes are detected, ideally it would display them all, which is related to #157