Class RoleConnectionProperties
- Namespace
- Discord
- Assembly
- Discord.Net.Core.dll
Represents the properties used to modify user's RoleConnection.
public class RoleConnectionProperties
- Inheritance
-
RoleConnectionProperties
- Inherited Members
Constructors
RoleConnectionProperties()
Initializes a new instance of RoleConnectionProperties.
public RoleConnectionProperties()
RoleConnectionProperties(string, string, IDictionary<string, string>)
Initializes a new instance of RoleConnectionProperties.
public RoleConnectionProperties(string platformName, string platformUsername, IDictionary<string, string> metadata = null)
Parameters
platformName
stringThe name of the platform a bot has connected.
platformUsername
stringGets the username on the platform a bot has connected.
metadata
IDictionary<string, string>Object mapping RoleConnectionMetadata keys to their values.
Properties
Metadata
Gets or sets object mapping RoleConnectionMetadata keys to their string-ified values.
public Dictionary<string, string> Metadata { get; set; }
Property Value
PlatformName
Gets or sets the vanity name of the platform a bot has connected. Max 50 characters.
public string PlatformName { get; set; }
Property Value
PlatformUsername
Gets or sets the username on the platform a bot has connected. Max 100 characters.
public string PlatformUsername { get; set; }
Property Value
Methods
FromRoleConnection(RoleConnection)
Initializes a new RoleConnectionProperties with the data from provided RoleConnection.
public static RoleConnectionProperties FromRoleConnection(RoleConnection roleConnection)
Parameters
roleConnection
RoleConnection
Returns
WithBool(string, bool)
Adds a metadata record with the provided key and value.
public RoleConnectionProperties WithBool(string key, bool value)
Parameters
Returns
- RoleConnectionProperties
The current RoleConnectionProperties.
WithDate(string, DateTimeOffset)
Adds a metadata record with the provided key and value.
public RoleConnectionProperties WithDate(string key, DateTimeOffset value)
Parameters
key
stringvalue
DateTimeOffset
Returns
- RoleConnectionProperties
The current RoleConnectionProperties.
WithNumber(string, int)
Adds a metadata record with the provided key and value.
public RoleConnectionProperties WithNumber(string key, int value)
Parameters
Returns
- RoleConnectionProperties
The current RoleConnectionProperties.
WithNumber(string, long)
Adds a metadata record with the provided key and value.
public RoleConnectionProperties WithNumber(string key, long value)
Parameters
Returns
- RoleConnectionProperties
The current RoleConnectionProperties.
WithNumber(string, uint)
Adds a metadata record with the provided key and value.
public RoleConnectionProperties WithNumber(string key, uint value)
Parameters
Returns
- RoleConnectionProperties
The current RoleConnectionProperties.
WithNumber(string, ulong)
Adds a metadata record with the provided key and value.
public RoleConnectionProperties WithNumber(string key, ulong value)
Parameters
Returns
- RoleConnectionProperties
The current RoleConnectionProperties.