Nightbot 使用紀錄 custom command

Q: 如果要讓nightbot指令只能在某平台運作?
A: silent commands
$(provider)判斷平台, 用 eval 輸出 " " 在twitch/discord都有效,Bot不會送出空白


2017/12/8
[bug] Nightbot parse arguments wrong in Discord

simple command !z
$(1) $(2) $(3) $(4) $(5) $(6) $(7) $(8) $(9)

!z 1 2 3  4 5 6
There are two spaces between 3 and 4.

Discord
1 2 3 null 4 5 6 null null

Twitch
1 2 3 4 5 6 null null null

沒給的argument,Nightbot會用"null"塞入,所以無法判斷到底是沒給,還是user真的給null

就只是 str.split(' ') 和 str.split(/ +/)的區別
Nightbot大概用了前者,然後Twitch好像會自動吃連續空白到剩一個
Discord保留連續空白,所以會出錯

解決bug的最快方法就是,跟NightBot一樣不承認他是bug (X

https://community.nightdev.com/t/bug-nightbot-parse-arguments-wrong-in-discord/15179/6

https://screenshots.firefoxusercontent.com/images/89908ecf-4d45-44ea-a4ba-c21b2140358e.png


開放NB manager權限給其他人,這樣才能重後台設定
https://beta.nightbot.tv/account/managers

留言

這個網誌中的熱門文章

OBS 抓不到畫面, 視窗, 遊戲擷取, 黑或白畫面, 當掉 ,卡住, black/white screen, window game capture, crash, freeze

優化實況(一) OBS設定 streaming settings

OBS plugin obs-text 顯示播放中音樂, display playing music