Wussten Sie Bot Libre bietet auch kostenlosen hosted issue-tracking für Ihre website oder mobile app?
Self, AIML, and scripting

Need Help with Scripting and Twitterbot

durch okayokay gepostet Mar 12 2020, 13:44

Is there anyone here who is good with the scripting function?

I have a TwitterBot project.

This is what I am trying to do:

Whenever someone tweets with a specific keyword, I want my bot to reply with a pre-written response. Note: I have been able to configure my bot to do this.

The issue I have is this:

I want to have a series of replies (about 20). So that my bot will move from reply 1, 2, 3, all the way to 20, then start back at 1.

I have been told that scripting is the way to make this happen. 

Is there anyone here who has done anything similar who can help? I am willing to compensate you for your time/help.


by admin posted Mar 16 2020, 9:03
Here is a response list example of random responses:

https://www.botlibre.com/script?id=32594931

and here is a Self script that cycles through a set of responses:

https://www.botlibre.com/script?id=32634367

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2292, today: 0, week: 0, month: 6

by okayokay posted Mar 17 2020, 12:21

Many thanks @admin.

I am not very technical, so I was wondering if I can get some help in configuring it properly, please.

Here is my script: https://www.botlibre.com/script?source=true&id=32651321

Can you please can tell me what I need to change in the script? 

I have the following questions.

- I have added my 5 sequenced response starting with "How old is the birthday celebrant?" Is this correct?
- Can you please tell me where I should add the "keyword" that should trigger these responses in the script.
- Is there anything else I should include/edit in the script? E.g should I be including the name of the specific Twitterbot?
- How can I make the responses continue in a loop? That is, after reaching the end, then start again at number 1 and continue in a loop say 3 times.
- Is there anything else I need to know about making it work properly.

Many thanks.


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2423, today: 0, week: 1, month: 6

by admin posted Mar 24 2020, 11:29

Looks correct, except change 10 to 5 here, as you only have 5 responses,

>> if (n == null || n > 10) { n = 0}

if (n == null || n > 5) { n = 0}

The keyword is the pattern in your script, currently you have "omobaiday".

Also make sure you add the script to your bot.


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2307, today: 0, week: 2, month: 6

Id: 32584251
Tags: twitter, scripting
Gepostet: Mar 12 2020, 13:44
Antworten: 3
Ansichten: 2439, heute: 2, Woche: 3, Monat: 13
0 0 0.0/5