Class MessageCommandBuilder
A class used to build Message commands.
Assembly: Discord.Net.Core.dll​
View Source​
Declaration
public class MessageCommandBuilder
Properties​
Name​
Gets or sets the name of this Message command.
View Source​
Declaration
public string Name { get; set; }
IsDefaultPermission​
Gets or sets whether the command is enabled by default when the app is added to a guild
View Source​
Declaration
public bool IsDefaultPermission { get; set; }
Fields​
MaxNameLength​
Returns the maximum length a commands name allowed by Discord
View Source​
Declaration
public const int MaxNameLength = 32
Methods​
Build()​
Build the current builder into a Discord.MessageCommandProperties class.
View Source​
Declaration
public MessageCommandProperties Build()
Returns​
Discord.MessageCommandProperties: A Discord.MessageCommandProperties that can be used to create message commands.
WithName(String)​
Sets the field name.
View Source​
Declaration
public MessageCommandBuilder WithName(string name)
Returns​
Discord.MessageCommandBuilder: The current builder.
Parameters​
Type | Name | Description |
---|---|---|
System.String | name | The value to set the field name to. |
WithDefaultPermission(Boolean)​
Sets the default permission of the current command.
View Source​
Declaration
public MessageCommandBuilder WithDefaultPermission(bool isDefaultPermission)
Returns​
Discord.MessageCommandBuilder: The current builder.
Parameters​
Type | Name | Description |
---|---|---|
System.Boolean | isDefaultPermission | The default permission value to set. |