Skip to content

Commit

Permalink
chore(hono): fix /install in demo link 404ing [skip ci]
Browse files Browse the repository at this point in the history
Skipping CI for this commit at the moment to update the deployment workflows.

Signed-off-by: Andrei Jiroh Halili <[email protected]>
  • Loading branch information
ajhalili2006 authored Feb 1, 2025
1 parent 59b41a9 commit 99d7507
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,26 @@ const client = new ExtendedClient({
const app = new Hono()
client.commands = new Collection();

// redirect to repo
app.get("/", (c) => {
return c.redirect(config.repo)
})

// ping for uptime
app.get("/ping", (c) => {
return c.json({ ok: true, message: "Pong!" })
})

// basically install links w/o redirect_uris
app.get("/invite", (c) => {
return c.redirect(`https://discord.com/oauth2/authorize?client_id=${config.appId}`)
})
app.get("/install", (c) => {
return c.redirect(`https://discord.com/oauth2/authorize?client_id=${config.appId}`)
})

app.get("/internals/whoami", async(c: Context) => {
const whoami = await client.user

return c.json(whoami)
})

Expand Down

0 comments on commit 99d7507

Please sign in to comment.