utility.guildinfo: add --nolocal

This commit is contained in:
Cynthia Foxwell 2024-07-29 19:56:15 -06:00
parent 3ec48e2bc9
commit 9bfd194285
2 changed files with 4 additions and 4 deletions

View file

@ -31,7 +31,7 @@ guildinfo.addAlias("serverinfo");
guildinfo.addAlias("server");
guildinfo.addAlias("sinfo");
guildinfo.addAlias("si");
guildinfo.callback = async function (msg, line) {
guildinfo.callback = async function (msg, line, args, {nolocal}) {
let _guild, clanEmbed, id;
if (!line || line == "") {
if (!msg.guildID) return "Not in a guild.";
@ -39,7 +39,7 @@ guildinfo.callback = async function (msg, line) {
if (__guild) {
_guild = {source: "local", data: __guild};
} else {
_guild = await getGuild(msg.guildID);
_guild = await getGuild(msg.guildID, nolocal);
}
id = msg.guildID;
} else {

View file

@ -57,8 +57,8 @@ function getUploadLimit(guild) {
return UPLOAD_LIMIT;
}
async function getGuild(id) {
if (hf.bot.guilds.has(id)) {
async function getGuild(id, noLocal = false) {
if (hf.bot.guilds.has(id) && !noLocal) {
return {source: "local", data: hf.bot.guilds.get(id)};
}