Skip to content

Commit 1917961

Browse files
authored
Fix Channel Types Attribute (#2066)
* fix channeltypes attribute * fix channeltypes attribute
1 parent 37ada59 commit 1917961

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Discord.Net.Interactions/TypeConverters/DefaultEntityTypeConverter.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ _ when typeof(ITextChannel).IsAssignableFrom(type)
7272

7373
public override void Write (ApplicationCommandOptionProperties properties, IParameterInfo parameter)
7474
{
75-
properties.ChannelTypes = _channelTypes;
75+
if (_channelTypes is not null)
76+
properties.ChannelTypes = _channelTypes;
7677
}
7778
}
7879

0 commit comments

Comments
 (0)