Open monikakuster opened 1 month ago
I'd love to take this up!
Hey @sikehish.
If you are new to Bytechef, please read our CONTRIBUTING.md
This part describes how to create new component or how to add new action or trigger to existing one.
Here is the detailed description of the structure of every component.
And finally, here are the guides on how to work with the trigger and how to test it.
Thank you for the guidance.I am working on it :))
Implement New Message trigger for Discord component.
Is this channel specific? It's a bit vague. Would you mind explaining it in a bit more detail with regard to what we're trying to achieve here? Would appreciate it!
The description for the issue has been updated. I believe it’s clearer now. :)
The description for the issue has been updated. I believe it’s clearer now. :)
Thank you! Yup, It's a lot clear now!
The description for the issue has been updated. I believe it’s clearer now. :)
Hi. Am I allowed to use JDA? I am using polling to check for a new message/messages. I just want to confirm if we are on the same page. I have written the logic for this in the below file. If this seems okay, then I shall start incorporating the logic into bytechef. ( https://github.com/sikehish/Discord-New-Message-Trigger/blob/main/src/main/java/org/example/DiscordBot.java)
Also, do I need to create a new type of DiscordConnection , as I'll have to use "Bot
Hi @sikehish, thank you for asking!
I've skimmed through the code and I don't think that: while(true){ fetchMessages() }
is the solution we're looking for. A trigger is Bytechef's name for a webhook. You can see examples in our currently implemented triggers (Box, Google Sheets, Webhook).
Here is how I would approach the problem:
webhookRequest(...)
methodIf the JDA could help you with implementing some of these ideas, you are welcome to using it. The Bearer token should be enough for implementing the ideas above, but if it isn't, you are welcome to implement a new type of connection.
Hope this helps :smile:
The New Message trigger for Discord component is activated whenever a new message is sent in a specific Discord channel. It enables real-time automation of workflows by responding to incoming messages as soon they apear in the designated channel. This is especially useful for monitoring communication, extracting data, or initiating processes based on the content of the messages.
Trigger Properties:
Output:
Documentation Reference: https://discord.com/developers/docs/resources/webhook#create-webhook