Bots Home
|
Create an App
Tip Chatbot
Author:
testchrismeli
Description
Source Code
Launch Bot
Current Users
Created by:
Testchrismeli
var arr=[] cb.settings_choices = [ {label:"Type in the message you want the user to see once he tips for the first time \n Using the [u] variable, you are refferring to the user \n Example: Hey [u] thank you for tipping!", name: 'msgString', type: 'str', minLength: 1, maxLength: 255} ]; var total_tipped = 0; cb.onTip(function (tip) { if(!arr.includes(tip.from_user)){ arr.push(tip.from_user) cb.sendNotice(cb.settings.msgString.toString().replace("[u]",tip.from_user),tip.from_user);} sendMessage('test',tip.from_user,cb.settings.msgString.toString().replace("[u]",tip.from_user)) }); function sendMessage(fromUser, toUser, message) { if (fromUser == toUser) { cb.sendNotice("Sending a message to yourself is just silly, don't you think?", fromUser, '', '', 'bold'); } else { if (userCanSendMessage(fromUser)) { cb.sendNotice("PM from " + fromUser + ": " + message, toUser, "#CCFFCC", "", "bold"); cb.sendNotice("To reply, type @" + fromUser + " and your message.", toUser); cb.sendNotice("Message successfully sent to " + toUser + "!", fromUser); if (!isFreeMessages() && (fromUser != cb.room_slug)) { updateSpecialUsers(fromUser, 1); cb.sendNotice("You now have " + getUserMessageQty(fromUser) + " message(s) to send.", fromUser, "#FFFFAD", "", "bold"); } } else { cb.sendNotice("Sorry. You must tip " + cb.settings.tokens + " token(s) to send one (1) message.", fromUser, "", "", "bold"); } } }
© Copyright Chaturbate 2011- 2024. All Rights Reserved.