Reads each new post in your Discord community channel and forwards support questions, bug reports and ideas to the right channel.
Uses
ClaudeDiscord
Send community posts to the right channel
communityPost.When a new message is posted in a Discord channel. Save it as communityPost.serverId to blank.Set serverId to blank.supportChannelId to blank.Set supportChannelId to blank.bugChannelId to blank.Set bugChannelId to blank.ideaChannelId to blank.Set ideaChannelId to blank.minimumMessageLength to 15.Set minimumMessageLength to 15.messageText to blank.Set messageText to blank.contentErrorIf a step below fails, save the error as contentErrorTry
communityPost.content and save it as messageText.Trim communityPost.content and save it as messageText.On error
messageText to blank.Change messageText to blank.sourceChannelId to blank.Set sourceChannelId to blank.channelErrorIf a step below fails, save the error as channelErrorTry
communityPost.channel_id and save it as sourceChannelId.Trim communityPost.channel_id and save it as sourceChannelId.On error
sourceChannelId to blank.Change sourceChannelId to blank.messageId to blank.Set messageId to blank.messageIdErrorIf a step below fails, save the error as messageIdErrorTry
communityPost.message_id and save it as messageId.Trim communityPost.message_id and save it as messageId.On error
messageId to blank.Change messageId to blank.authorName to blank.Set authorName to blank.authorErrorIf a step below fails, save the error as authorErrorTry
communityPost.author_username and save it as authorName.Trim communityPost.author_username and save it as authorName.On error
authorName to blank.Change authorName to blank.authorName is emptyIf authorName is emptyYes
authorName to a community member.Change authorName to a community member.No
No steps
routedMarker to Routed here from the community channel.Set routedMarker to Routed here from the community channel.messageText contains routedMarkerIf messageText contains routedMarkerYes
No
No steps
messageText is less than minimumMessageLength multiplied by 1If the length of messageText is less than minimumMessageLength multiplied by 1Yes
No
No steps
classifyRules to:Set classifyRules to:You sort one message from a community chat channel into exactly one category.
support - the person is asking for help using the product, or asking a question they expect an answer to
bug - the person is reporting something broken, failing, or behaving wrongly
idea - the person is suggesting a feature, a change, or an improvement
chatter - conversation, greetings, jokes, thanks, opinions, plans, or anything else that needs no action from the team
unclear - you cannot tell which of the other four it is
Most messages in a community channel are chatter. Answer chatter unless the message clearly...classifyPrompt to classifyRulesSet classifyPrompt to classifyRules
Message from authorName:
messageText.classifyPrompt. Save it as classification.Ask Claude: classifyPrompt. Save it as classification.
Maximum response length: 16verdict to unclear.Set verdict to unclear.verdictErrorIf a step below fails, save the error as verdictErrorTry
classification.response_text lowercase and save it as verdict.Make classification.response_text lowercase and save it as verdict.On error
verdict to unclear.Change verdict to unclear.destinationChannelId to blank.Set destinationChannelId to blank.routeLabel to blank.Set routeLabel to blank.verdict is supportIf verdict is supportYes
destinationChannelId to supportChannelId.Change destinationChannelId to supportChannelId.routeLabel to support question.Change routeLabel to support question.Else if @verdict is "bug"
destinationChannelId to bugChannelId.Change destinationChannelId to bugChannelId.routeLabel to bug report.Change routeLabel to bug report.Else if @verdict is "idea"
destinationChannelId to ideaChannelId.Change destinationChannelId to ideaChannelId.routeLabel to feature idea.Change routeLabel to feature idea.Otherwise
No steps
destinationChannelId is emptyIf destinationChannelId is emptyYes
No
No steps
destinationChannelId is sourceChannelIdIf destinationChannelId is sourceChannelIdYes
No
No steps
postLink to (the original post could not be linked).Set postLink to (the original post could not be linked).sourceChannelId isn't empty and messageId isn't emptyIf sourceChannelId isn't empty and messageId isn't emptyYes
postLink to https://discord.com/channels/@serverId/@sourceChannelId/@messageId.Change postLink to https://discord.com/channels/@serverId/@sourceChannelId/@messageId.No
No steps
routedHeader to routedMarker - routeLabel.Set routedHeader to routedMarker - routeLabel.routedFrom to Posted by authorName.Set routedFrom to Posted by authorName.routedLink to Original post: postLink.Set routedLink to Original post: postLink.messageText to 1500 characters and save it as quotedText.Shorten messageText to 1500 characters and save it as quotedText.routedBody to What they said:Set routedBody to What they said:
quotedText.routedTop to routedHeaderSet routedTop to routedHeader
routedFrom
routedLink.routedMessage to routedTopSet routedMessage to routedTop
routedBody.destinationChannelId.Send a message to channel destinationChannelId.routedMessage