rizaumami / tdbot.lua

Lua wrapper for telegram-bot
GNU General Public License v3.0
24 stars 21 forks source link

Problem with nils #6

Closed DeadSecure closed 6 years ago

DeadSecure commented 6 years ago

Hi Riza, how can i handle all nils so if tdbot got nil don't break the code?

rizaumami commented 6 years ago

Is it caused by tdbot.lua or your code? Perhaps you can share your code so we can investigate.

DeadSecure commented 6 years ago

it's caused by code. but i want to make custom tdbot therefor it won't break on nil. i think its cause by clilua.cpp:213

breaks like this: [ 0][t 0][1529748252.384939671][clilua.cpp:213][!TD-core] lua: ./libs/lua-redis.lua:396: redis error: ERR wrong number of arguments for 'sismember' command

[ 0][t 0][1529739465.766739368][clilua.cpp:213][!TD-core] lua: /home/gpguard/mrsvakeagle/bot/bot.lua:3927: attempt to concatenate local 'user' (a nil value)

DeadSecure commented 6 years ago

i saw some bots which won't break on nil and continues code

rizaumami commented 6 years ago

First error is redis error. Second error, try assign empty string to user.

This is not tdbot.lua's issue, so I'm closing this.