Mirror of https://github.com/Jxck-S/plane-notify
This is the backend to ElonsJet and other bots
acasads-badsbadsbexchangeadsbxairportemergency-squawklandopenskyopensky-apiopensky-networkplaneresolutionadviosrysquawktakeofftcas
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
402 B
10 lines
402 B
from discord_webhook import DiscordWebhook |
|
import configparser |
|
config = configparser.ConfigParser() |
|
config.read('config.ini') |
|
def sendDis(message): |
|
webhook = DiscordWebhook(url=config.get('DISCORD', 'URL'), content=message, username=config.get('DISCORD', 'USERNAME')) |
|
|
|
with open("map.png", "rb") as f: |
|
webhook.add_file(file=f.read(), filename='map.png') |
|
response = webhook.execute() |