Compare commits

...

4 Commits

Author SHA1 Message Date
Stefano Assenzo 5e3cf25cda
Change URL commands/command_soon.py 2023-03-05 19:26:37 +01:00
Stefano Assenzo ae02cc9433
Change URL commands/command_freegame.py 2023-03-05 19:26:15 +01:00
Stefano Assenzo 63d2352b46
Change URL for events/check_game.py 2023-03-05 19:25:43 +01:00
Stefano Assenzo f1bf4a5d9a
Change URL for events/notification_game.py 2023-03-05 19:25:23 +01:00
4 changed files with 8 additions and 8 deletions

View File

@ -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")

View File

@ -4,7 +4,7 @@ def soon_command(message, bot):
chat_id = message.chat.id #Get chat id
try:
# Get data from API
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 (Future Game 1)
@ -46,4 +46,4 @@ def soon_command(message, bot):
img_3 = bot.send_photo(message.chat.id, image_futuregames3) # Send image third future games
send_message = bot.send_message(chat_id, title_description_3, parse_mode="HTML") # Send all
except IndexError:
print("No third game")
print("No third game")

View File

@ -11,7 +11,7 @@ def recheck_game(collection_game, collection_id, bot):
def a(collection_game, collection_id, bot):
try:
#Connect to API
url = "https://minty.apexie.eu/v1/epicfreegames" #URL API
url = "https://minty.apexie.dev/v1/epicfreegames" #URL API
response = requests.get(url).json() #API in JSON
# Title of current games
@ -55,4 +55,4 @@ def a(collection_game, collection_id, bot):
recheck_game(collection_game, collection_id, bot)
except:
print("An error occurred")
recheck_game(collection_game, collection_id, bot)
recheck_game(collection_game, collection_id, bot)

View File

@ -6,7 +6,7 @@ def notification_game1(collection_game, collection_id, bot):
try:
print("Try to send first game")
url = "https://minty.apexie.eu/v1/epicfreegames"
url = "https://minty.apexie.dev/v1/epicfreegames"
response = requests.get(url).json()
#All information for first game
@ -78,4 +78,4 @@ def notification_game3(collection_game, collection_id, bot,):
sendata2 = collection_game.update_one({'_id':ObjectId(array_game3)}, {"$set": send_game3}, upsert=False)
except:
print("An error occurred")
recheck_game(collection_game=collection_game, collection_id=collection_id, bot=bot)
recheck_game(collection_game=collection_game, collection_id=collection_id, bot=bot)