utility.guildinfo: fix guildID fallback not getting a guild in cases where it can
This commit is contained in:
parent
cfd6664ea8
commit
e280d90053
1 changed files with 5 additions and 1 deletions
|
@ -1981,7 +1981,11 @@ guildinfo.callback = async function (msg, line) {
|
|||
if (!line || line == "") {
|
||||
if (!msg.guildID) return "Not in a guild.";
|
||||
const __guild = msg.channel.guild ?? hf.bot.guilds.get(msg.guildID);
|
||||
if (__guild) _guild = {source: "local", data: __guild};
|
||||
if (__guild) {
|
||||
_guild = {source: "local", data: __guild};
|
||||
} else {
|
||||
_guild = await getGuild(msg.guildID);
|
||||
}
|
||||
} else {
|
||||
if (!SNOWFLAKE_REGEX.test(line)) return "Not a snowflake.";
|
||||
const snowflake = line.match(SNOWFLAKE_REGEX)[1];
|
||||
|
|
Loading…
Reference in a new issue