[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

@@ -47,7 +47,7 @@ namespace Discord
}
/// <summary>
/// Tests the behavior of the <see cref="Discord.ChannelPermissions"/> constructor for each
/// Tests the behavior of the <see cref="ChannelPermissions"/> constructor for each
/// of it's flags.
/// </summary>
[Fact]
@@ -96,10 +96,11 @@ namespace Discord
AssertFlag(() => new ChannelPermissions(useClydeAI: true), ChannelPermission.UseClydeAI);
AssertFlag(() => new ChannelPermissions(setVoiceChannelStatus: true), ChannelPermission.SetVoiceChannelStatus);
AssertFlag(() => new ChannelPermissions(sendPolls: true), ChannelPermission.SendPolls);
AssertFlag(() => new ChannelPermissions(useExternalApps: true), ChannelPermission.UseExternalApps);
}
/// <summary>
/// Tests the behavior of <see cref="Discord.ChannelPermissions.Modify"/>
/// Tests the behavior of <see cref="ChannelPermissions.Modify"/>
/// with each of the parameters.
/// </summary>
[Fact]
@@ -164,6 +165,7 @@ namespace Discord
AssertUtil(ChannelPermission.UseClydeAI, x => x.UseClydeAI, (p, enable) => p.Modify(useClydeAI: enable));
AssertUtil(ChannelPermission.SetVoiceChannelStatus, x => x.SetVoiceChannelStatus, (p, enable) => p.Modify(setVoiceChannelStatus: enable));
AssertUtil(ChannelPermission.SendPolls, x => x.SendPolls, (p, enable) => p.Modify(sendPolls: enable));
AssertUtil(ChannelPermission.UseExternalApps, x => x.UserExternalApps, (p, enable) => p.Modify(useExternalApps: enable));
}
/// <summary>