Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var bot = require('dogechat-bot');
- var botbalance = bot.getBalance()
- bot.connect("megadogebot", "katokato", function() {
- bot.joinRoom("doorgame");
- bot.chat("Bot is online type !help to get started!", "doorgame");
- });
- bot.addCommand("!help", function(data) {
- bot.chat(data.user + ": Welcome to Door Game, this game is rather simple", data.room);
- bot.chat(data.user + " Just knock on the door, as in /tip megadogebot amount, the doorman will then decide if he wants to give you a reward or not", data.room)
- });
- bot.onTip(function(data) {
- var a = Math.floor((Math.random() * 1.5) + 0);
- var a = Math.round(a)
- var b = data.amount * a
- var c = data.amount
- if (c < 5) {
- // bot.chat(data.user + ": Sorry, you earned " + b + " doge, but I can't pay you any less than five doge.", data.room);
- bot.tip(data.user, 5, data.room, "The Doorman is kind he gives you some doge");
- }
- else {
- if (c > 9 ) {
- bot.tip(data.user, b, data.room, "The Doorman is kind he gives you some doge");
- }
- else {
- bot.tip(data.user, data.amount, data.room, "Sorry but You must tip more than 10 less than 25!");
- }
- };
- });
Advertisement
Add Comment
Please, Sign In to add comment