Skip to content

Commit 78455ea

Browse files
committed
Add handling for parent channel being null
- Not certain if this is strictly required, but probably a good idea to have in case it is
1 parent 2c1bfe9 commit 78455ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Modix.Bot/Responders/StarboardReactionResponder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private async Task HandleReactionAsync(Cacheable<IUserMessage, ulong> cachedMess
4343
var isIgnoredFromStarboard = await designatedChannelService
4444
.ChannelHasDesignation(channel.Guild.Id, channel.Id, DesignatedChannelType.IgnoredFromStarboard, default);
4545

46-
var isParentIgnoredFromStarboard = channel is SocketThreadChannel threadChannel && await designatedChannelService
46+
var isParentIgnoredFromStarboard = channel is SocketThreadChannel { ParentChannel: not null } threadChannel && await designatedChannelService
4747
.ChannelHasDesignation(channel.Guild.Id, threadChannel.ParentChannel.Id, DesignatedChannelType.IgnoredFromStarboard, default);
4848

4949
var starboardExists = await designatedChannelService

0 commit comments

Comments
 (0)