[Feature] Add UseExternalApps permission (#2941)
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user