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
  • Try asking for help in the chatbox
  • Sending chat messages


    Nazeradom
     Share

    Recommended Posts

    Hi everyone,

    I have been able to successfully receive and read chat messages from the API but I can't for the life of me figure out how to send a chat message.

    I am planning on implementing a chatbot API for extra realism but it all hinges on being able to send chat messages.

     

    Does anyone know how to send chat messages using the API?

     

    Thanks in advance.

    Link to comment
    Share on other sites

    Hi everyone,

     

    I have been able to successfully receive and read chat messages from the API but I can't for the life of me figure out how to send a chat message.

    I am planning on implementing a chatbot API for extra realism but it all hinges on being able to send chat messages.

     

    Does anyone know how to send chat messages using the API?

     

    Thanks in advance.

    look into the keyboard category on the api

    Link to comment
    Share on other sites

    Thanks, it is the getKeyboard().type() method.

     

    The thing that threw me is that it type takes Object, Boolean but you can pass a string as an object? 

    For example:

    getKeyboard().type("How's the fishing going?", true);

    Anyway this is exactly what I needed, thanks.

    Link to comment
    Share on other sites

    Thanks, it is the getKeyboard().type() method.

     

    The thing that threw me is that it type takes Object, Boolean but you can pass a string as an object? 

    For example:

    getKeyboard().type("How's the fishing going?", true);

    Anyway this is exactly what I needed, thanks.

    An Object is basically everything in Java. An Object stands "above" every type in Java, which means it can take every type E.G. String, int, long, even a boolean if im not wrong.

    Link to comment
    Share on other sites

    An Object is basically everything in Java. An Object stands "above" every type in Java, which means it can take every type E.G. String, int, long, even a boolean if im not wrong.

    'int' and 'long' are primitive types not objects. Integer and Long are objects.

    Edited by slasso
    Link to comment
    Share on other sites

    'int' and 'long' are primitive types not objects. Integer and Long are objects.

    Yeah thats basically what i meant lol

    Link to comment
    Share on other sites

     Share

    ×
    ×
    • 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.