Fix crash when greetingMessage is used instead of serverGreetings

cshd
Dragory 2020-08-24 19:31:53 +03:00
parent b992b49c5c
commit 8930e5dde8
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
1 changed files with 1 additions and 0 deletions

View File

@ -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] = {