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

fix: don't try to save partial guild information

This commit is contained in:
Dragory 2021-11-02 20:51:37 +02:00
parent b59e1f0a95
commit e71d2f277a

View file

@ -33,6 +33,10 @@ export const GuildInfoSaverPlugin = zeppelinGuildPlugin<GuildInfoSaverPluginType
});
async function updateGuildInfo(guild: Guild) {
if (!guild.name) {
return;
}
const allowedGuilds = new AllowedGuilds();
const existingData = (await allowedGuilds.find(guild.id))!;
allowedGuilds.updateInfo(guild.id, guild.name, guild.iconURL(), guild.ownerId);