Skip to content

Commit

Permalink
Fix channel alerts not getting sent with no user alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
synzen committed Jul 12, 2021
1 parent 8ad2d6c commit bb7e5fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/structs/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class Client extends EventEmitter {
const alertMessage = `**ALERT**\n\n${message}`
try {
const profile = await Profile.get(fetchedChannel.guild.id)
if (!profile) {
if (!profile || !profile.alert || !profile.alert.length) {
return this.sendChannelMessage(channelID, alertMessage)
}
const alertTo = profile.alert
Expand Down

0 comments on commit bb7e5fe

Please sign in to comment.