diff --git a/index.js b/index.js index 1d87bec..60a1af8 100644 --- a/index.js +++ b/index.js @@ -120,7 +120,7 @@ Searxng.prototype.handleMessage = function(event, room) { const messagePieces = event.getContent().body.split(" "); - if (messagePieces[0] != undefined && searxngCommands.indexOf(messagePieces[0].toLowerCase()) > -1) { + if (searxngCommands.indexOf(messagePieces[0]?.toLowerCase()) > -1) { var cooldown = false;