mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 22:23:03 -04:00
various fixes
This commit is contained in:
parent
a7fcad82a9
commit
ddbef1267e
3 changed files with 27 additions and 115 deletions
|
@ -7,6 +7,8 @@ const { Permissions } = require("detritus-client/lib/constants");
|
|||
|
||||
const superagent = require('superagent');
|
||||
|
||||
const { Routes } = require('detritus-client-rest/lib/endpoints');
|
||||
|
||||
const applicationFlags = {
|
||||
EMBEDDED_RELEASED: 1,
|
||||
GATEWAY_PRESENCE: 12,
|
||||
|
@ -59,14 +61,14 @@ module.exports = {
|
|||
let application;
|
||||
let assets;
|
||||
try{
|
||||
application = await superagent.get(`https://discord.com/api/v9/applications/${id}/rpc`)
|
||||
application = await superagent.get(`${Routes.URL}/api/v9/applications/${id}/rpc`)
|
||||
application = application.body
|
||||
}catch(e){
|
||||
return editOrReply(context, createEmbed("warning", context, "Invalid Application"))
|
||||
}
|
||||
|
||||
|
||||
try{
|
||||
assets = await superagent.get(`https://discord.com/api/oauth2/applications/${id}/assets`)
|
||||
assets = await superagent.get(`${Routes.URL}/api/oauth2/applications/${id}/assets`)
|
||||
assets = assets.body
|
||||
}catch(e){
|
||||
// :)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue