guildinfo: i may be stupid
This commit is contained in:
parent
94aa6b3e0a
commit
93810518ab
1 changed files with 4 additions and 4 deletions
|
@ -75,8 +75,8 @@ guildinfo.callback = async function (msg, line, args, {nolocal, debug}) {
|
||||||
try {
|
try {
|
||||||
clan = await hf.bot.requestHandler.request("GET", APIEndpoints.CLAN(snowflake), true);
|
clan = await hf.bot.requestHandler.request("GET", APIEndpoints.CLAN(snowflake), true);
|
||||||
if (!clan) {
|
if (!clan) {
|
||||||
if (guild?.profile) {
|
if (_guild?.profile) {
|
||||||
clan = guild?.profile;
|
clan = _guild?.profile;
|
||||||
} else {
|
} else {
|
||||||
const verif = await hf.bot.requestHandler.request(
|
const verif = await hf.bot.requestHandler.request(
|
||||||
"GET",
|
"GET",
|
||||||
|
@ -85,10 +85,10 @@ guildinfo.callback = async function (msg, line, args, {nolocal, debug}) {
|
||||||
);
|
);
|
||||||
if (verif?.profile) {
|
if (verif?.profile) {
|
||||||
clan = verif.profile;
|
clan = verif.profile;
|
||||||
} else if (guild?.vanityURL) {
|
} else if (_guild?.vanityURL) {
|
||||||
const invite = await hf.bot.requestHandler.request(
|
const invite = await hf.bot.requestHandler.request(
|
||||||
"GET",
|
"GET",
|
||||||
`${APIEndpoints.INVITE(guild.vanityURL)}?with_counts=true&with_expiration=true`
|
`${APIEndpoints.INVITE(_guild.vanityURL)}?with_counts=true&with_expiration=true`
|
||||||
);
|
);
|
||||||
if (invite?.profile) clan = invite.profile;
|
if (invite?.profile) clan = invite.profile;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue