3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +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 59a6d5a56b
commit 94b21287ad
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

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);