basicBot / source

A not so basic bot for plug.dj
89 stars 593 forks source link

DJ can no longer join Roulette #135

Open Benchmaker opened 7 years ago

NiceATC commented 6 years ago

joinCommand: { command: 'join', rank: 'user', type: 'exact', functionality: function(chat, cmd) { if (this.type === 'exact' && chat.message.length !== cmd.length) return void(0); if (!basicBot.commands.executable(this.rank, chat)) return void(0); else { var id = chat.uid; var name = chat.un; var isDj; if (typeof API.getDJ() != "undefined") { isDj = API.getDJ().id == id ? true : false; } else { isDj = false; } var djlist = API.getWaitList(); if (isDj === true) API.sendChat("@" + name + " you can only enter roulette when you are not the DJ."); if (isDj === false) if (basicBot.room.roulette.rouletteStatus && basicBot.room.roulette.participants.indexOf(chat.uid) < 0) { basicBot.room.roulette.participants.push(chat.uid); API.sendChat(subChat(basicBot.chat.roulettejoin, { name: chat.un })); } } } },

NiceATC commented 6 years ago

:)