code: func (mod *SlackBee) Run(eventChan chan bees.Event) {
  	rtm := mod.client.NewRTM()
  	defer rtm.Disconnect()
  
  	go rtm.ManageConnection()
  
  	// Cache the channels
  	for k := range mod.channels {
  		mod.findChannelID(k, true)
  	}
  
  	for {
  		select {
  		case <-mod.SigChan:
  			return
  
  		case msg := <-rtm.IncomingEvents:
  			switch ev := msg.Data.(type) {
  			case *slack.MessageEvent:
  				if stringInMap(ev.Channel, mod.channels) {
  					u := ev.Msg.User
  					if u == "" {
  						u = ev.Msg.Username
  					}
  					t := ev.Msg.Text
  					if t == "" {
  						for _, v := range ev.Msg.Attachments {
  							sendEvent(mod.Name(), ev.Channel, u, v.Text, eventChan)
  						}
  					} else {
  						sendEvent(mod.Name(), ev.Channel, u, t, eventChan)
  					}
  				}
  			case *slack.RTMError:
  				mod.LogErrorf("Error: %s", ev.Error())
  			case *slack.InvalidAuthEvent:
  				mod.LogErrorf("Error: invalid credentials")
  				return
  			default:
  				// Ignore other events..
  				// fmt.Printf("Unexpected: %v\n", msg.Data)
  			}
  		}
  	}
  }
docs: // Run executes the Bee's event loop.