Opsi logic error
This commit is contained in:
parent
6ad64d7a2d
commit
00f2c89d93
|
@ -17,7 +17,7 @@ client = TeeworldsClient.new(verbose: false)
|
||||||
|
|
||||||
client.on_chat do |msg|
|
client.on_chat do |msg|
|
||||||
# note use `next` instead of `return` in the block
|
# note use `next` instead of `return` in the block
|
||||||
next if msg.message[0] == '!'
|
next unless msg.message[0] == '!'
|
||||||
|
|
||||||
case msg.message[1..]
|
case msg.message[1..]
|
||||||
when 'ping' then client.send_chat('pong')
|
when 'ping' then client.send_chat('pong')
|
||||||
|
|
Loading…
Reference in a new issue