The Inner Circle chat bot.
MIT License
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.
Add the following entry to /etc/hosts
:
127.0.0.1 inner-circle-bot.local
To set up your local environment variables copy .env.example
to .env
then
set the variables in the .env
file.
cp .env.example .env
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
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
ngrok http -host-header=rewrite http://inner-circle-bot.local:80
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
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.
Please report bugs to the GitHub Issue Tracker.
This project is licensed under the MIT License.