@@ -16,8 +16,6 @@ namespace Discord.Rest | |||||
public class RestUser : RestEntity<ulong>, IUser, IUpdateable | public class RestUser : RestEntity<ulong>, IUser, IUpdateable | ||||
{ | { | ||||
#region RestUser | #region RestUser | ||||
private readonly bool _useBidirectionalUnicode; | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
public bool IsBot { get; private set; } | public bool IsBot { get; private set; } | ||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
@@ -53,7 +51,6 @@ namespace Discord.Rest | |||||
internal RestUser(BaseDiscordClient discord, ulong id) | internal RestUser(BaseDiscordClient discord, ulong id) | ||||
: base(discord, id) | : base(discord, id) | ||||
{ | { | ||||
_useBidirectionalUnicode = discord.FormatUsersInBidirectionalUnicode; | |||||
} | } | ||||
internal static RestUser Create(BaseDiscordClient discord, Model model) | internal static RestUser Create(BaseDiscordClient discord, Model model) | ||||
=> Create(discord, null, model, null); | => Create(discord, null, model, null); | ||||
@@ -133,9 +130,9 @@ namespace Discord.Rest | |||||
/// A string that resolves to Username#Discriminator of the user. | /// A string that resolves to Username#Discriminator of the user. | ||||
/// </returns> | /// </returns> | ||||
public override string ToString() | public override string ToString() | ||||
=> Format.UsernameAndDiscriminator(this, _useBidirectionalUnicode); | |||||
=> Format.UsernameAndDiscriminator(this, Discord.FormatUsersInBidirectionalUnicode); | |||||
private string DebuggerDisplay => $"{Format.UsernameAndDiscriminator(this, _useBidirectionalUnicode)} ({Id}{(IsBot ? ", Bot" : "")})"; | |||||
private string DebuggerDisplay => $"{Format.UsernameAndDiscriminator(this, Discord.FormatUsersInBidirectionalUnicode)} ({Id}{(IsBot ? ", Bot" : "")})"; | |||||
#endregion | #endregion | ||||
#region IUser | #region IUser | ||||
@@ -17,7 +17,6 @@ namespace Discord.WebSocket | |||||
[DebuggerDisplay(@"{DebuggerDisplay,nq}")] | [DebuggerDisplay(@"{DebuggerDisplay,nq}")] | ||||
public abstract class SocketUser : SocketEntity<ulong>, IUser | public abstract class SocketUser : SocketEntity<ulong>, IUser | ||||
{ | { | ||||
private readonly bool _useBidirectionalUnicode; | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
public abstract bool IsBot { get; internal set; } | public abstract bool IsBot { get; internal set; } | ||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
@@ -57,7 +56,6 @@ namespace Discord.WebSocket | |||||
internal SocketUser(DiscordSocketClient discord, ulong id) | internal SocketUser(DiscordSocketClient discord, ulong id) | ||||
: base(discord, id) | : base(discord, id) | ||||
{ | { | ||||
_useBidirectionalUnicode = discord.FormatUsersInBidirectionalUnicode; | |||||
} | } | ||||
internal virtual bool Update(ClientState state, Model model) | internal virtual bool Update(ClientState state, Model model) | ||||
{ | { | ||||
@@ -119,8 +117,8 @@ namespace Discord.WebSocket | |||||
/// <returns> | /// <returns> | ||||
/// The full name of the user. | /// The full name of the user. | ||||
/// </returns> | /// </returns> | ||||
public override string ToString() => Format.UsernameAndDiscriminator(this, _useBidirectionalUnicode); | |||||
private string DebuggerDisplay => $"{Format.UsernameAndDiscriminator(this, _useBidirectionalUnicode)} ({Id}{(IsBot ? ", Bot" : "")})"; | |||||
public override string ToString() => Format.UsernameAndDiscriminator(this, Discord.FormatUsersInBidirectionalUnicode); | |||||
private string DebuggerDisplay => $"{Format.UsernameAndDiscriminator(this, Discord.FormatUsersInBidirectionalUnicode)} ({Id}{(IsBot ? ", Bot" : "")})"; | |||||
internal SocketUser Clone() => MemberwiseClone() as SocketUser; | internal SocketUser Clone() => MemberwiseClone() as SocketUser; | ||||
} | } | ||||
} | } |