diff --git a/src/Discord.Net.Core/Extensions/UserExtensions.cs b/src/Discord.Net.Core/Extensions/UserExtensions.cs index f98bf7227..4c50ca8b8 100644 --- a/src/Discord.Net.Core/Extensions/UserExtensions.cs +++ b/src/Discord.Net.Core/Extensions/UserExtensions.cs @@ -39,6 +39,23 @@ namespace Discord { return await (await user.GetOrCreateDMChannelAsync().ConfigureAwait(false)).SendMessageAsync(text, isTTS, embed, options).ConfigureAwait(false); } + + public static async Task SendDMAsync(this IUser user, + string text = null, + bool isTTS = false, + Embed embed = null, + RequestOptions options = null) + { + try + { + return await (await user.GetOrCreateDMChannelAsync().ConfigureAwait(false)).SendMessageAsync(text, isTTS, embed, options).ConfigureAwait(false); + } + catch(Exception e) + { + // I didn't know what to do here + } + } + /// /// Sends a file to this message channel with an optional caption.