gitprofile icon indicating copy to clipboard operation
gitprofile copied to clipboard

Add Discord as social link

Open nathen418 opened this issue 2 years ago • 8 comments

This PR adds the option to include a Discord server link in the social links section. Currently, the text that is displayed is the invite code as I didn't have a better idea of what to display for the link title. Feel free to suggest something else.

Partially resolves #380

nathen418 avatar Jul 10 '23 03:07 nathen418

I also have a pr in the works to convert the mastodon link into a generic activity pub link so people can put whatever platform supports the activity pub protocol in there, not just exclusively mastodon but it needs a bit more work Imo. I'll submit that later.

nathen418 avatar Jul 18 '23 21:07 nathen418

@nathen418 I was thinking about how we can solve the issue with the link as the current implementation does not produce any valid link to the Discord profile. I was thinking like this:

discord: {
  displayName: 'john',
  userId: 123123123,
},

Let me know what do you think?

arifszn avatar Jul 27 '23 05:07 arifszn

So what would the clickable link be? Or would this option omit one?

The reason for how I structured the option to display an invite code and link to an invite was because there isn't a way to get a link to a discord user's profile unless you do something like discord://-/users/603629606154666024 which only seems to work on mac and windows and only if you are friends with the user and the application is registered as a uri handler for the discord:// protocol. At the moment I handle this by doing this manually which is not ideal.

If we don't need a link to a profile or something then I think doing

discord: {
  displayName: 'john',
  userId: 123123123,
},

in gitprofile.config.js is a fine way to do things, I would just suggest changing displayName to userName as this is the user's actual semi-permanent username

nathen418 avatar Jul 27 '23 06:07 nathen418

We would have a link. I was thinking like this: https://discordapp.com/users/515878023111901184. If you visit the link, can you find my profile?

arifszn avatar Jul 27 '23 06:07 arifszn

Also, discord://-/users/603629606154666024 does not seem to do anything on my end. I am on windows machine and I don't have the discord app installed.

arifszn avatar Jul 27 '23 06:07 arifszn

We would have a link. I was thinking like this: https://discordapp.com/users/515878023111901184. If you visit the link, can you find my profile?

Since I am not friends with you on Discord that link just redirects to https://discord.com/channels/@me so that won't work and I guess neither will my discord:// way apparently

nathen418 avatar Jul 27 '23 06:07 nathen418

Ah bummer. Then we should find another approach. How about when the user clicks on the discord name, it copies the username only and we display a popup notification saying the username is copied?

arifszn avatar Jul 27 '23 07:07 arifszn

Yeah I like that idea. I can throw together an update to the pr in a few hours.

nathen418 avatar Jul 27 '23 11:07 nathen418

Closing due to inactivity.

arifszn avatar Jan 20 '24 12:01 arifszn