add canary bot to bot status function & botcard component
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user