Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example on how to send a message to a channel #182

Open
Torxed opened this issue Feb 23, 2021 · 1 comment
Open

Add example on how to send a message to a channel #182

Torxed opened this issue Feb 23, 2021 · 1 comment

Comments

@Torxed
Copy link

Torxed commented Feb 23, 2021

Perhaps in on_message using the c handle, it might be easy.
But if you access the server object from outside a event-driven event, it seams extremely complicated to figure out how to send messages.

Overall, documentation other than auto-doc strings would be pretty helpful.

@jaraco
Copy link
Owner

jaraco commented Mar 30, 2021

Thanks for the suggestion. I'd welcome additional documentation. I've always managed by hacking through the source, but I'd be very much delighted if someone were to author some docs, especially ones that meet common needs.

The short answer to your question is that it's not easy, at least not that I've found.

In the pmxbot project, which builds on IRC, I found that to send messages from an outside source, I needed to inject them into a queue and then in a periodic, scheduled command, pop messages off the queue to send them.

It's inelegant and sure would be nice if there were a more straightforward way to send messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants