Class GuildChannelProperties
Properties that are used to modify an IGuildChannel with the specified changes.
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public class GuildChannelProperties : object
Examples
The following example uses ModifyAsync to apply changes specified in the properties,
var channel = _client.GetChannel(id) as IGuildChannel;
if (channel == null) return;
await channel.ModifyAsync(x =>
{
x.Name = "new-name";
x.Position = channel.Position - 1;
});
Properties
| Improve this Doc View SourceCategoryId
Gets or sets the category ID for this channel.
Declaration
public Optional<ulong?> CategoryId { get; set; }
Property Value
Type | Description |
---|---|
Optional<Nullable<UInt64>> |
Remarks
Setting this value to a category's snowflake identifier will change or set this channel's parent to the specified channel; setting this value to null will detach this channel from its parent if one is set.
Flags
Gets or sets the flags of the channel.
Declaration
public Optional<ChannelFlags> Flags { get; set; }
Property Value
Type | Description |
---|---|
Optional<ChannelFlags> |
Name
Gets or sets the channel to this name.
Declaration
public Optional<string> Name { get; set; }
Property Value
Type | Description |
---|---|
Optional<String> |
Remarks
This property defines the new name for this channel.
warning
When modifying an ITextChannel, the Name must be alphanumeric with
dashes. It must match the RegEx [a-z0-9-_]{2,100}
.
PermissionOverwrites
Gets or sets the permission overwrites for this channel.
Declaration
public Optional<IEnumerable<Overwrite>> PermissionOverwrites { get; set; }
Property Value
Type | Description |
---|---|
Optional<IEnumerable<Overwrite>> |
Position
Moves the channel to the following position. This property is zero-based.
Declaration
public Optional<int> Position { get; set; }
Property Value
Type | Description |
---|---|
Optional<Int32> |