RaiseEvent(nameof(UserIsSpeaking), () => UserIsSpeaking(this, new MemberIsSpeakingEventArgs(member, channel, isSpeaking)));
}
private Member _currentUser;
private User _currentUser;
internal Members Members => _members;
private readonly Members _members;
/// <summary> Returns the user with the specified id, along with their server-specific data, or null if none was found. </summary>
public Member GetMember(Server server, string userId)
public User GetMember(Server server, string userId)
{
if (server == null) throw new ArgumentNullException(nameof(server));
if (userId == null) throw new ArgumentNullException(nameof(userId));
@@ -82,26 +82,26 @@ namespace Discord
}
/// <summary> Returns the user with the specified name and discriminator, along withtheir server-specific data, or null if they couldn't be found. </summary>
/// <remarks> Name formats supported: Name and @Name. Search is case-insensitive. </remarks>
public Member GetMember(Server server, string username, string discriminator)
public User GetMember(Server server, string username, string discriminator)
{
if (server == null) throw new ArgumentNullException(nameof(server));
if (username == null) throw new ArgumentNullException(nameof(username));
if (discriminator == null) throw new ArgumentNullException(nameof(discriminator));
CheckReady();
Member member = FindMembers(server, username, discriminator, true).FirstOrDefault();
User member = FindMembers(server, username, discriminator, true).FirstOrDefault();
return _members[member?.Id, server.Id];
}
/// <summary> Returns all users in with the specified server and name, along with their server-specific data. </summary>
/// <remarks> Name formats supported: Name and @Name. Search is case-insensitive.</remarks>
/// <summary> Gets or sets the time (in milliseconds) to wait when the message queue is empty before checking again. </summary>
public int MessageQueueInterval { get { return _messageQueueInterval; } set { SetValue(ref _messageQueueInterval, value); } }
private int _messageQueueInterval = 100;
/// <summary> Gets or sets the number of messages per channel that should be kept in cache. Setting this to zero disables the message cache entirely. </summary>
public int MessageCacheLength { get { return _messageCacheLength; } set { SetValue(ref _messageCacheLength, value); } }
private int _messageCacheLength = 100;
//Experimental Features
/// <summary> (Experimental) Enables the client to be simultaneously connected to multiple channels at once (Discord still limits you to one channel per server). </summary>
/// <summary> Returns a collection of all users with read access to this channel. </summary>
[JsonIgnore]
public IEnumerable<Member> Members => UserIds.Select(x => _client.Members[x, _serverId]);
private User[] _members;
private bool _areMembersStale;
/// <summary> Returns a collection of the ids of all messages the client has seen posted in this channel. This collection does not guarantee any ordering. </summary>
[JsonIgnore]
public IEnumerable<string> MessageIds => _messages.Select(x => x.Key);
/// <summary> Returns a collection of all messages the client has seen posted in this channel. This collection does not guarantee any ordering. </summary>
[JsonIgnore]
public IEnumerable<Message> Messages => _messages.Select(x => _client.Messages[x.Key]);
public IEnumerable<Message> Messages => _messages.Values;
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.