walmat/nebula-old

Sync Discord Rich Prescence Version with Frontend Version

pr1sm opened this issue · 1 comments

pr1sm commented

Is your feature request related to a problem? Please describe.
#421 adds Discord Rich Presence functionality to the frontend and includes the current version the bot runs on. However, this version is statically set and will need to get updated manually when a new version is released.

Describe the solution you'd like
Instead of manually updating the version every time we release a new version, we should rely on electrons app.getVersion() function to retrieve and use that version. This would keep the Discord Rich Presence version in line with the current frontend version.

Describe alternatives you've considered
There are other methods to retrieve the frontend's current version, but none are as clean as using electron, since everything is done using a single function.

Additional context
Originally from https://github.com/walmat/nebula/pull/421#discussion_r279166144

pr1sm commented

Looks like the semver package includes some utility functions to parse/retrieve parts of a version string. This could be useful for formatting purposes, since a version string like 1.0.0-beta.7.4 doesn't look as clean as Beta v7.4.