Searching for chat command

Im trying to find a function so when I type say “!open” into chat it will recongnise it and do whats ever somthing.

AddChatCommand("!open", Function-name)

Is this what you wanted?

http://www.facepunch.com/showthread.php?t=927717

Attempt to call nil value “AddChatCommand”

Well I fucked up… lol