Skip to content

OnePythoneer/quote-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

quote-bot

A Telegram bot that sends random quotes on demand or on a daily schedule.

Setup

pip install "python-telegram-bot[job-queue]"

Create a bot via @BotFather on Telegram and copy the token.

export BOT_TOKEN=your_token_here   # Mac / Linux
set BOT_TOKEN=your_token_here      # Windows
python bot.py

A quotes.json file is included with 20 quotes to get started.

Commands

command what it does
/start welcome message
/quote get a random quote
/subscribe daily quote at 9am
/unsubscribe stop daily quotes
/help list commands

Notes

  • Daily quote sends at 9am in the machine's local timezone.
  • Subscriptions reset if the bot restarts. Re-send /subscribe to resume.

Adding quotes

Edit quotes.json and add any string to the array.

[
  "Your quote here",
  "Another one"
]

Built by NullPointer · hire.nullpointer@proton.me

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages