MyBB Community Forums

Full Version: [DEV] Send information about new posts and threads to Discord channel using WebHooks
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
I've just released some fixes, also for friendly urls, avatars (uploaded, from url, gravatars) and others. It's available on github Smile
@GXD3S - you can turn on embed fields - it can be set in settings field called "Information display method" - second and third option turns on embedded messages (short and long with avatar). Maybe I should split the options - what to show in embedded messages? Eg.
[x] Show avatar
[x] Show title
[ ] Show the shortened message content
[x] Show full message content (up to MAX_DISCORD_MESSAGE_LENGTH chars)
Great, would be nice to split them
.

My feature request, if it is even possible.
- ignore selected usegroups - no post or thread info send to discord when they post anything on forum
- different color for post/threads - I mean the color of the bar shown on the left when a new info is send to discord, something like GitHub bot supports
@Eldenroot - everything is possible Wink
- Ignore selected groups - could you add this on github as a feature?
- different colors - I've just added this, but you have to reinstall the plugin (another options to add, I don't know if there is a possibility to upgrade non existing settings)
I've also added an avatar for an author (if exists ofc), but it has to be available from the public area (I haven't mentioned that in Readme - hotlinking should be turned on).
EDIT: OK, I've just turned off the avatars because of hotlinking. If it was turned off, no message was shown on discord.
I will try to open a ticket on gitHub, anyway I am not at home right now (maybe it will be added sooner than I arrive back) Smile

What else do you wanna add? I will try to think about it and let you know if I have any further idea.

Have a nice day!
@Eldenroot I'll open an enhancement ticket with your proposals, I'm sorry, I thought you're available now Smile

I'd like to add a separated options for everything that should be shown on discord - Like I wrote in previous post - I think there should be a possibility to change every available option to show - (author's name, author's name with an avatar, title, message limited to X chars, how many chars to show, etc.). I'd like to add these options before end of this year, and maybe... MAYBE put this plugin into release version Smile - many thanks to you and other contributors.

About avatars with username - I have to turn off this feature because of hotlinking - If I turned this on with hot links turned off, no messages has been shown on discord. So I'll try to add this feature as an option for this plugin in next days. I have no idea how to do a quick check if the image is available (of course I can perform a curl request, but it isn't quick, right?)

And I have to apologize everyone who reads my posts - my english is quite bad, and it's not my native language. I'm doing many mistakes and trying to learn more in english Smile and I hope the connection of my skills and google translator gives you a possibility to understand me Smile
@Eldenroot, I've just added ignored usergroups to the plugin Smile
Oh, thats great, thank you. I will try in 2 days, looking forward, keep good work
Hi again!
I've upgraded the plugin to use every field from users table in mybb database (yup, you can use {password} as well as {username} or {email}), also you can use every additional profile field using it's ID (eg. {fid3}) or it's name (eg. {@Sex}). You can also use these fields for Bot Name displaying on Discord.
For example, you've added another custom field to user profile named "Discord ID". It's ID is 4. You can use {fid4} or {@Discord ID} to obtain it's value from profile fields.

One hint! If you'd like to mention someone by using this plugin, use <@DISCORDID> in the message instead of it's username. You can obtain DISCORDID from username's context menu in discord app (last option - copy ID) and save it in your profile custom field.
Awesome, happy to see a lot of new features have been added since I last updated.

I'll have some fun playing around with all of it tomorrow. Much thanks!
Hello! Great plugin! For my purposes is there anyway to add a replacement string to mention? IE i want my user to be able to write like [@Fish] and have it replace with my <@discorduserid> in the message, the issue is that i dont want to notify the poster, but someone who the post is going TO so the profile fields dont help me there :/

i have tried using mycode and bad word filter to get this replace to happen, but i think the webhook must occur before the replace does? Or it is just a display replace and not in the actual sql post.

(and a way to select how much of the message gets sent byond the defults would be lovely but not huge for me) Thank you so much!!
Pages: 1 2 3 4 5 6