mirror of
https://github.com/xHyroM/bun-discord-bot.git
synced 2024-11-13 02:18:08 +01:00
fix: put /interaction to try catch
This commit is contained in:
parent
7e08e12fec
commit
a6e7afc01d
1 changed files with 54 additions and 50 deletions
|
@ -24,6 +24,7 @@ const app = new Hono();
|
|||
app.get('*', (c) => c.redirect('https://www.youtube.com/watch?v=FMhScnY0dME'));
|
||||
|
||||
app.post('/interaction', bodyParse(), async(c) => {
|
||||
try {
|
||||
const signature = c.req.headers.get('X-Signature-Ed25519');
|
||||
const timestamp = c.req.headers.get('X-Signature-Timestamp');
|
||||
if (!signature || !timestamp) return c.redirect('https://www.youtube.com/watch?v=FMhScnY0dME'); // fireship :D
|
||||
|
@ -75,6 +76,9 @@ app.post('/interaction', bodyParse(), async(c) => {
|
|||
content: 'Beep boop. Boop beep?'
|
||||
}
|
||||
});
|
||||
} catch(e) {
|
||||
console.log(e);
|
||||
}
|
||||
})
|
||||
|
||||
await Bun.serve({
|
||||
|
|
Loading…
Reference in a new issue