Use bot.socket not socket.