[Feature] Add team member Role property (#2965)

This commit is contained in:
Mihail Gribkov
2024-07-21 17:49:00 +03:00
committed by GitHub
parent 721e03bcce
commit 6e531a2344
5 changed files with 111 additions and 54 deletions

View File

@@ -1,25 +1,32 @@
namespace Discord
namespace Discord;
/// <summary>
/// Represents a Discord Team member.
/// </summary>
public interface ITeamMember
{
/// <summary>
/// Represents a Discord Team member.
/// Gets the membership state of this team member.
/// </summary>
public interface ITeamMember
{
/// <summary>
/// Gets the membership state of this team member.
/// </summary>
MembershipState MembershipState { get; }
/// <summary>
/// Gets the permissions of this team member.
/// </summary>
string[] Permissions { get; }
/// <summary>
/// Gets the team unique identifier for this team member.
/// </summary>
ulong TeamId { get; }
/// <summary>
/// Gets the Discord user of this team member.
/// </summary>
IUser User { get; }
}
MembershipState MembershipState { get; }
/// <summary>
/// Gets the permissions of this team member.
/// </summary>
string[] Permissions { get; }
/// <summary>
/// Gets the team unique identifier for this team member.
/// </summary>
ulong TeamId { get; }
/// <summary>
/// Gets the Discord user of this team member.
/// </summary>
IUser User { get; }
/// <summary>
/// Gets the role of this team member.
/// </summary>
public TeamRole Role { get; }
}

View File

@@ -0,0 +1,27 @@
namespace Discord;
/// <summary>
/// Represents a Discord Team member role.
/// </summary>
public enum TeamRole
{
/// <summary>
/// The user is the owner of the team.
/// </summary>
Owner,
/// <summary>
/// The user is an admin in the team.
/// </summary>
Admin,
/// <summary>
/// The user is a developer in the team.
/// </summary>
Developer,
/// <summary>
/// The user is a read-only member of the team.
/// </summary>
ReadOnly,
}