Bots Home
|
Create an App
Play-nice rotator
Author:
sttingduck2
Description
Source Code
Launch Bot
Current Users
Created by:
Sttingduck2
cb.settings_choices = [ { name: 'message_1', type: 'str', minLength: 1, maxLength: 255, label: 'Message 1' }, { name: 'message_2', type: 'str', minLength: 1, maxLength: 255, label: 'Message 2', required: false }, { name: 'message_3', type: 'str', minLength: 1, maxLength: 255, label: 'Message 3', required: false }, { name: 'message_4', type: 'str', minLength: 1, maxLength: 255, label: 'Message 4', required: false }, { name: 'message_5', type: 'str', minLength: 1, maxLength: 255, label: 'Message 5', required: false } ]; let keys; function sendMessage(n) { n = ((n || 0) % keys.length) + 1; if (cb.settings[keys[n - 1]].startsWith('/')) { cb.$$send(cb.settings[keys[n - 1]]); } else { cb.sendNotice(cb.settings[keys[n - 1]]); } cb.setTimeout(() => { sendMessage(n) }, 5000); } cb.onStart(() => { keys = Object.keys(cb.settings).filter(s => s.startsWith('message_') && cb.settings[s].length > 0); cb.sendNotice(cb.$$send.toString()); cb.sendNotice($send.toString()); // sendMessage(); });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.