WoW:API DeleteInboxItem: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(initial documentation for DeleteInboxItem)
 
m (Move page script moved page API DeleteInboxItem to API DeleteInboxItem without leaving a redirect)
 
(No difference)

Latest revision as of 04:45, 15 August 2023

WoW API < DeleteInboxItem

Remove a message from the mailbox.

DeleteInboxItem(index)

Parameters[edit]

Arguments[edit]

index
Number - the index of the message (1 is the first message)

Returns[edit]

No return value.

Notes[edit]

DeleteInboxItem is a function that asynchronously requests the server to remove a message from the mailbox. It returns immediately, with confirmation coming via a MAIL_INBOX_UPDATE event. This request can fail. Besides the obvious case of the index not referring to a valid message number, it can fail if another DeleteInboxItem action is already in progress, and perhaps in other cases.

DeleteInboxItem is an unconditional request; the server does not check whether the message still has an item or money attached. The confirmation box that appears in game for these conditions is triggered by InboxItemCanDelete, before calling DeleteInboxItem. Note that InboxItemCanDelete is not a permission-checking function, it is just an API for determining whether a message is returnable (and thus has a misleading name). All messages are deletable.