fix ts errors
This commit is contained in:
parent
fbd529b99a
commit
e2c5459b95
3
index.ts
3
index.ts
|
@ -28,7 +28,7 @@ const states = new Map();
|
||||||
app.command("/osu-link", async (ctx) => {
|
app.command("/osu-link", async (ctx) => {
|
||||||
await ctx.ack();
|
await ctx.ack();
|
||||||
|
|
||||||
const [exists = null] = await sql`SELECT osu_id FROM links WHERE slack_id = ${ctx.context.userId}`;
|
const [exists = null] = await sql`SELECT osu_id FROM links WHERE slack_id = ${ctx.context.userId!}`;
|
||||||
|
|
||||||
if (exists) {
|
if (exists) {
|
||||||
return ctx.respond({
|
return ctx.respond({
|
||||||
|
@ -224,6 +224,7 @@ async function getLeaderboard(sortBy?: "osu" | "taiko" | "fruits" | "mania", asc
|
||||||
}
|
}
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
|
|
||||||
|
// @ts-ignore i can't be bothered to type this rn
|
||||||
lb.push(...data.users.map(user => ({
|
lb.push(...data.users.map(user => ({
|
||||||
username: user.username,
|
username: user.username,
|
||||||
id: user.id,
|
id: user.id,
|
||||||
|
|
Loading…
Reference in a new issue