From 8930e5dde866a3ac3102aa5a173b3bd2009e058c Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Mon, 24 Aug 2020 19:31:53 +0300 Subject: [PATCH] Fix crash when greetingMessage is used instead of serverGreetings --- src/cfg.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cfg.js b/src/cfg.js index 1d7c304..09a4633 100644 --- a/src/cfg.js +++ b/src/cfg.js @@ -136,6 +136,7 @@ if (config.guildGreetings && ! config.serverGreetings) { // already have something set up in serverGreetings. This retains backwards compatibility while allowing you to override // greetings for specific servers in serverGreetings. if (config.greetingMessage || config.greetingAttachment) { + config.serverGreetings = config.serverGreetings || {}; for (const guildId of config.mainServerId) { if (config.serverGreetings[guildId]) continue; config.serverGreetings[guildId] = {