api서버는 나중에 생각해보고
간단하게 뚝딱하려고 구글 스프레드 시트 이용했습니다.
구글 스프레드 시트에 아무말을 적어주세요.
NightBot 에 적용하는 방법은
Dashboard> Commands> Custom에 새 명령어를 추가한 뒤
Message 입력란에
$(eval res = `$(urlfetch json https://spreadsheets.google.com/feeds/list/156XGkQFoi65eapGDGSJNGXvT0g90lcVSpQoL9cHyau0/od6/public/values?alt=json)`; try {j=JSON.parse(res); txt=j.feed.entry[Math.floor(Math.random()*j.feed.openSearch$totalResults.$t)].gsx$content.$t} catch(e){e}) |
를 넣으시면 됩니다.
여기에서 !아무말로 봇 작동을 확인할 수 있습니다.