Skip to content

Commit

Permalink
fix error on create
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlauer-Hax committed Sep 8, 2023
1 parent cf8b3ac commit c5ef42f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions db.ts
Expand Up @@ -124,9 +124,9 @@ export async function lastLogin(discordid: string) {
if (!userevent) return null;
const location = await fetch(`https://ipinfo.io/${userevent.ip}/json`).then(res => res.json());
return [ {
platform: userevent.source.platform,
platformVersion: userevent.source.platformVersion,
legacyUserAgent: userevent.source.legacyUserAgent,
platform: userevent.source.platform ?? "Not found",
platformVersion: userevent.source.platformVersion ?? "Not found",
legacyUserAgent: userevent.source.legacyUserAgent ?? "Not found",
}, (location.country ? String.fromCodePoint(...(location.country as string).toUpperCase().split('').map(char => 127397 + char.charCodeAt(0))) : "") + " " + location.city + " (" + location.timezone + ")", location.timezone ];
}

Expand Down

0 comments on commit c5ef42f

Please sign in to comment.