Added IWebhookUser and MessageSource

This commit is contained in:
RogueException
2017-03-30 23:29:30 -03:00
parent e7401eda68
commit bf0be82d15
32 changed files with 371 additions and 96 deletions

View File

@@ -51,5 +51,9 @@ namespace Discord
{
public static Optional<T> Create<T>() => Optional<T>.Unspecified;
public static Optional<T> Create<T>(T value) => new Optional<T>(value);
public static T? ToNullable<T>(this Optional<T> val)
where T : struct
=> val.IsSpecified ? val.Value : (T?)null;
}
}