Set Loglevel = 10 , restart Sinusbot, post logI wrote a script by myself and I put it into the script folder. I restarted the bot but it won't load. I checked and I haven't found nothing: no errors, no warnings, nothing... What can I do?
My bot version: 0.14.3
My O.S. version: CentOS Linux (7)
Should I modify that settingSet Loglevel = 10 , restart Sinusbot, post log
yeesShould I modify that settings in that config.ini file?
Done.Send the script via Discord to Lulalaby#7777
I will check it
I sent it to @Lala Sabathil.How about sending us the script that is likely to be at fault?![]()
registerPlugin({
name 'Advanced ChaosGaming Welcome',
version: '1.0'
description: 'Gestisce i messaggi di join.'
author: 'Aerora <[email protected]>'
vars: [{
name: 'primoMessaggio',
title: 'Messaggio da inviare. (%u = nome utente)',
type: 'string'
}, {
name: 'secondoMessaggio',
title: 'Messaggio quando entra la seconda volta. (%u = nome utente)',
type: 'string'
}, {
name: 'tipoMessaggio',
title: 'Modalità di messaggio.',
type: 'select',
options: [
'Chat privata', //0
'Poke' //1
]
}]
}, function(sinusbot, config) {
var event = require('event');
event.on('connect', function (connectionEvent) {
var messaggyno = config.primoMessaggio;
var messaggyno2 = config.secondoMessaggio;
messaggyno = messaggyno.replace(/%u/g, connectionEvent.client.name());
messaggyno2 = messaggyno2.replace(/%u/g, connectionEvent.client.name());
if(connectionEvent.client.getTotalConnectionsCount() == 1){
if(config.tipoMessaggio == 0){
connectionEvent.client.chat(messaggyno);
}
else{
connectionEvent.client.poke(messaggyno2);
}
connectionEvent.client.addToServerGroup('Utente');
}
else{
if(config.tipoMessaggio == 0){
connectionEvent.client.chat(messaggyno);
}
else{
connectionEvent.client.poke(messaggyno2);
}
}
});
});
Where is theversion: '1.0' description: 'Gestisce i messaggi di join.' author: 'Aerora <[email protected]>'
,
It there a script that add a server group on the first join with a message changing? Could you send it to me?Where is the,
Besides, scripts for this already exsist
The connect event does not have any parameters.Error in script (event connect): TypeError: Cannot access member 'client' of undefined
at CGWelcome.js:28:42
I don't have to share all of my scripts I'll write. I'll write something in the "private" ones in my language.First, you should always write scripts in english.
Second: i try ot at home, i am in a train right now
RightClient connection
Thanks, I'm going to edit it.The connect event does not have any parameters.
It doesn't do what you think it does. It's not fired when clients connect, only when the bot connects.
Client connection events are just "clientMove" events where fromChannel is null.
But it is easier to helpI don't have to share all of my scripts I'll write. I'll write something in the "private" ones in my language.
It there a script that add a server group on the first join with a message changing? Could you send it to me?
Anyway, how can I fix this?
Error in script (event connect): TypeError: Cannot access member 'client' of undefined
at CGWelcome.js:28:42
registerPlugin({
name 'Advanced ChaosGaming Welcome',
version: '1.0',
description: 'Gestisce i messaggi di join.',
author: 'Aerora <[email protected]>',
vars: [{
name: 'primoMessaggio',
title: 'Messaggio da inviare. (%u = nome utente)',
type: 'string'
}, {
name: 'secondoMessaggio',
title: 'Messaggio quando entra la seconda volta. (%u = nome utente)',
type: 'string'
}, {
name: 'tipoMessaggio',
title: 'Modalità di messaggio.',
type: 'select',
options: [
'Chat privata', //0
'Poke' //1
]
}]
}, function(sinusbot, config) {
var event = require('event');
event.on('clientMove', function (connectionEvent) {
var messaggyno = config.primoMessaggio;
var messaggyno2 = config.secondoMessaggio;
messaggyno = messaggyno.replace(/%u/g, connectionEvent.client.name());
messaggyno2 = messaggyno2.replace(/%u/g, connectionEvent.client.name());
if(connectionEvent.toChannel.id() == x) { // replace x with channel id of default channel
if(connectionEvent.client.getTotalConnectionsCount() == 1){
if(config.tipoMessaggio == 0){
connectionEvent.client.chat(messaggyno);
}
else{
connectionEvent.client.poke(messaggyno2);
}
connectionEvent.client.addToServerGroup('Utente');
}
else{
if(config.tipoMessaggio == 0){
connectionEvent.client.chat(messaggyno);
}
else{
connectionEvent.client.poke(messaggyno2);
}
}
}
});
});
Shouldn't be 'connectionEvent' instead of 'ev'?JavaScript:registerPlugin({ name 'Advanced ChaosGaming Welcome', version: '1.0', description: 'Gestisce i messaggi di join.', author: 'Aerora <[email protected]>', vars: [{ name: 'primoMessaggio', title: 'Messaggio da inviare. (%u = nome utente)', type: 'string' }, { name: 'secondoMessaggio', title: 'Messaggio quando entra la seconda volta. (%u = nome utente)', type: 'string' }, { name: 'tipoMessaggio', title: 'Modalità di messaggio.', type: 'select', options: [ 'Chat privata', //0 'Poke' //1 ] }] }, function(sinusbot, config) { var event = require('event'); event.on('clientMove', function (connectionEvent) { var messaggyno = config.primoMessaggio; var messaggyno2 = config.secondoMessaggio; messaggyno = messaggyno.replace(/%u/g, connectionEvent.client.name()); messaggyno2 = messaggyno2.replace(/%u/g, connectionEvent.client.name()); if(connectionEvent.toChannel.id() == x) { // replace x with channel id of default channel if(connectionEvent.client.getTotalConnectionsCount() == 1){ if(config.tipoMessaggio == 0){ connectionEvent.client.chat(messaggyno); } else{ connectionEvent.client.poke(messaggyno2); } connectionEvent.client.addToServerGroup('Utente'); } else{ if(config.tipoMessaggio == 0){ connectionEvent.client.chat(messaggyno); } else{ connectionEvent.client.poke(messaggyno2); } } } }); });
already edited, sry^^Shouldn't be 'connectionEvent' instead of 'ev'?