I made a telegram bot with @botfather and promoted the bot as admin of the public group. Whenever I try to send a message from the python code, it always sends the message to itself, I mean in the private chat and not in the public group.
Snapshot of the code written:
bot_token = 'XXXXXXXXXXXXXXXXXXX'
bot_chatID = '395014927'
bot_message = "Testing"
send_text = 'https://api.telegram.org/bot' + bot_token + '/sendMessage?chat_id=' + bot_chatID + '&text=' + bot_message
response = requests.get(send_text)
response.json()
How can I make the bot to send the message in the group, not to itself?
Am I missing something here or do I need to modify some settings?
EDIT(Solved) : Chat group is always a negative number. Look for that number to get the chat id of that group.