[
]clojars [
]cljdoc-link
A Telegram Bot that mentions you when your specified text in a chat matches.
Using the lemme-know-bot code in your own project.
To build the service JAR or use the Docker container instead, go to the next section.
Leiningen/Boot Project file
[lemme-know-bot "0.3.0"]
In the REPL
(require '[lemme-know-bot.core :as lemme])
In your application
(ns my-app.core
(:require [lemme-know-bot.core :as lemme]))
Supported environment variables and whether they are required to be provided.
Variable | Default | Description | Required? |
---|---|---|---|
BOT_TOKEN | none | Token for bot to authenticate to the Telegram servers. | Yes |
LKB_SEARCHES | "/tmp/lemme-know-bot-searches.edn" | File for saving search state to. | No |
LKB_SLEEP | 10000 | Sleep time in ms between long polls. | No |
LKB_TIMEOUT | 10 | Timeout in seconds to wait while long polling. | No |
Building the Java Jar and running it or the Docker container.
Before building the JAR or running the docker container:
Proceed with either the Docker or Jar instructions.
# Docker volume name (docker volume ls)
DOCKER_VOL=lemme-know-bot
docker volume create ${DOCKER_VOL}
# Container path for the search state (matches the Dockerfile)
CONTAINER_SAVE_DIR=/usr/src/app/state
docker run \
--detach \
--name lemme-know-bot \
--env BOT_TOKEN="MY-TOKEN-HERE" \
--env LKB_SEARCHES=${CONTAINER_SAVE_DIR}/lemme-know-bot-searches.edn \
--volume ${DOCKER_VOL}:${CONTAINER_SAVE_DIR} \
wdhowe/lemme-know-bot
Pre-reqs for building the Java Jar.
lein uberjar
export BOT_TOKEN="MY-TOKEN-HERE"
java -jar lemme-know-bot-VERSION-standalone.jar
Once the service is running from one of the above methods:
Copyright © 2020 Bill Howe
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version, with the GNU Classpath Exception which is available at https://www.gnu.org/software/classpath/license.html.
Can you improve this documentation? These fine people already did:
wdhowe & Bill HoweEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close