Skip to content

Instantly share code, notes, and snippets.

@Denver-sn
Denver-sn / example_bot.py
Created September 17, 2021 15:49
Example pyTelegramBotAPI with SQLite3 #1
import sqlite3
import telebot
TOKEN = "<YOUR BOT TOKEN>"
bot = telebot.TeleBot(TOKEN)
# I suggest you to download SQLite Studio for creating database and tables...
conn = sqlite3.connect('database.db', check_same_thread=False) # Connecting to the database
cursor = conn.cursor()