Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PermitStreaming #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BLART/Commands/ChannelRenting/DenyCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ await RespondAsync(embed: await ErrorHandlingService.GetErrorEmbed(ErrorCodes.Pe
IVoiceChannel channel = Bot.Instance.Guild.GetVoiceChannel(ChannelRenting.RentedChannels[Context.User]);

foreach (IGuildUser user in guildUsers)
await channel.AddPermissionOverwriteAsync(user, new OverwritePermissions(connect: PermValue.Deny));
await channel.AddPermissionOverwriteAsync(user, new OverwritePermissions(connect: PermValue.Deny, stream: PermValue.Deny));

await RespondAsync("The mentioned users have been denied access to your channel.");
}
Expand Down
2 changes: 1 addition & 1 deletion BLART/Commands/ChannelRenting/PermitCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ await RespondAsync(embed: await ErrorHandlingService.GetErrorEmbed(ErrorCodes.Pe
IVoiceChannel channel = Bot.Instance.Guild.GetVoiceChannel(ChannelRenting.RentedChannels[Context.User]);

foreach (IGuildUser user in guildUsers)
await channel.AddPermissionOverwriteAsync(user, new OverwritePermissions(connect: PermValue.Allow));
await channel.AddPermissionOverwriteAsync(user, new OverwritePermissions(connect: PermValue.Allow, stream: PermValue.Allow));

await RespondAsync("The users mentioned have been permitted to connect to your channel.");
}
Expand Down
2 changes: 1 addition & 1 deletion BLART/Modules/ChannelRenting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private static async Task HandleJoined(SocketUser user, SocketVoiceState before,

await channel.AddPermissionOverwriteAsync(guild.EveryoneRole,
new OverwritePermissions(connect: PermValue.Deny));
await channel.AddPermissionOverwriteAsync(guildUser, new(connect: PermValue.Allow));
await channel.AddPermissionOverwriteAsync(guildUser, new(connect: PermValue.Allow, stream: PermValue.Allow));
var staffRole = guild.GetRole(Program.Config.DiscStaffId);
await channel.AddPermissionOverwriteAsync(staffRole, new OverwritePermissions(connect: PermValue.Allow, manageChannel: PermValue.Allow));

Expand Down