Git Product home page Git Product logo

range-number-generator-bot's Introduction

Range Number Generator Bot

A Telegram bot to generate a random numbers in some ranges based on given number. Please note that one input number generates same set of random numbers.

I mostly created this project in order to practice Rust and create a question number generator for each student at the BP class as TA.

Usage

Simply, compile this project with cargo build --release. Then, create a file named ranges.txt and place it next to the compiled binary. We will talk about this file in next section. After, set the bot token via TELOXIDE_TOKEN environment variable and run the built binary.

rages.txt File Format

The ranges should look like this

begin1 end1
begin2 end2
...

On each line place the one range of numbers you want to have. The end is exclusive but the begin is inclusive. For example:

1 5
5 8
8 10
1 10 

creates four numbers in ranges of [1, 5), [5, 8), [8, 10) and [1 , 10). As can be seen, there is no restrictions on overlaps or the order of numbers. The only restriction is that the end must be more than begin.

range-number-generator-bot's People

Contributors

hirbodbehnam avatar

Watchers

James Cloos 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.