mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-05-03 04:29:54 +03:00
Fix CI alerts
This commit is contained in:
parent
4b2d98c440
commit
587e5d11f9
6 changed files with 134 additions and 133 deletions
|
@ -49,11 +49,6 @@ public static partial class Utils {
|
|||
return ulong.TryParse(NumbersOnlyRegex().Replace(mention, ""), out var id) ? id : 0;
|
||||
}
|
||||
|
||||
public static async Task SendDirectMessage(ulong id, string toSend) {
|
||||
if (await Boyfriend.Client.GetUserAsync(id) is SocketUser user)
|
||||
await SendDirectMessage(user, toSend);
|
||||
}
|
||||
|
||||
public static async Task SendDirectMessage(SocketUser user, string toSend) {
|
||||
try { await user.SendMessageAsync(toSend); } catch (HttpException e) {
|
||||
if (e.DiscordCode is not DiscordErrorCode.CannotSendMessageToUser) throw;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue