pipedream icon indicating copy to clipboard operation
pipedream copied to clipboard

[TRIGGER] New triggers for Discord App

Open vfxturjo opened this issue 3 years ago • 9 comments

Describe the event source. What app is this for, and what event does the trigger correspond to?

I want an event source like this: When a discord message is deleted, it will be triggered. it will include the discord message ID, the content of the message, deletion time etc.

Please provide a link to the relevant API docs for the specific service / operation this trigger is tied to.

Discord api i guess, I'm noob, sorry

vfxturjo avatar Dec 17 '21 17:12 vfxturjo

Hello @vfxturjo, we're investigating this, we will update in this thread whenever there's any updates!

vunguyenhung avatar Jun 08 '22 05:06 vunguyenhung

Thanks for the request! Did you know that anyone can author and publish their own Pipedream sources? Would you be interested in helping out with that? We're happy to answer any questions or support you in any way.

If you don't have the time, would you be willing to reach out to the app provider to see if they're interested in building these? When we work with an app partner, it improves the quality of the integration, and it helps when this kind of request comes from a customer like you.

dylburger avatar Jun 08 '22 05:06 dylburger

Hello, I have investigated this issue, and the closest Discord feature for integrating requested source is Discord Gateway Message Delete using WebSockets. As for now Pipedream Source does not support WebSocket, so I will mark this issue as blocked until Pipedream source can support it or Discord provide another approach for getting this event. Thanks!

vunguyenhung avatar Jun 08 '22 06:06 vunguyenhung

We've added this issue to our backlog. You can follow this issue for updates!

dylburger avatar Jun 23 '22 00:06 dylburger

New triggers for discord app

  • Message deleted -- include an optional prop to specify the channel(s)
  • Reaction added -- include an optional prop to specify the channel(s)
  • New member added to guild

The Discord $.interface.apphook prop now additionally supports the MESSAGE_DELETE, MESSAGE_DELETE:${channelId}, MESSAGE_REACTION_ADD, MESSAGE_REACTION_ADD:${channelId}, and GUILD_MEMBER_ADD event types.

For example:

  props: {
    discord,
    discordApphook: {
      type: "$.interface.apphook",
      appProp: "discord",
      eventNames: ["GUILD_MEMBER_ADD"],
    },

dannyroosevelt avatar Jul 19 '22 23:07 dannyroosevelt

@js07 Is the built in channel prop able to be made optional?

    channels: {
      type: "$.discord.channel[]",
      appProp: "discord",
      label: "Channels",
      description: "Select the channel(s) you'd like to be notified for",
      optional: true,
    },

When I include optional: true, I get this error:

{"error":"{\"name\":\"UserError\",\"message\":\"optional not supported for prop channels\"}"}

michelle0927 avatar Jul 25 '22 19:07 michelle0927

@michelle0927 It looks like the optional property is not currently enabled for the $.discord.channel prop type. I can enable it and let you know when it should be working. 🙏

js07 avatar Jul 26 '22 00:07 js07

@michelle0927 It looks like the optional property is not currently enabled for the $.discord.channel prop type. I can enable it and let you know when it should be working. 🙏

@js07 Thanks. That would be awesome. Then we can make use of the appHook event types that don't include a channelId.

michelle0927 avatar Jul 26 '22 15:07 michelle0927

@michelle0927 I enabled the optional property for the $.discord.channel prop type. Let me know if you have any issues getting it to work.

js07 avatar Jul 27 '22 16:07 js07