What is the Best Way to Count Discord Messages in Two Separate Channels?

This topic was automatically generated from Slack. You can find the original thread here.

Hi I wonder if someone could help me who might have tackled this before. Essentially I am trying to count discord messages in 2 separate channels. I have a workflow set up with the discord bot and it emits a single response every half hour for each new message and pings our website API to count them up. The issue is sometimes this can be quite a few messages at once and it can time out our website which makes it miscount & it’s also hammering our compute time. I’ve tried to have it emit a single message but then it always pulls the last 100 so not much help. I was hoping someone may have an idea how we could make this count up the messages during that period and wrap the number in a single api call? Many thanks.

Hello , I think for this you can build you own Discord source that counts the message within a period. Pipedream has many references that you can use to do this:
Source development doc
Discord Bot - New Message In Channel
Additionally, if you’d like to have a new built-in source for your usecase, you can submit a new ticket for Pipedream here