2022-08-24 12:13:22 +02:00
|
|
|
import requests
|
2022-08-24 12:34:06 +02:00
|
|
|
|
2022-08-24 11:35:04 +02:00
|
|
|
from win10toast import ToastNotifier
|
2022-08-24 12:13:22 +02:00
|
|
|
|
2022-08-24 14:14:11 +02:00
|
|
|
filename = 'epic_games.ico'
|
2022-08-24 12:13:22 +02:00
|
|
|
url = "https://api.plenusbot.xyz/epic_games?country=IT"
|
|
|
|
response = requests.get(url).json()
|
|
|
|
# Title of current games
|
2022-08-24 12:34:06 +02:00
|
|
|
current_games_title = response['currentGames'][0]['title']
|
2022-08-24 12:13:22 +02:00
|
|
|
|
2022-08-24 12:34:06 +02:00
|
|
|
toast = ToastNotifier()
|
2022-08-24 14:14:11 +02:00
|
|
|
toast.show_toast(title="New games!", msg="There is a new game on Epic Games Store " + current_games_title , icon_path=filename,duration=10,threaded=False)
|