WoW API: AcceptGroup
Jump to navigation
Jump to search
← WoW API < AcceptGroup
Accept the invitation to party.
AcceptGroup();
Arguments
none
Returns
none
Triggers Events
unknown
Example
self:RegisterEvent("PARTY_INVITE_REQUEST", "confirmPartyInvite") function MyAddon:confirmPartyInvite(info, sender) local inviteAccepted = false; if ( MyAddon:someTestOfSenderThatYouMakeUp(sender) ) then AcceptGroup(); inviteAccepted = true; end if ( inviteAccepted ) then StaticPopup_Hide("PARTY_INVITE"); end end
Result
Assuming that whatever code was in MyAddon:someTestOfSenderThatYouMakeUp(sender) returned a true value, You accept the group invite and the dialog box gets closed afterward
Details
You can use this after recieving the PARTY_INVITE_REQUEST event. If there is no invitation to a party, this function doesn't do anything.
Note that calling this function does NOT cause the "accept/decline dialog" to go away. Use StaticPopup_Hide("PARTY_INVITE") to hide the dialog.
As of 3.1 calling StaticPopup_Hide("PARTY_INVITE") too quickly after AcceptGroup() appears to interfere with the actual accepting.