update function, create botcard, update cards

This commit is contained in:
2021-07-31 16:51:00 +02:00
parent 6860952284
commit 6c6e16c8b1
5 changed files with 130 additions and 13 deletions

View File

@@ -6,8 +6,23 @@ exports.handler = async function(event, context) {
Authorization: `Bot ${process.env.token}`,
},
});
let statusResponse = await axios.get(
`https://discord.com/api/v9/users/@me/connections`,
{
headers: {
Authorization: `Bot ${process.env.token}`,
},
}
);
console.log(statusResponse.data);
return {
statusCode: 200,
body: JSON.stringify(response.data),
body: JSON.stringify({
info: response.data,
status: statusResponse.data,
}),
headers: {
'Content-Type': 'application/json',
},
};
};