Hello, I have the problem that in the following code the channel group is set only once. If you want to check the updated group again, the old value still exists. When the bot or the bot reconnects it will be updated and the code will do what it should do but after that you have to reconnect which is not the vim code. Does anyone know the error? Thanks in advance!
Code:
if (ev.client.getChannelGroup().id() == currentConfig.channelGroupOnJoin){
var newChannelGroup = backend.getChannelGroupByID(currentConfig.channelGroup);
if (newChannelGroup){
currentChannel.setChannelGroup(ev.client, newChannelGroup);
}
Code:
if (ev.client.getChannelGroup().id() == currentConfig.channelGroupOnJoin){
var newChannelGroup = backend.getChannelGroupByID(currentConfig.channelGroup);
if (newChannelGroup){
currentChannel.setChannelGroup(ev.client, newChannelGroup);
}
Last edited: