Skip to content

Commit

Permalink
fix greeting channel doesn't save #304
Browse files Browse the repository at this point in the history
  • Loading branch information
saiteja-madha committed Feb 13, 2023
1 parent 9f89670 commit 612d07d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dashboard/routes/guild-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ router.post("/:serverID/greeting", CheckAuth, async (req, res) => {
}

data.channel = guild.channels.cache.find((ch) => "#" + ch.name === data.channel)?.id;
if (data.channel !== settings.welcome.channel_id) {
settings.welcome.channel_id = data.channel;
if (data.channel !== settings.welcome.channel) {
settings.welcome.channel = data.channel;
}

if (!settings.welcome.enabled) settings.welcome.enabled = true;
Expand Down Expand Up @@ -290,8 +290,8 @@ router.post("/:serverID/greeting", CheckAuth, async (req, res) => {
}

data.channel = guild.channels.cache.find((ch) => "#" + ch.name === data.channel)?.id;
if (data.channel !== settings.farewell.channel_id) {
settings.farewell.channel_id = data.channel;
if (data.channel !== settings.farewell.channel) {
settings.farewell.channel = data.channel;
}

if (!settings.farewell.enabled) settings.farewell.enabled = true;
Expand Down

0 comments on commit 612d07d

Please sign in to comment.