Code Monkey home page Code Monkey logo

storybot's Introduction

StoryBot

A choose your own adventure Telegram bot.

This bot will read stories written in TOML format and present them to the user. A simple story follows:

title = "The house that loved Sam"

[start]
description = "You are in a house. A familiar house, but it is dark."

[[start.options]]
text = "Turn on the light"
page = "turn-on-light"

[[start.options]]
text = "Don't turn on the light"
page = "no-turn-on-light"

[[start.options]]
text = "Offer food"
page = "offer-food"

[turn-on-light]
description = "You turn on the light, and seen the mighty Nuala.  She casts her gaze upon you, warming your blood, and then, with a whisk of her tail, captures your heart."
ending = "won"

[no-turn-on-light]
description = "You leave the light off; better safe than sorry.  A rumbling sound starts to form next to you; A rhythmic purring sound, that grows louder and louder.  You begin to relax, your breathing slows, and a Nuala sleeps next to you."
ending = "won"

[offer-food]
description = "You stumble around in the dark, reaching for a tin of cat food. You find one and pull it open, dirting yourself in the process. As you search for a bowl you hear a licking sound, surely cleaning the food from your hand. With great haste you prepare the food and place it on the floor. The licking turns to crunching, before fading away, purring, forever purring. Leaving you, in the dark, wondering if you should turn the light on."
ending = "won"

When the user starts, they will be shown the list of stories using the title and when they choose a story, they will first be shown the description and then the list of options if they exist. Each option has the text to show the user and the link. If a page has an ending, then the story will end there, but depending on whether the text is won or death, the user will be shown a different message.

storybot's People

Contributors

kumo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.