Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Luciano Barletta
/
message-service
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
1
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit e358019c
authored
2024-04-26 11:32:12 -0300
by
juan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
aviso de telegram
1 parent
0eb94787
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
telegranerror.py
telegranerror.py
0 → 100644
View file @
e358019
#!/usr/bin/python3
import
requests
TOKENapi
=
"1783332062:AAHQIjnrsebVrs7LpIvivqgc5vaqUQSagUQ"
URL
=
"""https://api.telegram.org/bot{}/sendMessage?chat_id={}&text={}"""
#import socket , time
#hostname=socket.gethostname()
#IPAddr=socket.gethostbyname(hostname)
#texto = "Name "+hostname+ " IP Address "+IPAddr
#test = True
#while test:
# time.sleep(30)
def
Notificar
(
texto
):
try
:
url
=
URL
.
format
(
TOKENapi
,
"836078789"
,
texto
)
requests
.
get
(
url
)
#test = False
except
:
pass
\ No newline at end of file
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment