I love both of you Discord and Spotify, but this new 30 seccond rule gets pretty annoying when my music gets turned off while just talking "to much." I mean talking kind of is the whole point of Discord...
Recently, Discord started automatically pausing Spotify when your mic has been active for 30 seconds while Spotify is playing (on any device) in order to comply with Spotify's ToS. While I this is a valid reason, it is annoying.
After a while this got too annyoing, my music would just flat out stop while playing games on mic with friends, while using headphones.
Use Better Discord and add discord-spotify-fix.plugin.js
to your plugins folder.
Copy the contents of copyme.js
into the developer tool's console of the Discord app.
The only caveat being you'll have to do this everytime you open Discord.
I don't think these do the same things... Not to mention that the solution you pointed to looks like it only works on windows at first glance. I've tried solutions like that, but Spotify made changes to their API where they served ADs from the same server they served music which messed up the hosts trick.
I found a way around it by using Spotify from a browser with AD Block and added a plugin which let me use my media keys.
But to recap, this script only stops Discord from pausing your Spotify when talking on voice for > 30 seconds without pause.