Mobot is an AIML chatbot for Slack. You can customize mobot to work in your Slack team.
You can Install the following dependencies using pip or easy_install
- PyAIML Python AIML Interpreter
- SlackClient Slack API wrapper
$ pip install aiml
$ pip install slackclient
First make sure you rename api_keys_example.txt file to api_keys.txt. Get your Slack API token and paste it in the file.
slack_api_key = "xoxp-1111111111-22222222222-33333333333-4444444444"
In utils.py under the configure_chatbot() method you can customize all of the chatbot's predictates; such as, name, age, favorite sport team, etc.
kernel.setBotPredicate("name" , "mobot")
kernel.setBotPredicate("age" , "25")
kernel.setBotPredicate("birthday" , "Nov. 23, 1995")
kernel.setBotPredicate("birthplace" , "Cairo, Egypt")
All files in the aiml directory make up mobot's personality. You can go through these files one by one and modify specific responses that you want mobot to provide. All aiml files are part of Alice standard aaa us-english aiml files which you can download here
$ python chatbot.py # will join all channels
$ python chatbot.py -j general # will join general channel only
$ python chatbot.py -j general random # will join general and random channels
- Mobot will only respond back to users addressing it directly as @mobot.
- Mobit will greet new users joining channels.
- You can further extend mobot to do different things when different events happen.