Skip to content

raageth/telegram-swear-jar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Swear Jar

A telegram bot that allows users to set specific banned words and count the instances of each group member saying any of the words. python-telegram-bot and Supabase used.

Usage

Add words that the users would like to count by running /addword. Send the words with a space as a delimiter. /cancel is used to cancel the interaction with the bot. Add Words

Messages are recorded and if the text matches any word in the list the bot will be triggered. Count of Words

Running /score allows users to check a tallied count for each member. Score

Process

1. Create a bot with BotFather

2. Create a keys.py file and store the API key

key = "API KEY"

3. Create a supabase project and store the API url and key in keys.py

SUPABASE_URL = "SUPABASE_URL"
SUPABASE_KEY = "SUPABASE_KEY"

4. Create the tables

"records" table "words" table

5. Create the view

create view score as
select username, SUM(count) as total_count from records
group by username
order by total_count desc

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages