Closed ThEGuYwItHSuP closed 7 months ago
You just mentioned the GitHub user with the username "user". Also I'll look into it soon.
i meant as in the promt. it can be any username. "Invite @(enter username here) to Listen To Spotify"
I know, but you can also mention GitHub users by name like that, and I'm pretty sure it notifies them when someone @'s them. Was just letting you know.
Wanted to ask how is the search going?
The problem is with the following code:
if((msg[1].content !== undefined && msg[1].content != "") && runs == 0)
Basically, it sees that the message content is empty, and cancels the message.
Spotify invites and other activityAction
s are an exception where a message with no content is allowed on the API, so I forgot to add a case for it.
The fix is simply to add a special case where if an activityAction
is included in the message parameters, the empty content of the message is ignored, or add a comment to the Spotify invite which will allow it to send correctly.
The corrected code will look something like this:
if((msg[1].content !== undefined && (msg[1].content != "" || msg[2].activityAction != undefined)) && runs == 0)
If you try to invite someone using the "Invite @username to Listen to Spotify" whilst the plugin is activated it wont send the invite.