6
6
7
7
load_dotenv ()
8
8
9
- TELEGRAM_BOT_API_KEY = os .environ .get ("TELEGRAM_BOT2_API_KEY" )
9
+ TELEGRAM_BOT2_API_KEY = os .environ .get ("TELEGRAM_BOT2_API_KEY" )
10
10
TELEGRAM_CHAT_ID = "610574272"
11
11
12
12
def send_telegram_message (bot_token , chat_id , message ):
@@ -34,10 +34,10 @@ def get_chat_id(bot_token):
34
34
35
35
def send_reminder (message ):
36
36
"""Sends a reminder message to Telegram."""
37
- if TELEGRAM_BOT_API_KEY and TELEGRAM_CHAT_ID :
38
- send_telegram_message (TELEGRAM_BOT_API_KEY , TELEGRAM_CHAT_ID , f"Reminder: { message } " )
37
+ if TELEGRAM_BOT2_API_KEY and TELEGRAM_CHAT_ID :
38
+ send_telegram_message (TELEGRAM_BOT2_API_KEY , TELEGRAM_CHAT_ID , f"Reminder: { message } " )
39
39
else :
40
- print ("TELEGRAM_BOT_API_KEY and TELEGRAM_CHAT_ID are not set." )
40
+ print ("TELEGRAM_BOT2_API_KEY and TELEGRAM_CHAT_ID are not set." )
41
41
42
42
def main ():
43
43
parser = argparse .ArgumentParser (description = "Telegram Bot Script" )
@@ -46,7 +46,7 @@ def main():
46
46
args = parser .parse_args ()
47
47
48
48
if args .job == 'get_chat_id' :
49
- bot_token = TELEGRAM_BOT_API_KEY
49
+ bot_token = TELEGRAM_BOT2_API_KEY
50
50
chat_id = get_chat_id (bot_token )
51
51
if chat_id :
52
52
print (f"Chat ID: { chat_id } " )
0 commit comments