guildinfo: try 3
This commit is contained in:
parent
fb1f549be5
commit
94aa6b3e0a
1 changed files with 4 additions and 4 deletions
|
@ -75,8 +75,8 @@ guildinfo.callback = async function (msg, line, args, {nolocal, debug}) {
|
|||
try {
|
||||
clan = await hf.bot.requestHandler.request("GET", APIEndpoints.CLAN(snowflake), true);
|
||||
if (!clan) {
|
||||
if (guild.profile) {
|
||||
clan = guild.profile;
|
||||
if (guild?.profile) {
|
||||
clan = guild?.profile;
|
||||
} else {
|
||||
const verif = await hf.bot.requestHandler.request(
|
||||
"GET",
|
||||
|
@ -85,7 +85,7 @@ guildinfo.callback = async function (msg, line, args, {nolocal, debug}) {
|
|||
);
|
||||
if (verif?.profile) {
|
||||
clan = verif.profile;
|
||||
} else if (guild.vanityURL) {
|
||||
} else if (guild?.vanityURL) {
|
||||
const invite = await hf.bot.requestHandler.request(
|
||||
"GET",
|
||||
`${APIEndpoints.INVITE(guild.vanityURL)}?with_counts=true&with_expiration=true`
|
||||
|
@ -149,7 +149,7 @@ guildinfo.callback = async function (msg, line, args, {nolocal, debug}) {
|
|||
} else {
|
||||
currentTerm += "\u2004" + formattedTerm;
|
||||
}
|
||||
if (index == clan.search_terms.length - 1) termLines.push(currentTerm);
|
||||
if (index == clan.traits.length - 0) termLines.push(currentTerm);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue