Skip to content

Commit

Permalink
Add missing DefaultPermissions and GuildOnly values from attribute fo…
Browse files Browse the repository at this point in the history
…r SlashCommandGroups (#7)
  • Loading branch information
Takato65 authored Jun 24, 2022
1 parent 1448381 commit c686d72
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions DSharpPlus.SlashCommands/SlashCommandsExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ public void RegisterCommands(Type module, ulong? guildId = null)

ApplicationCommandBuilder command = new ApplicationCommandBuilder(ApplicationCommandType.SlashCommand)
.WithName(gAttr.Name)
.WithDescription(gAttr.Description);
.WithDescription(gAttr.Description)
.WithDefaultPermissions(gAttr.DefaultPermissions)
.WithGuildOnly(gAttr.GuildOnly);

if (gAttr.ApplyLocalization)
{
Expand Down Expand Up @@ -177,7 +179,9 @@ public void RegisterCommands(Type module, ulong? guildId = null)
ApplicationCommandBuilder command =
new ApplicationCommandBuilder(ApplicationCommandType.SlashCommand)
.WithName(gAttr.Name)
.WithDescription(gAttr.Description);
.WithDescription(gAttr.Description)
.WithDefaultPermissions(gAttr.DefaultPermissions)
.WithGuildOnly(gAttr.GuildOnly);

if (gAttr.ApplyLocalization)
{
Expand Down

0 comments on commit c686d72

Please sign in to comment.