Skip to content

Commit

Permalink
Revert some messages using Mention instead of GetUserPreferredName()
Browse files Browse the repository at this point in the history
Revert some messages to use @username (.Mention) again.
  • Loading branch information
hariedo authored Nov 22, 2023
1 parent 63c8695 commit 8e81ab9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions DiscordBot/Services/UserService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ public async Task Thanks(SocketMessage messageParam)
if (_thanksCooldown.HasUser(userId))
{
await messageParam.Channel.SendMessageAsync(
$"{messageParam.Author.GetUserPreferredName()}, you must wait " +
$"{messageParam.Author.Mention} you must wait " +
$"{DateTime.Now - _thanksCooldown[userId]:ss} " +
"seconds before giving another karma point." + Environment.NewLine +
"(In the future, if you are trying to thank multiple people, include all their names in the thanks message.)")
Expand Down Expand Up @@ -506,7 +506,7 @@ await messageParam.Channel.SendMessageAsync(
sb.Append(".");
if (mentionedSelf)
await messageParam.Channel.SendMessageAsync(
$"{messageParam.Author.GetUserPreferredName()}, you can't give karma to yourself.").DeleteAfterTime(defaultDelTime);
$"{messageParam.Author.Mention} you can't give karma to yourself.").DeleteAfterTime(defaultDelTime);

_canEditThanks.Remove(messageParam.Id);

Expand Down Expand Up @@ -551,7 +551,7 @@ public async Task CodeCheck(SocketMessage messageParam)
{
// A ``` codeblock was found, but no CS, let 'em know
await messageParam.Channel.SendMessageAsync(
$"{messageParam.Author.GetUserPreferredName()}, when using code blocks remember to use the ***syntax highlights*** to improve readability.\n{CodeReminderFormattingExample}")
$"{messageParam.Author.Mention} when using code blocks remember to use the ***syntax highlights*** to improve readability.\n{CodeReminderFormattingExample}")
.DeleteAfterSeconds(seconds: 60);
return;
}
Expand All @@ -570,7 +570,7 @@ await messageParam.Channel.SendMessageAsync(
{
//! CodeReminderCooldown.AddCooldown(userId, _codeReminderCooldownTime);
await messageParam.Channel.SendMessageAsync(
$"{messageParam.Author.GetUserPreferredName()}, are you sharing C# scripts? Remember to use codeblocks to help readability!\n{CodeReminderFormattingExample}")
$"{messageParam.Author.Mention} are you sharing C# scripts? Remember to use codeblocks to help readability!\n{CodeReminderFormattingExample}")
.DeleteAfterSeconds(seconds: 60);
if (content.Length > _maxCodeBlockLengthWarning)
{
Expand Down Expand Up @@ -606,7 +606,7 @@ private async Task ScoldForAtEveryoneUsage(SocketMessage messageParam)
DateTime.Now.AddSeconds(_settings.EveryoneScoldPeriodSeconds);

await messageParam.Channel.SendMessageAsync(
$"Please don't try to alert **everyone** on the server, {messageParam.Author.GetUserPreferredName()}!\n" +
$"Please don't try to alert **everyone** on the server, {messageParam.Author.Mention}!\n" +
"If you are asking a question, people will help you when they have time.")
.DeleteAfterTime(minutes: 2);
}
Expand Down

0 comments on commit 8e81ab9

Please sign in to comment.