java - PircBotX Private Message -


when user executes command, send output user, not channel.

i'm using pircbotx framework.

my code:

public void onmessage(messageevent<pircbotx> event) {     if (event.getmessage().equalsignorecase("!test")){         event.respond("test successful.");      }else if (event.getmessage().split(" ")[1].equalsignorecase("!test2")){         event.getchannel().send().message("this response works");         event.respond("this response works");         event.getuser().send().message("but not work");     } } 

according documentation, event.getuser().send().message("xyz"); should private message.

the documentation states bot.sendmessage should private message, doesn't work either.

for both of these, console output looks normal.

one thought have origin of issue: i'm building twitch.tv chat bot. possible (although their api page not mention this) private messages disabled.

are trying send whisper ?? if take @ https://discuss.dev.twitch.tv/t/sending-whispers-with-my-irc-bot/4346/6 need connect irc server send whisper/private messages


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -