This commit is contained in:
dsyoon
2023-10-27 14:27:28 +09:00
parent d3ee0354c9
commit d81456ff77

View File

@@ -1,5 +1,6 @@
from datetime import datetime
import telegram
import asyncio
from multiprocessing import Pool
class TelegramBot:
@@ -35,9 +36,9 @@ class TelegramBot:
@staticmethod
def send(text):
client = telegram.Bot(token="6435061393:AAHOh9wB5yGNGUdb3SfCYJrrWTBe7wgConM")
client = telegram.Bot(token="6874078562:AAEHxGDavfc0ssAXPQIaW8JGYmTR7LNUJOw")
#client.sendMessage(chat_id='574661323', text=text)
client.send_message(chat_id='574661323', text=text)
asyncio.run(client.send_message(chat_id='574661323', text=text))
return
def alarm_live(self, stock_code, stock_name):
@@ -80,3 +81,5 @@ if __name__ == "__main__":
telegramBot = TelegramBot()
telegramBot.alarm_live(stock_code, stock_name)
telegramBot.post(stock_code, stock_name, type, price, count)