From c9d453db0d234ea7b26d571b7117efcf67ac5fe6 Mon Sep 17 00:00:00 2001 From: Aoi Date: Thu, 26 Aug 2021 17:56:22 +0000 Subject: [PATCH] =?UTF-8?q?Transf=C3=A9rer=20les=20fichiers=20vers=20''?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/index.ts b/index.ts index cc62554..6d7c300 100644 --- a/index.ts +++ b/index.ts @@ -22,6 +22,14 @@ app.post( '/', async ( req, res ) => { res.sendStatus( 200 ); } ); +app.post( '/github/', async ( req, res ) => { + console.log( 'received webhook', req.body ); + if (req.body.issue.url =! undefined) { + (await client.channels.fetch("01FE139SQHRFBG5TR8022BECRW")).sendMessage(`**${req.body.sender.login} :**\n> __[${req.body.repository.full_name} - Issue ${req.body.issue.title} was Updated](${req.body.issue.url})`) + } + res.sendStatus( 200 ); +} ); + // client.on('packet', async () => { // (await client.channels.fetch("01FE139SQHRFBG5TR8022BECRW")).sendMessage(`Why am I even logging this? Idk\n\`\`\`js\n{\n"date": "${Date.now()}",\n"a": "${client.users.name_}"\n}`) //});