Skip to content

Commit

Permalink
🐛 spread operator on undefined if no bots provided
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvdev committed Sep 3, 2024
1 parent 5a80bba commit 0b7ee21
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/filters/users_filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ import getVariable, { BOTS, CHANNEL } from '../lib/get_variable'

const channel = getVariable(CHANNEL)

const bots = [
'nightbot',
'streamelements',
'el_pato_bot',
'afordibot',
...getVariable(BOTS)?.split(',')
]
const userDefinedBots = getVariable(BOTS)?.split(',')
const defaultBots = ['nightbot', 'streamelements', 'el_pato_bot', 'afordibot']

const bots = userDefinedBots
? [...userDefinedBots, ...defaultBots]
: defaultBots

class BannedUsersContainer {
#bannedUsers = []
Expand Down

0 comments on commit 0b7ee21

Please sign in to comment.