Class RestBan
Represents a REST-based ban object.
Inheritance
System.Object
RestBan
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Discord.Rest
Assembly: Discord.Net.Rest.dll
Syntax
public class RestBan : IBan
Properties
| Improve this Doc View SourceReason
Gets the reason why the user is banned if specified.
Declaration
public string Reason { get; }
Property Value
| Type | Description |
|---|---|
| System.String | A string containing the reason behind the ban; |
User
Gets the banned user.
Declaration
public RestUser User { get; }
Property Value
| Type | Description |
|---|---|
| RestUser | A generic RestUser object that was banned. |
Methods
| Improve this Doc View SourceToString()
Gets the name of the banned user.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | A string containing the name of the user that was banned. |
Overrides
System.Object.ToString()
Explicit Interface Implementations
| Improve this Doc View SourceIBan.User
Gets the banned user.
Declaration
IUser IBan.User { get; }
Returns
| Type | Description |
|---|---|
| IUser | A user that was banned. |