Skip to content

Commit 2571e36

Browse files
committed
Merge branch 'dekudeals' of https://github.com/rNintendoSwitch/MechaBowser into dekudeals
2 parents 8f0d8aa + 66b4d6c commit 2571e36

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

modules/games.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,14 @@ async def _games_search(self, interaction: discord.Interaction, query: str):
194194
embed = discord.Embed(
195195
title=game['name'],
196196
url=f"{game['deku_link']}?{DEKU_UTM}&utm_content=mechabowser-game-search",
197-
timestamp=self.get_db_last_update()
197+
timestamp=self.get_db_last_update(),
198198
)
199199
embed.set_footer(text=f'Data last fetched')
200200

201201
embed.set_author(
202202
name='Data provided by DekuDeals',
203203
url=f'https://www.dekudeals.com/games?{DEKU_UTM}&utm_content=mechabowser-game-search',
204-
icon_url='https://www.dekudeals.com/favicon-32x32.png'
204+
icon_url='https://www.dekudeals.com/favicon-32x32.png',
205205
)
206206

207207
if game['image']:
@@ -219,12 +219,11 @@ async def _games_search(self, interaction: discord.Interaction, query: str):
219219
dates["Switch 2"] = game["release_date"]["switch_2"].date()
220220
elif 'switch_2' in game['_last_synced']:
221221
dates["Switch 2"] = "*Unknown*"
222-
222+
223223
lines = []
224224
for platform, date in dates.items():
225225
lines.append(f"{platform}: {date}")
226226

227-
228227
s = "" if len(dates) == 1 else "s"
229228
embed.add_field(name=f'Release Date{s}', value="\n".join(lines), inline=False)
230229

@@ -233,13 +232,13 @@ async def _games_search(self, interaction: discord.Interaction, query: str):
233232
prices = {}
234233

235234
if "switch_1" in game["eshop_price"] and game["eshop_price"]["switch_1"]:
236-
if "us" in game["eshop_price"]["switch_1"] and game["eshop_price"]["switch_1"]["us"]:
235+
if "us" in game["eshop_price"]["switch_1"] and game["eshop_price"]["switch_1"]["us"]:
237236
prices["Switch"] = game["eshop_price"]["switch_1"]["us"]
238237

239238
if "switch_2" in game["eshop_price"] and game["eshop_price"]["switch_2"]:
240-
if "us" in game["eshop_price"]["switch_2"] and game["eshop_price"]["switch_2"]["us"]:
239+
if "us" in game["eshop_price"]["switch_2"] and game["eshop_price"]["switch_2"]["us"]:
241240
prices["Switch 2"] = game["eshop_price"]["switch_2"]["us"]
242-
241+
243242
lines = []
244243
for platform, price in prices.items():
245244
msrp = price['msrp']/100 if price['msrp'] else None
@@ -269,11 +268,11 @@ async def _games_search(self, interaction: discord.Interaction, query: str):
269268

270269
else:
271270
return await interaction.followup.send(f'{config.redTick} No results found.')
272-
271+
273272
def get_db_last_update(self):
274273
if self.last_sync['at']:
275274
return self.last_sync['at']
276-
275+
277276
else:
278277
newest_sw1_update_game = self.db.find_one(sort=[("_last_synced.switch_1", -1)])
279278
newest_sw2_update_game = self.db.find_one(sort=[("_last_synced.switch_2", -1)])

0 commit comments

Comments
 (0)