Skip to content

Commit 89cc3e2

Browse files
feat: remind to post in subreddit
1 parent 402ac95 commit 89cc3e2

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/config/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const config = {
44
manuallyManagedRoleId: "1414830403470233620",
55
advertisingId: "1322175662903005186",
66
merchId: "1418951317602172958",
7+
updatesId: "982190978142195712",
78
generalId: "982192297645056040",
89
youtubeId: "1353453116007252050",
910
commandAdminRoleId: "917520262939938915",

src/events/messageCreate.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@ async function handleChannel(
3434

3535
export const onMessageCreate = async (client: Client, message: Message) => {
3636
if (message.channel.type !== ChannelType.GuildText) return;
37+
38+
if (message.channel.id === config.updatesId) {
39+
try {
40+
if (!message.author.bot) {
41+
await message.author.send(
42+
"Please post your announcement on r/6b6t subreddit too.",
43+
);
44+
}
45+
} catch (error) {
46+
console.error(
47+
`[UpdatesDM] Failed to DM user ${message.author.id}:`,
48+
error,
49+
);
50+
}
51+
}
52+
3753
await handleChannel(
3854
client,
3955
message.channel,

0 commit comments

Comments
 (0)