utility.appinfo: fix setting invite url for non-public
This commit is contained in:
parent
eae240aa10
commit
b9e5228626
1 changed files with 15 additions and 13 deletions
|
@ -1536,9 +1536,10 @@ appinfo.callback = async function (msg, line) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (app.bot_public != null || app.integration_public != null) {
|
||||||
if (
|
if (
|
||||||
(app.bot_public != null && !app.bot_require_code_grant) ||
|
(app.bot_public && !app.bot_require_code_grant) ||
|
||||||
(app.integration_public != null && !app.integration_require_code_grant)
|
(app.integration_public && !app.integration_require_code_grant)
|
||||||
) {
|
) {
|
||||||
let scope = "bot";
|
let scope = "bot";
|
||||||
let permissions = "";
|
let permissions = "";
|
||||||
|
@ -1551,6 +1552,7 @@ appinfo.callback = async function (msg, line) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
embed.url = `https://discord.com/oauth2/authorize?client_id=${app.id}&scope=${scope}${permissions}`;
|
embed.url = `https://discord.com/oauth2/authorize?client_id=${app.id}&scope=${scope}${permissions}`;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const bot = await hf.bot.requestHandler.request(
|
const bot = await hf.bot.requestHandler.request(
|
||||||
|
|
Loading…
Reference in a new issue