Giter Club home page Giter Club logo

rollrobot's Introduction

Roll Robot

https://telegram.me/rollrobot https://telegram.me/edloidas

A Telegram bot that can roll the dice like no one before.

About

Roll Robot is a telegram bot used for common "roll the dice" purposes which is working on group chats.

Description

Roll the dice like no one before. Generate random numbers by default RPG pattern (x)d(y)±(n).

Bot recognizes several commands and can be used in inline mode:

@rollrobot [notation] -- inline request, recognizes both notations /roll [notation] -- default roll, recognizes both notations /full [notation] -- same to '/roll', but shows roll for each dice /random -- 'd100' roll

Notation:

  1. Classic
    [count]d[dice]±[modifier]
  2. World of Darkness
    [count]d[dice][!]>[success]f[fail]
  3. Simplfied (classic, space separated)
    [count] [dice] [modifier]
  4. Single-valued
    [dice] where ...
  • count -- number of rolls
  • dice -- dice type
  • modifier -- value, that will be added or subtracted from result
  • ! -- sign, indicating to repeat
  • success -- minimum roll value, that counts as success
  • fail -- maximum roll value, that counts as fail

Examples:

/roll 20 ➜ 'd20'
/roll 2 10 -1 ➜ result of '2d10-1'
/roll 4d8+3 ➜ result of '4d8+3'
/wod 6d10!>6f1 ➜ number of successes for '6d10!>6f1'
/random ➜ 'd100'

Rate the bot, if you like it.

Your ideas on improvement are welcome.

Configuration

Deployed on Vercel.

  • Set the Config Variables from the app settings in the dashboard to access them from process.env.*.
KEY VALUE DESCRIPTION
TOKEN $TOKEN Token, generated by the BotFather.
PORT 443 Can be any of [ 443, 80, 88, 8443 ]. See API.
HOST 0.0.0.0 Any IP
URL https://appname.vercell.app appname is your app name on Vercel

rollrobot's People

Contributors

edloidas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rollrobot's Issues

Feature Request: Named rolls

As a frequent pnp user I want to name rolls, so that the result is easier to read for others & later.

Possible input syntax: /random Is this a good bot?

Output: (d100) 99 Is this a good bot?

Context: We are using the Bot for Inspiration and NSC decisions in groups with many members. Thus it would be great to have this feature, and it should be easy to implement.

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.