13

WelcomeBot

A Stack Exchange chatbot written in Python that uses ChatExchange. Many parts of this were modeled after SmokeDetector, another Stack Exchange chatbot.


Features

  • Welcomes new users entering chatrooms on chat.stackexchange, chat.meta.stackexchange, and chat.stackoverflow with a custom welcome command made by you
  • Many different chatroom commands:
    • //image (image search term) - searches for and posts images of or relating to the image search term
    • //search (search term) - finds the top three results on google and posts them
    • //choose (choice) or (choice) [or choice...] - makes decisions for you so you don't have to. Can accept more than two choices as long as they are separated by or
    • //weather (city)[, country/state] - gets the weather for whatever location you would like
    • //youtube (youtube search term) - search Youtube for and returns a video of or relating to your search term
    • //source - gives you a link to WelcomeBot's source code on Github
    • //info - tells you the host site, room id, and welcome message
    • //help - tells you all of the commands listed above in case you forget
  • Commands for privileged users:
    • //die - kills the bot if it is acting up
    • //reset - resets the bot just in case
    • //pull - updates the bot with the latest commit on Github
    • //pause - pauses the bot temporarily
    • //start - resumes the bot when it is paused
    • //editmsg [new welcome message] - edit the welcome message
    • //priv [user id] - gives a user the ability to use this command and the six commands listed above

Setup

In all cases, you are supposed to have Git installed, as well as pip Python package manager.

Linux

Run setup.sh:

dev@welcomebot$ ./setup.sh
Setting up WelcomeBot.
Cloning WelcomeBot...
Cloning into 'michaelpri10/WelcomeBot'...
Submodule 'ChatExchange' (https://github.com/michaelpri10/ChatExchange.git) registered for path 'ChatExchange'
Cloning into 'ChatExchange'...
Submodule path 'ChatExchange': checked out '...'
Successfully installed beautifulsoup4-4.4.0
Successfully installed requests-2.7.0
Successfully installed websocket-client-0.32.0
Setup completed.

dev@welcomebot$ ./setup.sh --help
Set up WelcomeBot.

Usage:
  ./setup.sh [--help | --no-clone]

Options:
  --help      Print this help message and exit
  --no-clone  Do NOT clone a WelcomeBot git repo (default behavior when inside a repo)

You can obtain our setup.sh from our Releases list on GitHub; in that case, it will try to clone and install the WelcomeBot version it was released for.

Otherwise you can git clone the latest development version of WelcomeBot source code from GitHub yourself and then run setup.sh included in repository.

Windows

On Windows, installation is not so straightforward. You first have to clone WelcomeBot source code yourself:

C:\Users\WelcomeBot> git clone https://github.com/michaelpri10/WelcomeBot.git
Cloning into 'WelcomeBot'...
C:\Users\WelcomeBot> cd WelcomeBot

And then run setup.bat included in repository:

C:\Users\WelcomeBot\WelcomeBot> .\setup.bat

To run WelcomeBot, run nocrash.sh and log in with your Stack Exchange OpenID credentials.


Why use WelcomeBot?

  • Make new users feel welcome in your chatroom
  • Have fun in your chatroom

Source Code

  • How do you set the welcome command? (Oh, and I think you meant git submodule update.) – zondo Nov 2 '16 at 1:50
  • @zondo I've update the post, everything should be there now. You can use //editmsg to change the welcome message – michaelpri Nov 2 '16 at 23:43

You must log in to answer this question.

Browse other questions tagged .