Skip to content
Peter Goodman edited this page Jun 14, 2014 · 16 revisions

To get started with mmbot, you can run from source or use NuGet and create your own runner.

Running from Chocolatey

The best plan is to use chocolatey...

# chocolatey can install mmbot globally
cinst mmbot

# Now create a folder to host the scripts and config, then from that dir...
mmbot --init

# You're ready to go...
mmbot

When you need an adapter to talk to your chat rooms use the nuget command line (you can install it via chocolatey) as long as it is in your "path"

nuget install mmbot.jabbr -o packages

To browse the script repository from the mmbot prompt or chat room

mmbot scripts

To install a script from the repository

mmbot download script ascii

When you want a script that is in nuget (from the command line in the mmbot instance path)

nuget install mmbot.scriptit -o packages

...or simply drop the .csx file in the "scripts" folder ...or even better use the scriptthis and scriptgist scripts to input them inline or pull from a gist!!!

See Powershell scripts for when you want to execute powershell commands.

To configure the bot read Configuring mmbot

Running from source

  1. Clone this repo or download the source and build the solution.
  2. Run the mmbot project. - More info in Configuring mmbot

Running as a service

To run mmbot as a windows service you will need to reference the mmbot executable. If you installed using chocolatey the executable should be under "%ChocolateyInstall%\lib\mmbot.0.9.7.4\tools\mmbot\mmbot.exe" or if running from source the location of your bin\build directory.

You'll also need to use the -d or --directory switch to specify where your mmbot initialized directory is located since windows services' working directory is under the system32 folder. You can skip the -d switch and initialize the system32 directory but it is not recommended.

You will also need to specify the -s or --runAsService switch, to run mmbot as a service - if you omit this parameter then you will get "timeout" errors waiting for the service to start.

An example of creating the windows service: > sc create MMBotService binPath= "%ChocolateyInstall%\lib\mmbot.0.9.2\tools\mmbot\mmbot.exe -s -d D:\MMBotData"

From here you can start the service using net start MMBotService or from powershell Start-Service MMBotService. You may also wish to set such options as the logon account and startup options using the services console (services.msc).

Why no launching from scriptcs

I really wanted to be able to start mmbot from scriptcs but there are currently a number of blockers.

  • One of the packages that scriptcs uses does not play nice with scriptcs.
  • mmbot is itself a scriptcs host and there are conflicts in scriptcs assembly versioning when attempting to create an mmbot instance within the scriptcs environment.

Hopefully these can be resolved at some point so that we can just use a scriptcs setup.