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

[Bug]: Cannot change channel permissions without Administrator #2834

Open
3 tasks done
joker-119 opened this issue Jan 26, 2024 · 1 comment
Open
3 tasks done

[Bug]: Cannot change channel permissions without Administrator #2834

joker-119 opened this issue Jan 26, 2024 · 1 comment
Labels

Comments

@joker-119
Copy link

joker-119 commented Jan 26, 2024

Check The Docs

  • I double checked the docs and couldn't find any useful information.

Verify Issue Source

  • I verified the issue was caused by Discord.Net.

Check your intents

  • I double checked that I have the required intents.

Description

I'm unable to add a permission overwrite to a channel without giving the bot Administrator permissions.

I have all 3 Privileged gateway intents enabled.

The Voice -> Move Member permissions doesn't work.

I can give the bot every single permission on the server except admin, and it still does not work, but the moment I give it admin, it works perfectly.

Version

3.13.0

Working Version

No response

Logs

20:46:23 Gateway     A UserVoiceStateUpdated handler has thrown an unhandled exception.:
Discord.Net.HttpException: The server responded with error 50001: Missing Access
   at Discord.Net.Queue.RequestBucket.SendAsync(RestRequest request)
   at Discord.Net.Queue.RequestQueue.SendAsync(RestRequest request)
   at Discord.API.DiscordRestApiClient.SendInternalAsync(String method, String endpoint, RestRequest request)
   at Discord.Rest.RestGuildChannel.AddPermissionOverwriteAsync(IUser user, OverwritePermissions permissions, RequestOptions options)
   at Timbr.Modules.ChannelRenting.HandleJoined(SocketUser user, SocketVoiceState before, SocketVoiceState after) in /home/Joker/Projects/SilverCreek/Timbr/Timbr/Modules/ChannelRenting.cs:line 67
   at Timbr.Modules.ChannelRenting.OnVoiceStateChanged(SocketUser user, SocketVoiceState before, SocketVoiceState after) in /home/Joker/Projects/SilverCreek/Timbr/Timbr/Modules/ChannelRenting.cs:line 26
   at Discord.EventExtensions.InvokeAsync[T1,T2,T3](AsyncEvent`1 eventHandler, T1 arg1, T2 arg2, T3 arg3)
   at Discord.WebSocket.DiscordSocketClient.TimeoutWrap(String name, Func`1 action)

Sample

public void SubscribeEvents()
{
    Client.UserVoiceStateUpdated += ChannelRenting.OnVoiceStateChanged;
}

public void OnVoiceStateChanged(SocketUser user, SocketVoiceState before, SocketVoiceState after)
{
    if (after.VoiceChannel is not null)
        await after.VoiceChannel.AddPermissionOverwriteAsync((IGuildUser)user, new(connect: PermValue.Deny));
}

Packages

N/A

Environment

  • OS: Fedora Linux 39
  • Architecture: x64
  • SDK: .NET sdk 8.0.100
@joker-119 joker-119 added the bug label Jan 26, 2024
@MCausc78
Copy link

This isnt discordnet issue, read error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants