GithubHelp home page GithubHelp logo

ni5arga / modmail-to-discord-slack Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 0.0 132 KB

A Devvit app which sends incoming and outgoing modmails from your subreddit's modmail to a Discord or Slack webhook instantly. Sends the message, sender, participant information etc. & other relevant information to the webhook payload.

License: GNU General Public License v3.0

TypeScript 100.00%
devvit discord discord-webhooks moderation modmail reddit reddit-api reddit-moderation slack slack-webhooks

modmail-to-discord-slack's Introduction

Reddit Modmail To Discord or Slack

A Devvit (Reddit's Developer Platform) app which sends incoming and outgoing modmails from your subreddit's modmail to a Discord or Slack webhook instantly. Sends the message, sender, participant information etc. & other relevant information to the webhook payload.

App Link : https://developers.reddit.com/apps/modmailtodiscord

Screenshots

Discord
Discord
Slack
Slack

Setup Instructions

Discord

To set-up this app to send incoming and outgoing modmails to a particular channel of your Discord server through a Webhook, follow these steps.

  1. Get Discord Webhook URL : You'll need to generate a Discord Webhook URL from channel settings. You can learn how to get webhook URLs from this guide or detailed instructions on how to generate Discord Webhook URL can be found below. Discord Webhook URLs look like this: https://discord.com/api/webhooks/1234567880123/38823ax30320bx_d83289324Q.
Instructions on how to Get Discord Webhook URL
  1. Create a Discord Webhook: - Open or create a Discord server where you have the necessary permissions. - Go to the channel where you want the webhook to send messages. - Right-click on the channel name and select "Edit Channel."
  2. Navigate to Integrations: - In the channel settings, find the "Webhooks" option under the Integrations tab in the left-hand menu. - Click on "Webhooks" to access the webhook settings.
  3. Create a New Webhook: - Click the "Create Webhook" button. - Customize the webhook by giving it a name, setting the profile picture (optional), and choosing the channel where it will send messages. - Once configured, click the "Save" or "Create" button.
  4. Copy the Webhook URL: - After creating the webhook, you'll see a section with the webhook URL. - Click on the "Copy" button next to the webhook URL to save it to your clipboard.
  1. Put the URL in your app settings : After you have obtained the webhook URL, you'll need to put it in the app settings. App settings can be found at https://developers.reddit.com/r/insert-your-subreddit-name-here/apps/modmailtodiscord/. After putting the Webhook URL in the text-box - click on the Save Changes button.

Now the app will send all incoming or outgoing modmails from your subreddit's modmail to the Discord channel through the webhook.

Slack

To set-up this app to send incoming and outgoing modmails to a particular channel of your Slack workspace through a Webhook, follow these steps.

  1. Get Slack Webhook URL : You'll need to obtain a Webhook URL to send the messages to a particular channel of your workspace - here's a guide on how to obtain the Slack Webhook URL. Slack Webhook URLs look like https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX.

  2. Put the URL in your app settings : After you have obtained the webhook URL, you'll need to put it in the app settings. App settings can be found at https://developers.reddit.com/r/insert-your-subreddit-name-here/apps/modmailtodiscord/. After putting the Webhook URL in the text-box - click on the Save Changes button.

Now the app will send all incoming or outgoing modmails from your subreddit's modmail to the Slack channel through the webhook.

Details

The app sends all incoming and outgoing modmails from your subreddit's modmail to your Discord/Slack channel through webhooks. Here are the details the app currently sends:

First Embed :

  1. Modmail Subject - The subject of the modmail (incoming or outgoing).
  2. Modmail Link - The link of the modmail thread, the app sends https://mod.reddit.com/all/{conversation-ID-here} links.
  3. Body - Sends the message body in markdown.
  4. Participating As - What the user is participating as, whether as participant_user or as moderator.

Second Embed :

  1. Conversation Type - Conversation Type specifies whether a conversation is with a subreddit itself, with another user, or with another subreddit entirely. internal means conversation with a Mod Discussion, internal to the subreddit.sr_user means conversation between the subreddit and another user outside of the subreddit. sr_sr means conversation between two different subreddits.
  2. Conversation State - The State of the modmail conversation. Can be New, Appeals, Archived, Filtered, InProgress & JoinRequests.
  3. Participant - The participant in the modmail conversation (it'll be the user in most cases).
  4. Participant Information - Some information about participant. isMod: is the participant a mod of the subreddit, isAdmin: is the user an admin, isApproved: is the user an Approved user, isHidden: is the user Hidden, isDeleted: is the participant a Deleted account, isAuto: is the conversation automatically generated e.g. from automod, u/reddit.
  5. Last Updated At - Shows the time & date when the conversation was last added.
  6. isInternalModmail (mod-only) - Tells if the modmail conversation is mod-only.

Contributions

Feel free to contribute and improve this project. Pull requests and issues are always welcome.

License

This source code is licensed under GNU General Public License v3.0.

modmail-to-discord-slack's People

Contributors

ni5arga avatar ternera avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

modmail-to-discord-slack's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.