I figured out a way to fix it.
In the lines which read
"if 'hello ' + NICK == cmd:", you need to change it to
"if 'hello ' + NICK == msg:" where applicable.
I think the reason for this is that the function which changes the variable 'msg' to 'cmd' deletes everything after the first space, thus ignoring 'NICK' altogether.
Furthermore, you can also have the bot respond every time its nick is said with
"if NICK in msg:
function()"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I figured out a way to fix it.
In the lines which read
"if 'hello ' + NICK == cmd:", you need to change it to
"if 'hello ' + NICK == msg:" where applicable.
I think the reason for this is that the function which changes the variable 'msg' to 'cmd' deletes everything after the first space, thus ignoring 'NICK' altogether.
Furthermore, you can also have the bot respond every time its nick is said with
"if NICK in msg:
function()"