Send Text

Send a Message

Sends a text message to given chat

Parameters

Description

receiverNumber

Receiver number (e.g, [code country][number] 6283838204803)

message

Message that you will send

function message(String $message, String $receiverNumber)

Example

\Ardzz\Wavel\Wavel::text()->message('This message was sent from Wavel', 6283838204803);

Send a Message With Mention

Sends a text message to given chat that includes mentions. In order to use this method correctly you will need to send the text like this: "@4474747474747 how are you?" Basically, add a @ symbol before the number of the contact you want to mention.

Parameters

Description

receiverNumber

Receiver number (e.g, [code country][number] 6283838204803)

message

Message that you will send

function messageWithMention(String $message, String $receiverNumber)

Example

\Ardzz\Wavel\Wavel::text()->messageWithMention('Hi @6283838204803, This message was sent from Wavel', 6283838204803);

Automatically sends a youtube link with the auto generated link preview. You can also add a custom message.

Parameters

Description

receiverNumber

Receiver number (e.g, [code country][number] 6283838204803)

message

Message that you will send

youtubeLink

URL string A youtube link

function youtubeLink(String $message, String $receiverNumber, String $youtubeLink)

Example

\Ardzz\Wavel\Wavel::text()->youtubeLink('Check this video!', '6283838204803', 'https://www.youtube.com/watch?v=K09_5IsgGe8')

Reply Message

Sends a reply to a given message. Please note, you need to have at least sent one normal message to a contact in order for this to work properly.

Parameters

Description

receiverNumber

Receiver number (e.g, [code country][number] 6283838204803)

message

Message that you will send

messageId

The id of a message. The format is [boolean]_[ChatId]_[random character string]

Example:

"false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB"

sendSeen

sendSeen boolean If set to true, the chat will 'blue tick' all messages before sending the reply

function reply(String $message, String $receiverNumber, String $messageId, bool $sendSeen = false)

Example

\Ardzz\Wavel\Wavel::text()->reply('okay!', '6283838204803', 'false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB')

Automatically sends a link with the auto generated link preview. You can also add a custom message.

Parameters

Description

receiverNumber

Receiver number (e.g, [code country][number] 6283838204803)

message

Message that you will send

link

URL string a link

function link(String $message, String|Int $receiverNumber, String $link, bool $isGroup = false)

Example

\Ardzz\Wavel\Wavel::text()->link(
        'Wavel is powerful!',
        '6283838204803',
        'https://github.com/ardzz/wavel'
    );

Last updated

Was this helpful?