This Python script generates a markdown profile for each of your Discord friends, including their profile picture, common servers, and mutual friends. It does this by making API calls to the Discord API using your Discord token as authentication. The user ID is simply needed to make the call to the right profile.
The script makes the following API calls to the Discord API:
/api/users/@me/relationships: This call retrieves a list of your Discord friends./api/users/:user_id/profile: This call retrieves the profile information for a specific Discord user.
The script uses your Discord token to authenticate with the Discord API. This token is a unique identifier that gives the script permission to access your Discord account data.
The script generates a markdown profile for each of your Discord friends in the current directory. The profiles will be named in the format {friend_name}.md.
---
tags: 427602381943624704 714889120336318551
alias: 1234567890 Username
---
# Username
## Previously known as: Legacy Username
## bio
> This is the user's bio.
# Common friends
[[Friend 1]] [[Friend 2]] [[Friend 3]]
![[Username.png]]- The script will only generate profiles for friends who have enabled the "Allow direct messages from server members" setting.
- The script will skip any friends who have a private profile.
- The script will sleep for 4 seconds between each profile generation to avoid overloading the Discord API.
- Clone this repository to your computer.
- Install the required dependencies:
pip install requests
- Replace the
Discord_tokenandDiscord_IDvariables in the script with your own Discord token and user ID. - Run the script:
python main.py
- You can use the
Discord_IDvariable to generate a profile for a specific Discord user. - You can use the
tagsvariable to filter the profiles generated by the script. For example, you could only generate profiles for friends who are members of a specific server. - You can use the
aliasvariable to generate a custom alias for each friend. This can be useful if you have friends with long or difficult-to-remember usernames.
To use the Discord Profile Generator with Obsidian to see the backlinks connection that are being made, you will need to:
- Create a vault in Obsidian.
- Clone the Discord Profile Generator repository into the vault.
- Install the required dependencies:
pip install requests discord-py
- Replace the
Discord_tokenandDiscord_IDvariables in the script with your own Discord token and user ID. - Run the script.
- Open the profiles generated by the script in Obsidian.
Obsidian will automatically create backlinks between the profiles and any other notes in your vault that mention the friends' usernames.
- You should never share your Discord auth key with anyone.
- The Discord Profile Generator script is still under development and may contain bugs. Use it at your own risk.
- Clone the Discord Profile Generator repository into your Obsidian vault.
- Install the required dependencies:
pip install requests
- Replace the
Discord_tokenandDiscord_IDvariables in the script with your own Discord token and user ID. - Run the script.
- Open the profiles generated by the script in Obsidian.
Obsidian will automatically create backlinks between the profiles and any other notes in your vault that mention the friends' usernames.
To visualize your friend group, you can use the backlinks feature to create a graph. To do this, simply click on the "Graph View" button in the backlinks pane.
The graph will show how your friends are connected to each other, with nodes representing the friends and edges representing the backlinks. You can use the graph to identify common friends, clusters of friends, and friends who are not well-connected to the rest of your friend group.
For example, the following graph shows a friend group with three clusters:
Alice -> Bob -> Charlie
-> David
-> Eve
Frank -> George
Henry -> Isaac
This graph shows that Alice is the most well-connected friend in the group, with backlinks to Bob, Charlie, David, and Eve. It also shows that Frank and George are not well-connected to the rest of the friend group.
You can use the Discord Profile Generator and Obsidian to create a graph of your own friend group to visualize how it looks from your perspective. This can be a helpful way to identify friends who you may not be connecting with as much, or to identify clusters of friends who share common interests.
Using the Discord Profile Generator with Obsidian is a great way to keep track of your Discord friends and stay connected with them. The backlinks feature makes it easy to see how your friends are connected to each other and to your other notes in Obsidian.
