Bots Home
|
Create an App
pvt info
Author:
tylerlovesfeet
Description
Source Code
Launch Bot
Current Users
Created by:
Tylerlovesfeet
cb.settings_choices = [ { name: 'pvtMsg', type: 'str', label: 'Private Activities Message', }, { name: 'noticecolor', type: 'str', label: 'Notice color (html code default red #FF0000)', defaultValue: '#FF0000' }, { name: 'chat_ad', type: 'int', minValue: 1, maxValue: 999, defaultValue: 1, label: 'Delay in minutes between notice being displayed (minimum 1)' } ]; function chatAd() { cb.sendNotice(cb.settings['pvtMsg'], '', '', cb.settings['noticecolor'], 'bold'); cb.setTimeout(chatAd, cb.settings.chat_ad * 60000); } function messageContainsPvt(m) { const mLower = m.toLowerCase(); return mLower.includes('pvt') || mLower.includes('private'); } function messageContainsWhat(m) { const mLower = m.toLowerCase(); return (mLower.includes('what') || mLower.includes('do you') || mLower.includes('will you') || mLower.includes('can you') || mLower.startsWith('do') || mLower.startsWith('will') || mLower.startsWith('what') ); } function onMessage(m) { const message = m['m']; if (messageContainsPvt(message) && messageContainsWhat(message)) { cb.sendNotice(cb.settings['pvtMsg'], '', '', cb.settings['noticecolor'], 'bold'); } return m; } function onEnter(user) { cb.sendNotice(cb.settings['pvtMsg'], user['user'], '', cb.settings['noticecolor'], 'bold'); } function init() { cb.setTimeout(chatAd, cb.settings.chat_ad * 60000); cb.onMessage(onMessage); cb.onEnter(onEnter); cb.sendNotice(cb.settings['pvtMsg'], '', '', cb.settings['noticecolor'], 'bold'); } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.