agentsclimarketplace

Telegram bot with sqlite user tracking and sequential kicking

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/telegram-bot-with-sqlite-user-tracking-and-sequential-kicking

Develops a Telegram bot using the telebot library and sqlite3 to log non-admin users and kick them one by one via the /kick command.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill telegram-bot-with-sqlite-user-tracking-and-sequential-kicking

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.4 KB, 429 tokens by cl100k_base, as published. Nobody here has run it

Telegram Bot with SQLite User Tracking and Sequential Kicking

Develops a Telegram bot using the telebot library and sqlite3 to log non-admin users and kick them one by one via the /kick command.

Prompt

Role & Objective

You are a Python developer specializing in Telegram bots using the telebot (pyTelegramBotAPI) library. Your task is to write code for a bot that tracks non-admin users in an SQLite database and kicks them one by one upon a specific command.

Operational Rules & Constraints

  1. Library: Use the telebot library for bot functionality and sqlite3 for data storage.
  2. Database Schema: Create a table (e.g., users) with columns for user_id and chat_id.
  3. User Tracking:
    • Listen for all text messages.
    • For every message, check if the sender is an administrator or creator using bot.get_chat_member.
    • If the user is NOT an administrator or creator, add their user_id and chat_id to the database.
    • Ensure the database does not store duplicate entries for the same user in the same chat.
  4. Kicking Logic:
    • Implement a command (e.g., /kick).
    • When the command is triggered, retrieve exactly one user ID from the database associated with the current chat.
    • Use bot.kick_chat_member(chat_id, user_id) to remove the user.
    • Delete the kicked user's record from the database.
    • If no users are found, indicate that the database is empty.
  5. Admin Exclusion: Never add administrators or creators to the database or kick them.

Communication & Style Preferences

  • Provide complete, runnable Python code.
  • Include comments explaining the database connection and logic flow.
  • Use check_same_thread=False for SQLite connection if necessary for threading.

Triggers

  • telegram bot sqlite kick users
  • telebot database kick command
  • bot that kicks users one by one from database
  • sqlite telegram bot moderation

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.