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

Question: Send PartyInvitation on IncomingPendingFriend #175

Closed
kaaax0815 opened this issue Aug 2, 2020 · 1 comment
Closed

Question: Send PartyInvitation on IncomingPendingFriend #175

kaaax0815 opened this issue Aug 2, 2020 · 1 comment

Comments

@kaaax0815
Copy link

kaaax0815 commented Aug 2, 2020

Sorry that this is not an issue, but im curious tho.

I cant find any API for sending an invitation in the fortnitepy docs

So I ask you how to send and PartyInvitation on an IncomingPendingFriend

Edit:

fortnite.py.Friend invite() is the right thing

New Problem:

How do I set the name to IncomingPendingFriend.display_name

Edit2:

Code: await fortnitepy.Friend.invite( display_name=request.display_name )

Error: Task exception was never retrieved future: <Task finished coro=<event_friend_request() done, defined at fortnite.py:257> exception=TypeError("invite() got an unexpected keyword argument 'display_name'")> Traceback (most recent call last): File "fortnite.py", line 264, in event_friend_request display_name=request.display_name TypeError: invite() got an unexpected keyword argument 'display_name'

It says that display_name is unexpected, but how else should i define the receiver

@xMistt
Copy link
Owner

xMistt commented Aug 8, 2020

You need to get an instance of the friend object, if you accept a pending friend request, the method itself returns the newly created Friend object so you can do:

friend = await pending.accept()
await friend.invite()

Hope this helps!

@xMistt xMistt closed this as completed Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants