#Cannot Get Guild Owner in the on_guild_create event
1 messages · Page 1 of 1 (latest)
How do I get the ownerID? the .id and .user.id properties are not appearing as valid on either of the fetch_* or get_* methods
fetch_owner().id
print(event.guild.fetch_owner().id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'coroutine' object has no attribute 'id'
get_owner().user.id
print(event.guild.get_owner().user.id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'user'
get_owner().id
print(event.guild.get_owner().id)
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'id'
in this case your owner user isnt cached, so try
await event.guild.fetch_owner()
await event.guild.fetch_owner()
nvm
fetch_owner is a coroutine, you need to await it
np
is there any way to get the owner ID without using await?
its private, but if you really cant await it guild._owner_id
but im curious, why cant you await it?