zuehue commited on
Commit
74919fe
·
verified ·
1 Parent(s): 7e5e924

Update send_message.sh

Browse files
Files changed (1) hide show
  1. send_message.sh +5 -5
send_message.sh CHANGED
@@ -1,15 +1,15 @@
1
  #!/bin/sh
2
- echo "hello niggas"
3
  # Define the message to be sent
4
  MESSAGE="Hello, testing new domain"
5
 
6
  # Define the URL for the Telegram Bot API
7
- URL="https://api.basthofer.com/bot${BOT_TOKEN}/sendMessage?chat_id=${CHAT_ID}&text=${MESSAGE}"
8
 
9
- # Send the message using curl
10
- RESPONSE=$(curl -i -X GET $URL)
11
 
12
  # Print the response
13
  echo "Response from server:"
14
  echo "$RESPONSE"
15
- echo "curl was sent"
 
1
  #!/bin/sh
2
+
3
  # Define the message to be sent
4
  MESSAGE="Hello, testing new domain"
5
 
6
  # Define the URL for the Telegram Bot API
7
+ URL="https://api.basthofer.com/bot${BOT_TOKEN}/sendMessage"
8
 
9
+ # Send the message using curl with POST and JSON
10
+ RESPONSE=$(curl -i -X POST $URL -H "Content-Type: application/json" -d "{\"chat_id\":\"${CHAT_ID}\",\"text\":\"${MESSAGE}\"}")
11
 
12
  # Print the response
13
  echo "Response from server:"
14
  echo "$RESPONSE"
15
+ echo "curl was sent"