{"action":"created","issue":{"url":"https://api.github.com/repos/cinchrb/cinch/issues/214","labels_url":"https://api.github.com/repos/cinchrb/cinch/issues/214/labels{/name}","comments_url":"https://api.github.com/repos/cinchrb/cinch/issues/214/comments","events_url":"https://api.github.com/repos/cinchrb/cinch/issues/214/events","html_url":"https://github.com/cinchrb/cinch/issues/214","id":122849378,"number":214,"title":"Messages sent by bot do not fire a channel event","user":{"login":"elifoster","id":4176124,"avatar_url":"https://avatars.githubusercontent.com/u/4176124?v=3","gravatar_id":"","url":"https://api.github.com/users/elifoster","html_url":"https://github.com/elifoster","followers_url":"https://api.github.com/users/elifoster/followers","following_url":"https://api.github.com/users/elifoster/following{/other_user}","gists_url":"https://api.github.com/users/elifoster/gists{/gist_id}","starred_url":"https://api.github.com/users/elifoster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elifoster/subscriptions","organizations_url":"https://api.github.com/users/elifoster/orgs","repos_url":"https://api.github.com/users/elifoster/repos","events_url":"https://api.github.com/users/elifoster/events{/privacy}","received_events_url":"https://api.github.com/users/elifoster/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-18T00:03:35Z","updated_at":"2015-12-18T02:28:59Z","closed_at":"2015-12-18T02:11:35Z","body":"It seems that messages sent by the bot do not fire the `:channel` event. Is there a different event just for messages sent by the bot itself? Looking at the log it should be firing, since it recognizes the message as a PRIVMSG."},"comment":{"url":"https://api.github.com/repos/cinchrb/cinch/issues/comments/165649571","html_url":"https://github.com/cinchrb/cinch/issues/214#issuecomment-165649571","issue_url":"https://api.github.com/repos/cinchrb/cinch/issues/214","id":165649571,"user":{"login":"dominikh","id":39825,"avatar_url":"https://avatars.githubusercontent.com/u/39825?v=3","gravatar_id":"","url":"https://api.github.com/users/dominikh","html_url":"https://github.com/dominikh","followers_url":"https://api.github.com/users/dominikh/followers","following_url":"https://api.github.com/users/dominikh/following{/other_user}","gists_url":"https://api.github.com/users/dominikh/gists{/gist_id}","starred_url":"https://api.github.com/users/dominikh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominikh/subscriptions","organizations_url":"https://api.github.com/users/dominikh/orgs","repos_url":"https://api.github.com/users/dominikh/repos","events_url":"https://api.github.com/users/dominikh/events{/privacy}","received_events_url":"https://api.github.com/users/dominikh/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T02:28:59Z","updated_at":"2015-12-18T02:28:59Z","body":"> but that is only something to worry about if you are sending messages back to the server on the message events, and don't have proper checks for whether the message is being duplicated, or if it was the bot's own message\r\n\r\nThat would describe roughly every IRC (and other protocol) bot ever written. Reacting to your own messages is highly atypical.\r\n\r\n> is there some simple way to fire events manually?\r\n\r\nYou can create events synthetically by using `HandlerList#dispatch` (and `Bot#handlers` to get to the `HandlerList`). However, a much simpler approach would be to simply call a method: `process(the_stuff_im_sending)` in your specific message-sending handler that also wants some additional processing done on the message.\r\n\r\nThere should really never be a reason for a bot to react to its own messages."}}