@@ -119,7 +119,7 @@ namespace Discord | |||||
/// <param name="embed">The <see cref="Embed"/> to compare with the current <see cref="Embed"/></param> | /// <param name="embed">The <see cref="Embed"/> to compare with the current <see cref="Embed"/></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public bool Equals(Embed embed) | public bool Equals(Embed embed) | ||||
=> GetHashCode() == embed.GetHashCode(); | |||||
=> GetHashCode() == embed?.GetHashCode(); | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
public override int GetHashCode() | public override int GetHashCode() | ||||
@@ -66,8 +66,8 @@ namespace Discord | |||||
/// </summary> | /// </summary> | ||||
/// <param name="embedAuthor">The <see cref="EmbedAuthor"/> to compare with the current <see cref="EmbedAuthor"/></param> | /// <param name="embedAuthor">The <see cref="EmbedAuthor"/> to compare with the current <see cref="EmbedAuthor"/></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public bool Equals(EmbedAuthor embedAuthor) | |||||
=> GetHashCode() == embedAuthor.GetHashCode(); | |||||
public bool Equals(EmbedAuthor? embedAuthor) | |||||
=> GetHashCode() == embedAuthor?.GetHashCode(); | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
public override int GetHashCode() | public override int GetHashCode() | ||||
@@ -507,6 +507,9 @@ namespace Discord | |||||
/// <returns></returns> | /// <returns></returns> | ||||
public bool Equals(EmbedBuilder embedBuilder) | public bool Equals(EmbedBuilder embedBuilder) | ||||
{ | { | ||||
if (embedBuilder is null) | |||||
return false; | |||||
if (Fields.Count != embedBuilder.Fields.Count) | if (Fields.Count != embedBuilder.Fields.Count) | ||||
return false; | return false; | ||||
@@ -61,8 +61,8 @@ namespace Discord | |||||
/// </summary> | /// </summary> | ||||
/// <param name="embedField"></param> | /// <param name="embedField"></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public bool Equals(EmbedField embedField) | |||||
=> GetHashCode() == embedField.GetHashCode(); | |||||
public bool Equals(EmbedField? embedField) | |||||
=> GetHashCode() == embedField?.GetHashCode(); | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
public override int GetHashCode() | public override int GetHashCode() | ||||
@@ -68,8 +68,8 @@ namespace Discord | |||||
/// </summary> | /// </summary> | ||||
/// <param name="embedFooter">The <see cref="EmbedFooter"/> to compare with the current <see cref="EmbedFooter"/></param> | /// <param name="embedFooter">The <see cref="EmbedFooter"/> to compare with the current <see cref="EmbedFooter"/></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public bool Equals(EmbedFooter embedFooter) | |||||
=> GetHashCode() == embedFooter.GetHashCode(); | |||||
public bool Equals(EmbedFooter? embedFooter) | |||||
=> GetHashCode() == embedFooter?.GetHashCode(); | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
public override int GetHashCode() | public override int GetHashCode() | ||||
@@ -78,8 +78,8 @@ namespace Discord | |||||
/// </summary> | /// </summary> | ||||
/// <param name="embedImage">The <see cref="EmbedImage"/> to compare with the current <see cref="EmbedImage"/></param> | /// <param name="embedImage">The <see cref="EmbedImage"/> to compare with the current <see cref="EmbedImage"/></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public bool Equals(EmbedImage embedImage) | |||||
=> GetHashCode() == embedImage.GetHashCode(); | |||||
public bool Equals(EmbedImage? embedImage) | |||||
=> GetHashCode() == embedImage?.GetHashCode(); | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
public override int GetHashCode() | public override int GetHashCode() | ||||
@@ -60,8 +60,8 @@ namespace Discord | |||||
/// </summary> | /// </summary> | ||||
/// <param name="embedProvider">The <see cref="EmbedProvider"/> to compare with the current <see cref="EmbedProvider"/></param> | /// <param name="embedProvider">The <see cref="EmbedProvider"/> to compare with the current <see cref="EmbedProvider"/></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public bool Equals(EmbedProvider embedProvider) | |||||
=> GetHashCode() == embedProvider.GetHashCode(); | |||||
public bool Equals(EmbedProvider? embedProvider) | |||||
=> GetHashCode() == embedProvider?.GetHashCode(); | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
public override int GetHashCode() | public override int GetHashCode() | ||||
@@ -78,8 +78,8 @@ namespace Discord | |||||
/// </summary> | /// </summary> | ||||
/// <param name="embedThumbnail">The <see cref="EmbedThumbnail"/> to compare with the current <see cref="EmbedThumbnail"/></param> | /// <param name="embedThumbnail">The <see cref="EmbedThumbnail"/> to compare with the current <see cref="EmbedThumbnail"/></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public bool Equals(EmbedThumbnail embedThumbnail) | |||||
=> GetHashCode() == embedThumbnail.GetHashCode(); | |||||
public bool Equals(EmbedThumbnail? embedThumbnail) | |||||
=> GetHashCode() == embedThumbnail?.GetHashCode(); | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
public override int GetHashCode() | public override int GetHashCode() | ||||
@@ -72,8 +72,8 @@ namespace Discord | |||||
/// </summary> | /// </summary> | ||||
/// <param name="embedVideo">The <see cref="EmbedVideo"/> to compare with the current <see cref="EmbedVideo"/></param> | /// <param name="embedVideo">The <see cref="EmbedVideo"/> to compare with the current <see cref="EmbedVideo"/></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public bool Equals(EmbedVideo embedVideo) | |||||
=> GetHashCode() == embedVideo.GetHashCode(); | |||||
public bool Equals(EmbedVideo? embedVideo) | |||||
=> GetHashCode() == embedVideo?.GetHashCode(); | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
public override int GetHashCode() | public override int GetHashCode() | ||||