• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

EN [SOLVED] on client move to specific channel msg him

Status
Not open for further replies.

NovumBattle

New Member
Hello,
I try to script my own Support Plugin but I get an error.
Iif someone joins the Support Channel he should get a message, but I only get this error:
2016/03/27 19:18:14 f818ba24 e2de1d52 WARN Sending private message failed
2016/03/27 19:18:14 f818ba24 e2de1d52 WARN invalid clientID
Here is my code:
Code:
registerPlugin({
    name: 'Support Plugin',
    version: '0.1',
    description: 'This script will make your life as a supporter easier!',
    author: 'Gregor "NovumBattle" Lucka <[email protected]>',
    vars: {
        support: {
            title: 'Support Channel',
            type: 'channel'
        }
    }
}, function(sinusbot, config) {
    sinusbot.on('clientMove', function(ev) {
        if (ev.newChannel == config.support) {
            chatPrivate(ev.clientID, "Du bist im Support Channel!");
            return;
        }
    });

    sinusbot.log('Support Plugin initialisiert...');
});
Thank you for your help! :)
 
Status
Not open for further replies.
Top