How to retrieve all users who using a bot?
How to retrieve all users who using a bot?
The telegram API has no such methods. You can save users to the database.
So how we can save them to the database?
So how we can save them to the database?
@bot.message_handler(commands=['start'])
def send_welcome(message):
conn = psycopg2.connect(connection)
cursor = conn.cursor()
cursor.execute(insert_user_sql, (message.chat.id,))
conn.commit()
bot.reply_to(message, "Howdy, how are you doing?")
So how we can save them to the database?
@bot.message_handler(commands=['start']) def send_welcome(message): conn = psycopg2.connect(connection) cursor = conn.cursor() cursor.execute(insert_user_sql, (message.chat.id,)) conn.commit() bot.reply_to(message, "Howdy, how are you doing?")
Can I use Firebase for database storage? Is there are any other options?
So how we can save them to the database?
@bot.message_handler(commands=['start']) def send_welcome(message): conn = psycopg2.connect(connection) cursor = conn.cursor() cursor.execute(insert_user_sql, (message.chat.id,)) conn.commit() bot.reply_to(message, "Howdy, how are you doing?")Can I use Firebase for database storage? Is there are any other options?
you can use any storage you want. even a txt file
So, if this supports Firebase, how I can configure it?
Sent from my iPad
On Oct 5, 2019, at 1:52 AM, alexshavelev44 [email protected] wrote:
So how we can save them to the database?
@bot.message_handler(commands=['start']) def send_welcome(message): conn = psycopg2.connect(connection) cursor = conn.cursor() cursor.execute(insert_user_sql, (message.chat.id,)) conn.commit()
bot.reply_to(message, "Howdy, how are you doing?")Can I use Firebase for database storage? Is there are any other options?
you can use any storage you want. even a txt file
― You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.