The -mode event is triggered every time a - mode is applied to a nickname (user or channel). This could include changes like removing channel/user modes.
bot.on('-mode',(data)=>{ // Your Code Here});
Parameters
data.user(string) β The user who changed the mode (can be a channel or user, starting with # for channels).
data.mode(string) β The mode that was applied (e.g., -o).
data.affected(string) β The nickname or channel affected by the mode change.