#guild/command_error questions
1 messages · Page 1 of 1 (latest)
await Guild.fetch_owner() according to docs
https://interactions-py.github.io/interactions.py/API Reference/API Reference/models/Discord/guild/#interactions.models.discord.guild.Guild.fetch_owner
You can set it up in guild settings->integrations
In code you can do something like this, not sure if it's best solution
if SOME_ROLE_ID in ctx.author.roles:
member.has_roles()
Not sure about the correct name of the function. But something like this
You can also use checks
Like @check(has_any_role(174918559539920897, 970018521511768094))
how is guild defined?
get_guild is only for cached Guilds.
Your requested guild is not cached yet.
Try fetch_guild. Caution, this is async and has to be placed into an async function
Easy way is to just move the definition of guild into on_startup and then change it to guild = await bot.fetch_guild(guild_id)