add canary bot to bot status function & botcard component

This commit is contained in:
2021-08-01 14:46:46 +02:00
parent fdb5a57ff7
commit 5662546b6f
2 changed files with 57 additions and 11 deletions

View File

@@ -1,15 +1,21 @@
const axios = require('axios');
exports.handler = async function(event, context) {
let response = await axios.get(`https://discord.com/api/v9/users/@me`, {
let MainResponse = await axios.get(`https://discord.com/api/v9/users/@me`, {
headers: {
Authorization: `Bot ${process.env.token}`,
},
});
let CanaryResponse = await axios.get(`https://discord.com/api/v9/users/@me`, {
headers: {
Authorization: `Bot ${process.env.tokenCanary}`,
},
});
return {
statusCode: 200,
body: JSON.stringify({
info: response.data,
mainInfo: MainResponse.data,
canaryInfo: CanaryResponse.data,
}),
headers: {
'Content-Type': 'application/json',