Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

Commit 740dd60

Browse files
author
jonas747
committed
added convience function for checking if a channel is a thread
1 parent 3e834a4 commit 740dd60

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

structs.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ const (
172172
ChannelTypeGuildStageVoice ChannelType = 13 // a voice channel for hosting events with an audience
173173
)
174174

175+
func (t ChannelType) IsThread() bool {
176+
return t == ChannelTypeGuildPrivateThread || t == ChannelTypeGuildPublicThread
177+
}
178+
175179
// A Channel holds all data related to an individual Discord channel.
176180
type Channel struct {
177181
// The ID of the channel.

0 commit comments

Comments
 (0)