$chan can definately be valid for an 'timer'. It all depends on where it's called from.
If it's in an alias called from an event, then it will loose it's context, so won't be valid, but if it's just an alias called from the editbox from a channel window, it's all good.
Now, the error you were getting is interesting.
Using that exact line you gave us, it worked no issue for me while keeping a channel window active.
I'm going to assume that you change windows, to a query or custom or status window, then $chan will loose it's context, and thus will error when it tries to send the message.
The error message you gave us however is completely different. It means that the line you gave us here isn't what you're using.