3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-23 17:45:03 +00:00

Add command to add servers from invites with eligibility check

This commit is contained in:
Dragory 2021-09-05 17:07:50 +03:00
parent d20d6957cb
commit 74b388cb65
7 changed files with 151 additions and 39 deletions

View file

@ -250,6 +250,13 @@ connect().then(async () => {
async getConfig(id) {
const key = id === "global" ? "global" : `guild-${id}`;
if (id !== "global") {
const allowedGuild = await allowedGuilds.find(id);
if (!allowedGuild) {
return {};
}
}
const row = await guildConfigs.getActiveByKey(key);
if (row) {
try {