Skip to content

Commit

Permalink
feat: add support for voice sortables
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranet committed Jul 9, 2023
1 parent 70dab72 commit 8742f2a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/discord.js/src/util/Util.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ function makePlainError(err) {
}

const TextSortableGroupTypes = [ChannelType.GuildText, ChannelType.GuildAnnouncement, ChannelType.GuildForum];
const VoiceSortableGroupTypes = [ChannelType.GuildVoice, ChannelType.GuildStageVoice];
const CategorySortableGroupTypes = [ChannelType.GuildCategory];

/**
Expand All @@ -181,7 +182,9 @@ function getSortableGroupTypes(type) {
case ChannelType.GuildAnnouncement:
case ChannelType.GuildForum:
return TextSortableGroupTypes;
// TODO(kyranet): Add GuildVoice and GuildStageVoice in a follow-up PR
case ChannelType.GuildVoice:
case ChannelType.GuildStageVoice:
return VoiceSortableGroupTypes;
case ChannelType.GuildCategory:
return CategorySortableGroupTypes;
default:
Expand Down

0 comments on commit 8742f2a

Please sign in to comment.