Skip to content

Commit

Permalink
Merge pull request #89 from RAnders00/patch-1
Browse files Browse the repository at this point in the history
Send whispers in own channel instead of #jtv
  • Loading branch information
gempir committed Mar 24, 2019
2 parents dca1cf8 + 6aa58d0 commit be3234d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (c *Client) Say(channel, text string) {
// so your message might get blocked because of this
// verify your bot to prevent this
func (c *Client) Whisper(username, text string) {
c.send(fmt.Sprintf("PRIVMSG #jtv :/w %s %s", username, text))
c.send(fmt.Sprintf("PRIVMSG #%s :/w %s %s", c.ircUser, username, text))
}

// Join enter a twitch channel to read more messages
Expand Down
2 changes: 1 addition & 1 deletion client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ func TestCanWhisperMessage(t *testing.T) {
t.Fatal("no privmsg received")
}

assertStringsEqual(t, "PRIVMSG #jtv :/w gempir "+testMessage, receivedMsg)
assertStringsEqual(t, "PRIVMSG #justinfan123123 :/w gempir "+testMessage, receivedMsg)
}

func TestCanJoinChannel(t *testing.T) {
Expand Down

0 comments on commit be3234d

Please sign in to comment.