wakatime / discord-wakatime

BetterDiscord plugin for automatic time tracking and stats about your Discord usage
https://wakatime.com/discord
BSD 3-Clause "New" or "Revised" License
12 stars 2 forks source link

OS, machine #1

Closed khayo closed 5 months ago

khayo commented 5 months ago

I started using the discord plugin recently and I don't know if I did something wrong, but the OS and hostname are not being detected. I looked at the code to see if it passed this information at the time of the heartbeat, I also looked at the wakatime API documentation to understand where this information is collected from and I couldn't find out how it is obtained. These are screenshots of my wakatime dashboard. This problem is occurring on a Windows machine, I have not tested it in a Linux environment.

image image image

Oh, one more thing, on the wakatime website where the plugins are listed, the link to download the plugin files shows a not found message

alanhamlett commented 5 months ago

We need to detect the OS and pass that along with the plugin string here:

https://github.com/wakatime/discord-wakatime/blob/439f67f488fff77c22d54c73a7f4adb04b496552/discord-wakatime.plugin.js#L69

Thanks, fixed the link.

alanhamlett commented 5 months ago

Detecting OS with 03a74ad83448d9fb3015cb2637ebf525fbe49207, but I think we should use process to do it more accurately. I'll get a fix soon.

Also detecting hostname by reading /etc/hostname on Linux. For Windows and Mac I'll have to find another way to detect hostname.

alanhamlett commented 5 months ago

Fixed in v1.0.1.