PircBot: Using /me? reddit / irc ---------------------------------------------------------------------- royalot2002 · 2016-04-20 21:39 I already have a thing set up so that when someone types, "!hello", my bot responds with "Hello!". However, I want to make it so that when a user types in "!slap (user)" that my bot slaps the user. How would I go about doing this? ---------------------------------------------------------------------- rOOb85 · 2016-04-21 03:06 Pircbot is a awesome framework to play with. Make sure to check out their java docs as they provide a lot of useful info http://www.jibble.org/javadocs/pircbot/index.html you will most likely be most interested in all the on* and send* methods. To answer your question you will need to "listen" for the trigger in the onMessage() method then send a "notice" to the channel. Pic it may even have a sendAction() method as well. So in pseudo code: inside the onMessage() listen for !slap nickname then sendNotice(channel, "!slaps " + message.subString(5)). ---------------------------------------------------------------------- m1ss1ontomars2k4 · 2016-04-21 07:33 Almost all of that information is stuff OP already knows, seeing as he already has his bot responding to !hello command. OP wants to know how to do a /me action specifically, which is sendAction. ---------------------------------------------------------------------- royalot2002 · 2016-04-21 19:17 Thank you so much! This will work for now, but however, I did want to make it look like in the /me format, as posted by the user below. How would I do this with sendAction and make it a /me? ---------------------------------------------------------------------- rOOb85 · 2016-04-21 19:37 No problem. It's been a long time since I've messed with IRC, but IIRC /me is just a notice to the channel? Like sendNotice(channel, "slaps " + message.subString(5)). If it's not just check out the javadocs I linked in my original answer. Such as: You are using sendMessage(String target, String message) already. Notice the two parameters it requires? target is either a user or channel and the message is whatever you want it to say. Now check out the javadocs for sendAction(): sendAction(String target, String action). It takes pretty much the same thing, a target and a action. So you could do sendAction(channel, "slaps " + message.subString(5)). If you are new to java and programming in general I highly suggest taking a few minutes and check out all the methods they offer. Hopefully this makes sense and you can put the pieces together. ---------------------------------------------------------------------- royalot2002 · 2016-04-21 22:47 Thank you so much! I'm very new to PircBot, and to Java as a whole, so you really helped me. I can't thank you enough! :D ---------------------------------------------------------------------- rOOb85 · 2016-04-22 00:51 No problem! I used to hang out on IRC a lot when I was learning java and pircbot was the perfect project to get me motivated to code.