Giter VIP home page Giter VIP logo

tg-rs's Introduction

TG-RS

Travis Codecov

Project layout

Examples

In order to run examples you need to create a .env file:

# Logging settings
# See https://docs.rs/env_logger/ for more information
#
# Used in all examples
RUST_LOG=info

# A telegram bot token
#
# Used in all examples
TGRS_TOKEN=YOUR-BOT-TOKEN-HERE

# Proxy:
#
# * http://\[user:password\]@host:port
# * https://\[user:password\]@host:port
# * socks4://userid@host:port
# * socks5://\[user:password\]@host:port
#
# Used in all examples
# TGRS_PROXY='socks5://user:password@host:port'

# Updates will be denied for all except given username
# Specify a username without @
#
# Used in access example
TGRS_ACCESS_USERNAME=username

# A redis URL for session store
#
# Used in session_counter_redis example
TGRS_REDIS_URL=redis://127.0.0.1/0

# An URL to a random gif
#
# Used in send_file example
TGRS_GIF_URL='https://66.media.tumblr.com/3b2ae39de623518901cdbfe87ffde31c/tumblr_mjq1rm7O6Q1racqsfo1_400.gif'

# An URL to a random photo
#
# Used in media_group example
TGRS_PHOTO_URL='https://vignette.wikia.nocookie.net/ergoproxy/images/c/c5/Re-lmayer.png'

# A path to a random photo
#
# Used in send_file and media_group examples
TGRS_PHOTO_PATH='/home/user/data/photo.jpg'

# A path to a random video
#
# Used in send_file and media_group examples
TGRS_VIDEO_PATH='/home/user/data/video.mp4'

# A path to a random document thumbnail
#
# Used in send_file example
TGRS_DOCUMENT_THUMB_PATH='/home/user/data/document_thumb.jpg'

# A rate-limit strategy:
#
# * direct - limit all updates
# * all_users - limit updates per user ID for all users
# * all_chats - limit updates per chat ID for all chats
# * list - limit updates for specific chat id or user id
#
# Used in ratelimit example
TGRS_RATE_LIMIT_STRATEGY=list

# User ID to limit (available for list strategy only)
# Specify an integer user id or username string (without @)
#
# Used in ratelimit example
TGRS_RATE_LIMIT_USER_ID=userid

# Chat ID to limit (available for list strategy only)
# Specify an integer chat id or chat username string (without @)
#
# Used in ratelimit example
TGRS_RATE_LIMIT_CHAT_ID=chatid

# Chat ID for notifications
# Specify an integer chat id or chat username string (without @)
#
# Used in notify example
TGRS_NOTIFICATION_CHAT_ID

Code of Conduct

See CODE_OF_CONDUCT.md.

tg-rs's People

Watchers

 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.