Skip to content

Commit

Permalink
fix: crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
ledouxm committed Sep 9, 2023
1 parent 931193a commit 937f97f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/features/activity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import { sendToChannelId } from "./discord/discord";

export const getInGameSummoners = async () => {
const summoners = await getSummonersWithChannels();
console.log(summoners);
console.log("checking activity for", summoners.length, "summoners");
for (const summ of summoners) {
try {
const activeGame = await getSummonerCurrentGame(summ.id);
if (!activeGame) continue;

console.log("activeGame", activeGame?.gameId, "for summoner", summ.currentName);
console.log("activeGame", activeGame?.gameId, "for summoner", summ?.currentName);

const matchId = "EUW1_" + activeGame.gameId;
if (matchId === summ.lastNotifiedInGameId) continue;
Expand Down
2 changes: 1 addition & 1 deletion src/features/bets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const tryToResolveBet = async ({
"resolving bet",
activeBet.bet.id,
"for",
activeBet.summoner.currentName,
activeBet.summoner?.currentName,
"on win",
activeBet.bet.hasBetOnWin,
"by",
Expand Down

0 comments on commit 937f97f

Please sign in to comment.