Skip to content

Commit

Permalink
Update mute DM and DM autoresponse
Browse files Browse the repository at this point in the history
Fixes #260
  • Loading branch information
Erisa committed Jan 22, 2025
1 parent c1dfa22 commit e153455
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Events/DirectMessageEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static async void DirectMessageEventHandler(DiscordMessage message)

// Make sure there is a message before the current one, otherwise an exception could be thrown
var msgsBefore = await message.Channel.GetMessagesBeforeAsync(message.Id, 1).ToListAsync();
if (msgsBefore.Count() > 0)
if (msgsBefore.Count > 0)
{
// Get single message before the current one
var msgBefore = msgsBefore[0];
Expand All @@ -27,7 +27,8 @@ public static async void DirectMessageEventHandler(DiscordMessage message)
{
await message.RespondAsync(
$"{Program.cfgjson.Emoji.Information} If you wish to discuss moderator actions, **please contact**" +
$" <@{Program.cfgjson.ModmailUserId}>");
$" <@{Program.cfgjson.ModmailUserId}>." +
$"\nWhen contacting <@{Program.cfgjson.ModmailUserId}>, make sure to **enable DMs** from the server to allow your message to go through.");
sentAutoresponse = true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Helpers/MuteHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public static (int MuteHours, int WarnsSinceThreshold) GetHoursToMuteFor(Diction

if (reason.ToLower().Contains("modmail"))
{
dmContent += $"\n{Program.cfgjson.Emoji.Information} When contacting modmail, make sure to **enable DMs** from the server to allow your message to go through.";
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.";
}
output.dmMessage = await naughtyMember.SendMessageAsync(dmContent);
}
Expand Down

0 comments on commit e153455

Please sign in to comment.