Skip to content

Commit e153455

Browse files
committed
Update mute DM and DM autoresponse
Fixes #260
1 parent c1dfa22 commit e153455

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Events/DirectMessageEvent.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public static async void DirectMessageEventHandler(DiscordMessage message)
1010

1111
// Make sure there is a message before the current one, otherwise an exception could be thrown
1212
var msgsBefore = await message.Channel.GetMessagesBeforeAsync(message.Id, 1).ToListAsync();
13-
if (msgsBefore.Count() > 0)
13+
if (msgsBefore.Count > 0)
1414
{
1515
// Get single message before the current one
1616
var msgBefore = msgsBefore[0];
@@ -27,7 +27,8 @@ public static async void DirectMessageEventHandler(DiscordMessage message)
2727
{
2828
await message.RespondAsync(
2929
$"{Program.cfgjson.Emoji.Information} If you wish to discuss moderator actions, **please contact**" +
30-
$" <@{Program.cfgjson.ModmailUserId}>");
30+
$" <@{Program.cfgjson.ModmailUserId}>." +
31+
$"\nWhen contacting <@{Program.cfgjson.ModmailUserId}>, make sure to **enable DMs** from the server to allow your message to go through.");
3132
sentAutoresponse = true;
3233
}
3334
}

Helpers/MuteHelpers.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public static (int MuteHours, int WarnsSinceThreshold) GetHoursToMuteFor(Diction
193193

194194
if (reason.ToLower().Contains("modmail"))
195195
{
196-
dmContent += $"\n{Program.cfgjson.Emoji.Information} When contacting modmail, make sure to **enable DMs** from the server to allow your message to go through.";
196+
dmContent += $"\n{Program.cfgjson.Emoji.Information} When contacting <@{Program.cfgjson.ModmailUserId}>, make sure to **enable DMs** from the server to allow your message to go through.";
197197
}
198198
output.dmMessage = await naughtyMember.SendMessageAsync(dmContent);
199199
}

0 commit comments

Comments
 (0)