@bot.callback_query_handler(func= lambda call:True)
def answer(call):
if call.data == 'like1':
bot.send_message(message.chat.id, "Лайк 1")
if call.data == 'like1':
bot.send_message(message.chat.id, "Лайк 1")
import telebot
import config
import schedule, time
import pymysql
from telebot import types
bot = telebot.TeleBot(config.TOKEN)
con = pymysql.connect(host='localhost',
user='root',
password='root',
db='musicbd',
charset='utf8mb4')
with con:
cur = con.cursor()
cur.execute("SELECT * FROM music LIMIT 1")
rows = cur.fetchall()
for row in rows:
print(row[0], row[1], row[2])
def send_messange():
delete_query = "DELETE FROM music WHERE id LIMIT 1"
cur.execute(delete_query)
con.commit()
schedule.every().day.at('19:23').do(send_messange)
while True: # этот цикл отсчитывает время. Он обязателен.
schedule.run_pending()
time.sleep(1)
bot.polling()
{
"_from": "brawlstars.js",
"_id": "brawlstars.js@1.1.0",
"_inBundle": false,
"_integrity": "sha512-howFuI8kZ8tMmS6CbAPqo1lIV/Ktx0DOE2tuMHorIASSfYYzOedWysB4ZMRNio5BfH9eaxUnv0V8m2tGWz5R+A==",
"_location": "/brawlstars.js",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "brawlstars.js",
"name": "brawlstars.js",
"escapedName": "brawlstars.js",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/brawlstars.js/-/brawlstars.js-1.1.0.tgz",
"_shasum": "696fc25044b479dadc10765703b229e65228cb91",
"_spec": "brawlstars.js",
"_where": "C:\\Users\\danil",
"author": {
"name": "@dannyhpy",
"url": "https://dannyhpy.xyz"
},
"bugs": {
"url": "https://github.com/dannyhpy/brawlstars-nodejs/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "@diogolo",
"url": "https://atlar.fr/"
}
],
"dependencies": {
"node-fetch": "^2.6.0"
},
"deprecated": false,
"description": "API Wrapper for Brawl Stars",
"directories": {
"example": "examples",
"lib": "lib"
},
"homepage": "https://github.com/dannyhpy/brawlstars-nodejs#readme",
"keywords": [
"Brawlstars",
"Brawlstars API Wrapper",
"Brawlstars library",
"Brawlstars Javascript"
],
"license": "Apache-2.0",
"main": "index.js",
"name": "brawlstars.js",
"repository": {
"type": "git",
"url": "git+https://github.com/dannyhpy/brawlstars-nodejs.git"
},
"scripts": {
"test": "node examples/test.js"
},
"version": "1.1.0"
}
База у меня стоит на локалке запускаю с помощью Open Server, все работает и не жалуюсь