Like to code?
Latest: join the CodeChallenge group: https://www.icanhazchat.com/group/codechallenge.
Write a bot
Recommended: the ICHC WebAPI
Learn more about it here!
You can right-click and save this file to your local drive, to create/debug your own bot:
What a bot must implement (required)
- var bot_name
- a global string that describes the bot
- var bot_active
- a global boolean that indicates when the bot is running
- function botStart()
- called when the bot is started. Initialize your data and start interacting with the room here
- function botEnd()
- called when the bot is shutting down (the game is over, etc).
What a bot could implement (optional)
- botProcessLine(who, line)
- If a bot implements this, it will be called every time someone (’who’) sends a message (’line’) to the room
- function botHi(who)
- If a bot implements this, it will be called every time someone enters the room
- function botBye(who)
- If a bot implements this, it will be called every time someone leaves the room
- function botCamUp(who)
- If a bot implements this, it will be called every time someone cams up
- function botCamDown(who)
- If a bot implements this, it will be called every time someone cams down
What is available for a bot to use
- function botSend(s)
- sends the string ’s’ to the room. Do not use it to the flood the room.
- function log(s)
When you are ready to run a bot in a room, use the ’/bot-start’ command to added your bot source to the page. You can unload the bot by refreshing the page. Run/test it in small test rooms, get room mods permission before running in larger rooms.
Created something cool? Share it with others by posting it to the ’code codechallenge’ group.