The Message Bot


#1278

Its still a work in progress. Most of the code for it is written but hasn’t been tied together just yet.


#1279

That’s why Basileus doesn’t have the MB.
Knowing that Wingy is an active Message Bot coder, I wondered why he hadn’t it on there.


Is it just me, or am I coming up with too many ideas?


#1280

Idea for analytics extension:

If the player is banned, it tells who banned them, and when they banned them.


#1281

I’m working on updating the log viewer extension (going through each extension and updating them)… and am having some trouble telling what options would be most helpful to users.

Screenshot of currently released viewer:

Screenshot of in progress viewer.

Am I missing something that would help you out?


#1282

Amazing, that would be!


#1283

Added one more option that I found useful – context. Using context=5 will show 5 messages before and after the message that was actually matched. I’m pretty sure this upgrade is essentially done unless someone comes up with a great idea I totally overlooked.


#1284

Ooh, context would be awesome. I can’t remember, did you have a way to filter out messages like join and leave messages from the server or other stuff we might consider to just be “noise”.


#1285

I haven’t added that in, I will do that though :slight_smile:

Noise to filter so far (checkbox for each):

  • Joins
  • Leaves
  • Messages from server
  • Messages from the world (addRider, etc)

Am I missing anything?


#1286

Maybe pvp messages? (Those are wicked.)


#1287

Coming soon to a bot near you :wink: – Just 13 (I think) extensions left to port before it’s ready for release.

@THEHACKKNIGHT pvp messages are handled under world messages already :slight_smile:


#1288

So close, yet so far.


#1289

So this would filter everything but chat?


#1290

That’s the idea. So you can just read a conversation without the clutter of server messages. But you can always leave them in if you’re looking for when people join or whatever.

Hey @Bibliophile as you’re porting the /count timer, could you make it so that /timer was per player? It would be nice if a player couldn’t interrupt another player’s timer by saying /done. And also we could have races where we take the times of each rider and accumulate them. (e.g. Stage racing.) If you don’t have time, that’s ok, maybe I could tackle it since it was my extension.


#1291

Maybe also a Hot Potato Extension

It would loop the words hot potato hot potato, then suddenly shout STOP


#1292

I have a suggestion for whoever created the /where extension. Was it @Wingysam? Could you maybe add an option setting so that /where just lists how long ago someone was seen? That would be easier than calculating the time ourselves based on gmt, especially when a lot of people won’t know what gmt is, and need the /gmt command to figure it out. This way it would just say, Jemni was seen 2 hours, 43 minutes ago on SKYLANDS ARENA by JEMNI


#1293

Good idea. I’ll attempt to implement it in the extension for the future bot.


#1294

Okay. I think this is stable enough that I can officially announce a beta. There is still a lot of work to be done, but I know some people (@I-Love-Creation) have been waiting for this for a while so I’d like to let people know where I’m at.

The Message Bot 7.0 Beta is here! It isn’t done yet, but it is mostly stable and can be used.


Change list

  1. Terminal / Command Prompt support! With 7.0 Mac servers are officially supported through a command line interface (more details below). Note: You can still load the bot with a bookmarklet.

  2. Better extension page, the old page was incredibly hard to read. Extensions are now displayed in a table format to make it easier to quickly scan names.

  3. Better backup / restore options. Downloading / uploading the backup is much faster than copying / pasting it, especially when the code gets exceedingly long (cough Jemni cough).

  4. Extension repositories. In 6.0, all extensions had to be listed on the Message Bot Blockheads Fans page to show up in the extensions tab. You can now add custom repositories to load extensions from other sources. The default extension list is hosted on GitHub, but so long as the page follows the required format (described in the README) extensions can be loaded from anywhere.

    Notes

    • Extension repositories outside of the above GitHub repo are out of my control. If you use them, you use them at your own risk.
    • Currently available extension repos:
      Maintainer Description Repo link
      Bibliophile The default repo https://gitcdn.xyz/cdn/Blockheads-Messagebot/Extensions/master/extensions.json (default)
      Bibliophile For developer extensions https://gitcdn.xyz/repo/Blockheads-Messagebot/Extensions/master/developers.json
      Bibliophile For beta extensions https://gitcdn.xyz/repo/Blockheads-Messagebot/Extensions/master/extensions_beta.json
      Wingysam http://mb.wingysam.xyz/

Todo list

  • Lots of extensions
  • Rework how messages are displayed for joins / leaves / triggers to make it easier to configure the bot
  • Support installing extensions on the console bot more easily

Developer release notes

Documentation

Changes

  1. Added a developer mode checkbox under settings, this setting makes the bot automatically load any registered extensions and automatically unload / reload the extension if it is registered again to ease development.

  2. Updated the Marco Polo tutorial for the latest API

  3. The bot is now written in Typescript. This change was made since using a static type system can prevent ~15% of bugs. Extensions can be written using either JavaScript or Typescript.

  4. The bot UI code now uses the latest Bulma release (0.6.1)

  5. The bot now uses the blockheads-api npm package to support both Mac and cloud servers with (essentially) the same code.


Terminal bot & Mac servers

Setup is similar on Mac / Windows, first, install dependencies

Mac Dependencies Setup

  1. Open a Terminal window
  2. Install Homebrew
  3. Run brew install node
  4. Run brew install yarn
  5. Close the terminal
  6. Go to Bot Setup

Windows Dependencies Setup

  1. Install Node
  2. Install Yarn
  3. Go to Bot Setup

Bot Setup

  1. Open a terminal / command prompt
  2. Choose a directory to install the bot into and go to that directory using cd <dir>
  3. Clone the latest bot code: git clone https://github.com/Blockheads-Messagebot/Console-Loader.git bot
  4. Go into the bot’s directory cd bot
  5. Install dependencies yarn
  6. Build the bot yarn build
  7. Copy config.default.json in the config directory to config.json in the config directory.
  8. If you are setting up a cloud bot, edit the config.json file to include your portal username / password
  9. Run yarn worlds or yarn worlds:mac to list your worlds and copy the name and ID of the world you want to run the bot on into config.json.
  10. Run yarn cloud or yarn mac to start the world on your cloud or mac server, respectively.
  11. Open http://localhost:8008/ to configure your bot. Extensions are not yet completely supported.

Bookmarklet bot

The bookmarklet will only work on new browsers. Internet Explorer and iOS 10 and under are not supported. (This may change on release – be sure to reply if the steps below don’t work for you!). Browser support is currently limited as it greatly decreases the size of the bot.

Setup: Follow the instructions in the OP, but use this for the link

javascript:(function(){if (!window['@bhmb/bot']){document.head.appendChild(document.createElement('script')).src='https://gitcdn.xyz/cdn/Blockheads-Messagebot/Browser-Loader/master/bundle.js';}}())

Notes:

Your current configuration is not used by the beta bot. It will be moved over once the bot is released.


Discord

I have (mostly) set up a Discord server for announcements about beta progress to avoid cluttering this thread too much, if you are having issues when I’m online, I will also be able to help you more quickly there.


#1295

Thank you so much! :heart_eyes:

Really! Thank you for your time and effort! :blush:

—I’ll tell all our “Basilians” the great news! :nerd_face:


#1296

Suggestion: Discord bot integration. A Discord bot is made to relay any information from the Message bot to the discord server. The discord bot could have a random number generator, and assign an ID to a discord server upon joining. When the message bot is added to a cloud world or mac server, the world is also assigned the same, corresponding ID. This would be useful in situations like pinging admins when a player needs it, or to give something like a special reward in an event, etc.


#1297

I did this, and Milla told me to pull it from the store.