diff --git a/DiscordBot/Services/UserService.cs b/DiscordBot/Services/UserService.cs index 81c052fb..3d513292 100644 --- a/DiscordBot/Services/UserService.cs +++ b/DiscordBot/Services/UserService.cs @@ -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.)") @@ -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); @@ -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; } @@ -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) { @@ -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); }