Change URL commands/command_freegame.py
This commit is contained in:
parent
63d2352b46
commit
ae02cc9433
|
@ -4,7 +4,7 @@ def freegame_command(message, bot):
|
|||
chat_id = message.chat.id #Get chat id
|
||||
#Connect to API
|
||||
try:
|
||||
url = "https://api.plenusbot.xyz/epic_games?country=IT" #URL API
|
||||
url = "https://minty.apexie.dev/v1/epicfreegames" #URL API
|
||||
response = requests.get(url).json() #API in JSON
|
||||
#Take data from API (Current Game 1)
|
||||
image_currentgames1 = response['games'][0]['mainImage'] # First image current games
|
||||
|
@ -41,4 +41,4 @@ def freegame_command(message, bot):
|
|||
except IndexError:
|
||||
print("No third game")
|
||||
except:
|
||||
bot.send_message(chat_id, "An error occurred")
|
||||
bot.send_message(chat_id, "An error occurred")
|
||||
|
|
Loading…
Reference in New Issue