Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • PircBot - IRC chat now working


    greekhaima

    Recommended Posts

    PircBot - IRC chat now working 

    This code works by itself but not integrated with Dreambot. 

     

    Goal: I'm trying to get twitch chat to integrate it with my bot. 

     

    Issue: Can't get messages from Twitch

     

    Can do: I can connect and send messages successfully to twitch but the reading part is not working

    import org.jibble.pircbot.PircBot;
    
    public class TwitchChat extends PircBot {
    
        public TwitchChat(){
            this.setName("TwitchPlays");
        }
    
        protected void onMessage(String channel, String sender, String login, String hostname, String message){
    
            log("new message:");
            log(message);
        }
    
    }
    

     

    this is the code in the OnStart for dreambot:

    //twitchBot:
     TwitchChat chat = new TwitchChat();
     chat.setVerbose(true);
     try {
         chat.connect("irc.chat.twitch.tv", 6667, "oauth:EXAMPLE");
     } catch (IOException e) {
         log(e.toString());
     } catch (IrcException e) {
         log(e.toString());
     }
    
     chat.joinChannel("#b0aty");
    
     log(chat.toString());
    
     //chat.sendMessage("#b0aty", "coool");//WORKS

     

    Seems like the event is not being fired or cached. Any thoughts ?

     

     

     

     

     

    I have also found this website for free socks5 proxies which work great: 

    https://freeapiproxies.azurewebsites.net/

    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.