Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
update ham_keys.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Ptechgithub committed Aug 11, 2024
1 parent 7ae284f commit b2e8735
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ham_keys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,11 @@ generate_key() {

# Send to telegram
send_to_telegram() {
local message=$1
curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
-d chat_id="$TELEGRAM_CHANNEL_ID" \
-d text="$message" >/dev/null 2>&1
local message=$1
curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
-d chat_id="$TELEGRAM_CHANNEL_ID" \
-d text="$message" \
-d parse_mode="MarkdownV2" > /dev/null 2>&1
}

# key process
Expand Down Expand Up @@ -204,6 +205,7 @@ main() {

if [[ -n "$key" ]]; then
message="${games[$game_choice, name]} : $key"
telegram_message="\`${key}\`"
echo "$message" | tee -a my_keys.txt
send_to_telegram "$message"
else
Expand Down

0 comments on commit b2e8735

Please sign in to comment.