File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,6 +112,20 @@ async def on_message(message):
112112 parsedDates = parseDates (today .year )
113113 if message .author == client .user :
114114 return
115+
116+ if message .guild is None and not message .author .bot :
117+ # Is DM
118+ target_channel_id = 1449013521005416459
119+ support_user_id = 524302018005827598
120+ target_channel = client .get_channel (target_channel_id )
121+ if target_channel :
122+ # Send the DM content to the channel
123+ await target_channel .send (f"DM from { message .author .display_name } : { message .content } " )
124+ await message .channel .send ("Message redirected!" )
125+ else :
126+ await message .channel .send (f"Could not redirect message to <@{ support_user_id } >, please contact them directly." )
127+ return
128+
115129 # Ignore all emojis
116130 newMessage = deEmojify (message .content ).translate (str .maketrans ('' , '' , string .punctuation )).strip ()
117131
You can’t perform that action at this time.
0 commit comments