[DEV] Send information about new posts and threads to Discord channel using WebHooks
#1
Hi,

I am working on a plugin that send a message whenever new thread or post are added. You can:

* choose, from which boards you want push an information,

* select information method (only a simple message about new thread/posts, message with short post/thread (up to 100 chars), message with long post/thread (up to 1000 chars)
* change default info message text to yours

*** this is a development version ***

https://github.com/ryczypior/discord-webhook-for-mybb
Reply
#2
Great, thank you! I am looking forward! I just need something like GitHub webhooks which sends info about new PR/issues/changes etc but for MyBB.

Any planned features/changes or known bugs? I would like to use it on my live board. Thank you!
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#3
Yes, I tought about these features:
* multiple webhooks (for different boards and/or events)
* more events (hooks) - after merge, after post/thread update, MAYBE PM notification (I'm not sure if it's good idea)
* turning on/off single events (hooks)

Known bugs:
* problems with '[' and ']' characters - everything inside the brackets is not shown (I'll have to escape them)

This plugin is very new, but I'm using it on my forum and it works good Smile
Reply
#4
I just reported an issue on your GitHub - I cannot install and activate Sad
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#5
What a shame Big Grin I used to use ActiveRecord, and I didn't escaped strings. It's corrected now, but you have to install the plugin, uninstall it and reinstall again (just because of previous incomplete installation).
//EDIT, Thanks for your contribution!
Reply
#6
Thank you, works fine. I miss setting for sending info only for new threads Sad is that possible to add it?
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#7
Of course, I'll do it tomorrow Smile Maybe I'll have time to add more events (like update post, merge post, etc)
Reply
#8
I was considering making something like this both to send web hooks and to receive them from places like GitHub. Nice work so far Smile
Reply
#9
@ryczypior - I have an issue - I can install and activate, I set URL etc. but no info post are send to our Discord channel

EDIT: My webhook URL is something like:
https://ptb.discordapp.com/api/webhooks/xxx/yyy

I think that "ptb" is the issue? I will try it without it, maybe if it is the issue, it could accept url in both formats (I use beta sw for win)

EDIT2: yes, without "ptb" works fine
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#10
Exactly, plugin checks if URL is webhook's url. I've just add a ptb subdomain option, so it should works with both.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)