Skip to content

Commit d52db4f

Browse files
committed
chore: migrate to devvit.json
1 parent 8966040 commit d52db4f

4 files changed

Lines changed: 74 additions & 3 deletions

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ A Devvit [(Reddit's Developer Platform)](https://developers.reddit.com/) app tha
44

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

7-
App Identifier: modmailtodiscord
87

98
## Screenshots
109

devvit-readme.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Reddit Modmail To Discord or Slack
2+
3+
A Devvit [(Reddit's Developer Platform)](https://developers.reddit.com/) app that instantly sends incoming and outgoing modmails from your subreddit's modmail to a Discord or Slack webhook. Sends the message, sender, participant information, & other relevant information to the webhook payload.
4+
5+
This app is open soure, the source code can be found here: [https://github.com/ni5arga/Modmail-To-Discord-Slack](https://github.com/ni5arga/Modmail-To-Discord-Slack).
6+
7+
## Screenshots
8+
9+
| Discord |
10+
| ------------------------------------------- |
11+
| ![Discord](https://i.imgur.com/yq5VX5o.png) |
12+
13+
| Slack |
14+
| ----------------------------------------- |
15+
| ![Slack](https://i.imgur.com/ZwJa805.png) |
16+
17+
## Setup Instructions
18+
19+
### Discord
20+
21+
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](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) 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`.
22+
23+
2. **Put The URL In Your App Settings** : After you've 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.
24+
25+
Instructions on How to Get Discord Webhook URL:
26+
27+
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."
28+
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.
29+
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.
30+
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.
31+
32+
33+
### Slack
34+
35+
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](https://api.slack.com/messaging/webhooks) on how to obtain the Slack Webhook URL. Slack Webhook URLs look like `https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX`.
36+
37+
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.
38+
39+
## Details
40+
41+
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 (more to be added soon):
42+
43+
1. **Modmail Subject** - The subject of the modmail (incoming or outgoing)
44+
2. **Modmail Link** - The link of the modmail thread, the app sends `https://mod.reddit.com/all/{conversation-ID-here}` links
45+
3. **Author** - Author of the modmail message or the latest message in the modmail thread
46+
4. **Body** - Sends the message body in Markdown
47+
5. **Participant** - The participant of the modmail conversation (most of the times it'll be the user, unless it's a mod discussion or a subreddit to subreddit conversation)
48+
6. **Participating As** - What the user is participating as, whether as `participant_user` or as `moderator`
49+
50+
## Changelog
51+
52+
**Latest Version:**
53+
- Added a feature to which helps to differentiate between regular messages and private mod notes.
54+
- Added ignore-list which helps mods to ignore messages from certain users/mods.
55+
- Added discord role-ping feature.
56+
- Mod discussion syncing setting.
57+
- Fix Discord embed character limit issue.
58+
59+
**Previous Versions:**
60+
- Add setting for app to ignore outgoing modmail messages by mods and not send them to the webhook
61+
- Declutter Discord & Slack embed
62+
- Add support for more Discord webhook URLs (Canary, PTB, etc.)
63+
64+
## Contributions
65+
66+
Feel free to contribute and improve this project. Pull requests and issues are always welcome.
67+

devvit.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "modmailtodiscord",
3+
"blocks": {
4+
"entry": "src/main.ts",
5+
"triggers": ["onModMail"]
6+
}
7+
}

devvit.yaml

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)