sogebot / sogeBot

sogeBot - Free Twitch Bot built on Node.js
https://sogebot.xyz/
GNU General Public License v3.0
289 stars 65 forks source link

symbol included timers name crash Timers behaviour #675

Closed xotlr43 closed 6 years ago

xotlr43 commented 6 years ago

Expected behavior

!timers set -name timerwithoutsymbol -messages 0 -seconds 60 => @username, timer timerwithoutsymbol was set with 0 messages and 60 seconds to trigger

!timers set -name timerwithsymbol! -messages 0 -seconds 60 => @username, timer timerwithsymbol! was set with 0 messages and 60 seconds to trigger

Actual behavior

!timers set -name timerwithoutsymbol -messages 0 -seconds 60 => @username, timer timerwithoutsymbol was set with 0 messages and 60 seconds to trigger

!timers set -name timerwithsymbol! -messages 0 -seconds 60 => Won't appear on Web panel (response tab)

Can't remove timers or edit response after work after adding or editing existing timers name to include symbol

Steps to reproduce

!timers set -name timerwithsymbol! -messages 0 -seconds 60 or Using timers web panel.

Additional informations

GENERAL | OS: npm/5.5.1 node/v9.3.0 win32 x64 | DB: nedb | Bot version: 5.11.3 | Bot uptime: 361.96 | Bot lang: en | Bot mute: false SYSTEMS | timers, customcommands, keywords, songs, alias, moderation, queue, cooldown, highlights, commercial WIDGETS | chat, ytplayer, twitch API | HELIX 163/0 | KRAKEN 260/0 | TMI 129/0 WEBHOOKS | OAUTH | BOT false | BROADCASTER false

sogehige commented 6 years ago

Symbols should not be supported as workaround you will need to update when bot stopped /db/nedb/timers.db and remove from affected name any symbols

sogehige commented 6 years ago

Added checks for ui and command itself will accept (and ignore symbols) only alphanumeric chars and underscore.