[Feature] Add UseExternalApps permission (#2941)

This commit is contained in:
Mihail Gribkov
2024-06-10 23:57:31 +03:00
committed by GitHub
parent 51f59bf185
commit f7f29d5cc8
6 changed files with 44 additions and 16 deletions

View File

@@ -107,10 +107,11 @@ namespace Discord
AssertFlag(() => new GuildPermissions(createGuildExpressions: true), GuildPermission.CreateGuildExpressions);
AssertFlag(() => new GuildPermissions(setVoiceChannelStatus: true), GuildPermission.SetVoiceChannelStatus);
AssertFlag(() => new GuildPermissions(sendPolls: true), GuildPermission.SendPolls);
AssertFlag(() => new GuildPermissions(useExternalApps: true), GuildPermission.UseExternalApps);
}
/// <summary>
/// Tests the behavior of <see cref="Discord.GuildPermissions.Modify(bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?)"/>
/// Tests the behavior of <see cref="GuildPermissions.Modify"/>
/// with each of the parameters.
/// </summary>
[Fact]
@@ -192,6 +193,7 @@ namespace Discord
AssertUtil(GuildPermission.CreateGuildExpressions, x => x.CreateGuildExpressions, (p, enable) => p.Modify(createGuildExpressions: enable));
AssertUtil(GuildPermission.SetVoiceChannelStatus, x => x.SetVoiceChannelStatus, (p, enable) => p.Modify(setVoiceChannelStatus: enable));
AssertUtil(GuildPermission.SendPolls, x => x.SendPolls, (p, enable) => p.Modify(sendPolls: enable));
AssertUtil(GuildPermission.UseExternalApps, x => x.UserExternalApps, (p, enable) => p.Modify(useExternalApps: enable));
}
}
}