Skip to content

v0.8.3

Latest

Choose a tag to compare

@JayNightmare JayNightmare released this 20 Sep 15:36
· 34 commits to master since this release

DisTrack v0.8.3 Release

Full Changelog: https://github.com/JayNightmare/DisTrack-VSCode-Extension/blob/master/CHANGELOG.md

Patch Notes

  • Added full restart logic for Discord Rich Presence when using "Refresh Discord RPC" command.
  • Visual feedback: spinner in status bar and progress notification during refresh.
  • Prevents concurrent refresh attempts and avoids duplicate RPC listeners.
  • Minor internal refactor of RPC lifecycle for stability.

How to use release

  1. Unzip folder
  2. Open folder in VSCode
  3. Open Terminal inside VSCode -> Use Command Prompt or Git Bash
  4. Run the following
    • npm install -> Doesn't work? Install Node
    • mkdir assets -> Creates a folder called assets
    • cd assets -> Goes inside the assets folder
    • type nul > link.txt -> Creates an empty file called link.txt, put the URL to the back-end here.
    • type nul > discord.txt -> Creates an empty file called discord.txt, put the Discord Bot Token in here.
    • type nul > api.txt -> Creates an empty file called api.txt, put server API key in here.
  5. Open link.txt and enter your back-end server -> Don't have one? Get one here
  6. Open discord.txt and enter your discord bot token -> Don't have one? Get one here
  7. Open api.txt and enter your API key. It should be the same as the one in the back-end.
  8. Go to the Run and Debug tab in VSCode and make sure that Run Extension is present
    • If it doesn't appear, go to .vscode and open launch.json.
    • Ensure launch.json has this code:
{
   "version": "0.2.0",
   "configurations": [
   	{
   		"name": "Run Extension",
   		"type": "extensionHost",
   		"request": "launch",
   		"args": [
   			"--extensionDevelopmentPath=${workspaceFolder}"
   		],
   		"outFiles": [
   			"${workspaceFolder}/dist/**/*.js"
   		],
   		"preLaunchTask": "${defaultBuildTask}"
   	}
   ]
}
  1. Before running, put << in the filter so it only shows the extension
  2. A successful run should show no red text.
  3. Open Terminal and run vsce
  4. Run vsce package, this will create the vscode extension. Should output as dis-track-$VERSION.vsix
  5. Press Ctrl+Shift+P (or click the top search bar than press >) and type Extensions: Install From VSIX
  6. Open the .vsix file
  7. Enjoy your very own Dis.Track Extension

Different Errors you could encounter:

Error Name Reason Solution
Failed to send session data: TypeError: Invalid URL Your link.txt url does not work Check your url is accessible. If it needs a header, you will need to adjust the api.ts file to account for this. If url is correct, use Postman and try sending data to it using POST [endpoint url]/coding-sessions. Once you are able to send data, retry extension.
Failed to fetch language durations: TypeError: Invalid URL Your link.txt url does not work Check your url is accessible. If it needs a header, you will need to adjust the api.ts file to account for this. If url is correct, use Postman and try fetching data to it. Do GET [endpoint url]/user-profile/:userId. Once you are able to receive data, retry extension.
Failed to fetch streak data: TypeError: Invalid URL Your link.txt url does not work Check your url is accessible. If it needs a header, you will need to adjust the api.ts file to account for this.
Failed to fetch leaderboard: TypeError: Invalid URL Your link.txt url does not work Check your url is accessible. If it needs a header, you will need to adjust the api.ts file to account for this. If url is correct, use Postman and try fetching data to it. Do GET [endpoint url]/leaderboard. Once you are able to receive data, retry extension.
Bot Token Null Your discord.txt Bot Token doesn't work Check that the bot token is valid. To get one, go to the application > Settings > Bot > Token