Skip to content

set_permission_overrides not assigning permissions #127

Description

@aarti98

I am trying to configure a testing bot with dpytest. I want to create a bot which has permission to manage channels
Here is my code base:

@pytest_asyncio.fixture(params=BOT_FIXTURE)
async def bot(request) -> AsyncGenerator[Tuple[commands.Bot, str], None]:
    b = commands.Bot(
        command_prefix=settings.DISCORD_COMMAND_PREFIX,
        intents=intents,
        strip_after_prefix=True,
        help_command=None,
    )

    dpytest.configure(b)
    guild = dpytest.get_config().guilds[0]
    await dpytest.set_permission_overrides(
            target=guild.members[0], channel=guild.text_channels[0], manage_channels=True
    )
    
    # this statement returns false
    print('permissions?', guild.members[0].guild_permissions.manage_channels)

Can anyone help me what I am doing wrong?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions