Some suggestions


Hey, first I would like to say that this bot is amazing.

I got a few idea’s that ran in my head in the last few months, and I was wondering if it will be possible to make them come into reality

  1. in the twitter integration, if it will be possible to edit the format, because right now, the bot shows in the chat the tweets of the people it follows, but it doesn’t show their name in the msg

  2. The !addcom function is awesome, and I feel that it would be even better, if we could add not just one response from the bot, but multiple ones, and allowing to decide how long it will take between each response.

This would open so many options (for example to tell the bot to add points, add the name to a list ect ect)

  1. conditioned !addcom, the bot search in a specific text file for a line, and only if this line appears/ doesn’t appear, the command will be activated.

  2. some sort of macro command, for example, every week on monday at 20:00, the bot will type !letitrain


Your first suggestion is probably a limitation to the Twitter API, IO handles most of the Twitter stuff but he or Scania will have to chime in here.

As for the last three they would slow down command handling quite a bit, you can copy bits and pieces of existing scripts (or just make your own) to do all of this for you pretty easily. Which is really the recommended way to handle anymore more complex that what we currently offer.

If you decide you want to take 30 minutes to a few hours (depending on learning speed/how much you want to get into it) we have a post in the documentation section on the forums that has some helpful links for basic scripting in PhantomBot.


cool, I will take a look at that :slight_smile:


By “their name” do you mean their Twitter Display name instead of just their Twitter ID? Can you provide a more clear example?


sorry for the late response, had some exam and had to focus on it.

this is an example of how the bot shows tweets

as you can see, the bot displays its only its own name, which just take space in the chat.

I think that it would be better if the bot would just show the twitter display name and then the tweet.


also, would it be hard to make the word counter to count words from the first text log the chat has, and not just start a new one?


That first field is from Twitch, we cannot remove that. Twitch always provides the name of the user [or bot] that provides a line of text in chat. PhantomBot does not generate that at all.


Probably not difficult, you could write a JavaScript hook to go back and parse all of your log files. That would raise your system load and hammer the drive trying to gather all of that information though. Also, logs automatically age off, so, you never really have “the first log.” This is nothing that I would personally code, as it would be a resource hog.


the [twitter feed] thing is directly from twitch? Oo

and it would be resource hog if it will look for the word every time, but I was thinking about the bot looking for the word only when you add it for the first time, and then act exactly like it is working now.


You said the name. Not the [Twitter Feed]. Edit the language file to change the output.


Feel free to code it :slight_smile: It is a resource hog when it has to scan every log file for a word everytime a new word is added.


cool thanks for this info :slight_smile:


I didn’t say which language file, sorry:


$.lang.register('twitter.tweet', '[Twitter Feed From @(twitterid)] $1');
$.lang.register('twitter.tweet.mention', '[Twitter Feed From @(twitterid)] @$1: $2');


For suggestions on customizing the language files.


what do I put instead of twitterid, if I want to put the display name of the person who tweeted?


Do you mean their Twitch Display Name?


their twitter display name yeah.


In short, no. Twitter has rate limits on each lookup which is why it was never included originally. The Twitter API doesn’t return that information by default and requires an additional lookup.

If you want to put the display name manually:

‘Tweet from Whatever I Want to Put Here: $1’

Would work. But, we do not lookup the Display Names that may be referenced in the Tweet in anyway, if that is what you mean.

If I am misunderstanding, I will tell you what I tell my development team that I manage at work:

Create me a concise user story with clear examples. :slight_smile: Show me what you want to see, what helps a ton.


basically, the bot twitter account is following like 150 people IIRC

when one of them is tweeting something (lets say person X), I want the bot the type in chat something like
[PersonXDisplayName]: “msg”


So, you want to scan the timelines of folks that the bot follows and report what they tweeted into chat? Not items tweeted at the bot? And you are using a bot account instead of your account for the bot to interact with Twitter?


exactly, items tweeted by the bot seems pretty irrelevant for my chat.

my bot has his own bot account yeah.