Code Monkey home page Code Monkey logo

inner-circle-bot's Introduction

The Inner Circle Bot

License Build Status StyleCI Author


Requirements

For development

Setting up a Local Development Environment

Create a Telegram Bot

In order to test the application locally you will first need to create your own Telegram bot to interact with. See the Telegram docs for instructions on creating and configuring your own bot.

Configure the Hostname

Add the following entry to /etc/hosts:

127.0.0.1  inner-circle-bot.local

Set Environment Variables

To set up your local environment variables copy .env.example to .env then set the variables in the .env file.

cp .env.example .env

Start the Docker Environment

To build and start the containers on your system for the first time run the following from the project's root directory:

docker-compose up -d

Install PHP dependencies

composer install

or from within the Docker container:

docker run -it --rm --env-file ${PWD}/.env --user $(id -u):$(id -g) --volume ${PWD}:/app composer:1.9 \
    && composer install --working-dir /app --ignore-platform-reqs --no-cache --no-interaction --no-scripts

Create application tunnel via ngrok

ngrok http -host-header=rewrite http://inner-circle-bot.local:80

Set the Telegram bot webhook URL

curl --request POST --header 'content-type: application/json' \
    --url https://api.telegram.org/bot{{ TELEGRAM_TOKEN }}/setWebhook \
    --data '{"url": "{{ NGROK_URL }}/{{ TELEGRAM_TOKEN }}"'

For more info, see https://core.telegram.org/bots/api#setwebhook

List of Commands

btc - Get the market price (in USD) for bitcoin (`/btc [YYYY-MM-DD]`)
busy - Generate a random "busy" message
coinflip - Flip a coin
dilbert - Get a Dilbert comic (`/dilbert [YYYY-MM-DD | random]`)
eightball - Consult the Magic Eightball (`/eightball [question]`)
explosm - Fetch a Cyanide & Happiness comic (`/explosm [id]`)
foxtrot - Fetch the latest FoxTrot comic
monkeyuser - Fetch the latest MonkeyUser comic
ping - Verify bot connectivity
roll - Roll some dice (`/roll [ 2d6 | 1d10 | etc ]`)
slap - Slap somone around a bit (`/slap <name>`)
smbc - Fetch the latest smbc comic
xkcd - Retrieve an XKCD comic (`/xkcd [id]`)

ℹ️ Parameters

  • Parameters in angled brackets (<...>) are REQUIRED.
  • Parameters in square braces ([...]) are OPTIONAL.

Troubleshooting

Please report bugs to the GitHub Issue Tracker.

Copyright

This project is licensed under the MIT License.

inner-circle-bot's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar phlak avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.