Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text from script #8

Open
fak0r opened this issue Jul 25, 2014 · 3 comments
Open

Text from script #8

fak0r opened this issue Jul 25, 2014 · 3 comments
Labels

Comments

@fak0r
Copy link

fak0r commented Jul 25, 2014

Hi :)

Is it possible to send text to the bot from an external script?

e.g.
./mybot.ps1 -text "my fancy text" -channel "mychannel"
The Bot will then post "my fancy text" on "mychannel"

Could be usefull as an rss-reader or something like that

@alejandro5042
Copy link
Owner

Yes! You can do that. Basically, you can write a new bot that connects to the IRC server and sends a private message to your existing bot. Your existing bot will need to listen to messages that are not from a specific channel. All this information is in the $Message object. You can pass in custom data to your bot on the command-line by the -State switch that places that object in the $Bot.State object. This object can be anything, such as the message you want the bot to send and the username of the other bot you wish to send to (you can use a hash). You can wrap this bot up in a custom script too, and inline your actual bot script with the -BotScript argument. You can get as fancy as you want!

@alejandro5042
Copy link
Owner

Here's another option.... you can have your bot join another channel that you monitor, for instance by sending /join #devchannel You can send your bot instructions through this channel or private message channel. I've done that for development.

@HumanEquivalentUnit
Copy link

#10 is a possible response to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants