Browse Source

Merge pull request #100 from cclauss/patch-1

pull/40/head^2
Jack Sweeney 2 years ago committed by GitHub
parent
commit
92a15a4f0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      configs/mainconf.ini.example
  2. 4
      defTelegram.py

8
configs/mainconf.ini.example

@ -2,7 +2,7 @@
#Source to pull data from
#SHOULD BE ADSBX which is ADS-B Exchange or OPENS which is OpenSky
#By default configured with OpenSky which anyone can use without a login
#ADS-B Exchange has better data but is not avalible unless you feed their network or pay.
#ADS-B Exchange has better data but is not available unless you feed their network or pay.
SOURCE = RpdADSBX
#Default amount of time after data loss to trigger a landing when under 10k ft
DATA_LOSS_MINS = 5
@ -33,7 +33,7 @@ PASSWORD = None
API_KEY = none
API_VERSION = 2
#Define the delay interval in seconds between each data request. This is usefull if you have limited requests in the API.
#Define the delay interval in seconds between each data request. This is useful if you have limited requests in the API.
[SLEEP]
SLEEPSEC = 60
@ -41,7 +41,7 @@ SLEEPSEC = 60
#API KEY for Google Static Maps only if you using this on any of the planes.
API_KEY = googleapikey
#Used for failover messages and program exits notifcation
#Used for failover messages and program exits notification
[DISCORD]
ENABLE = FALSE
USERNAME = usernamehere
@ -61,4 +61,4 @@ CONSUMER_SECRET = cs
[MAP]
#Map to create from Google Static Maps or screenshot global tar1090 from globe.adsbexchange.com
#Enter GOOGLESTATICMAP or ADSBX
OPTION = ADSBX
OPTION = ADSBX

4
defTelegram.py

@ -28,11 +28,11 @@ def sendTeleg(photo, message, config):
print('Telegram module couldn\'t find an image to send.')
break
elif str(err) == 'Media_caption_too_long':
print('Telegram image caption lenght exceeds 1024 characters. Message not send.')
print('Telegram image caption length exceeds 1024 characters. Message not send.')
break
else:
print('[X] Unknown Telegram error. Message not sent.')
break
else:
print("Telegram message successfully sent.")
return sent
return sent

Loading…
Cancel
Save