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

feat(guild): add fetch_role #1206

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

spifory
Copy link
Collaborator

@spifory spifory commented Sep 8, 2024

Summary

Tested with

from nextcord import Intents, Interaction, Role
from nextcord.ext.commands import Bot

bot = Bot(
    intents=Intents(guilds=True, message_content=True, messages=True),
    default_guild_ids=[...],
)

@bot.slash_command()
async def role(inter: Interaction, role: Role):
    assert inter.guild is not None
    fetched_role = await inter.guild.fetch_role(role.id)
    return await inter.send(repr(fetched_role))

bot.run(...)

image

This is a Code Change

  • I have tested my changes.
  • I have updated the documentation to reflect the changes.
  • I have run task pyright and fixed the relevant issues.

@spifory spifory added p: low Priority: low - not important to be worked on s: awaiting review Status: the issue or PR is awaiting reviews t: api coverage Type: api coverage - this adds code to cover the discord API 3.0 The issue/PR should go for the 3.0 release labels Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 The issue/PR should go for the 3.0 release p: low Priority: low - not important to be worked on s: awaiting review Status: the issue or PR is awaiting reviews t: api coverage Type: api coverage - this adds code to cover the discord API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant