int aw_botgram_send (void)

DESCRIPTION

Sends a telegram to all bots using a specified citizen number.

CALLBACK

AW_CALLBACK_BOTGRAM_RESULT

NOTES

This method requires at least SDK build 37 and universe server build 51.

aw_botgram_send sends a telegram to all bots using the specified citizen number. The telegram is sent via the universe server and does not return an error if no targeted bots are found.

AW_BOTGRAM_TYPE is for special use and may only be set to 0.

EXAMPLE

/* Send a botgram to the bot owner */

void handle_botgram (void)
{
  printf ("Botgram From %s (#%d): %s\n",
    aw_string (AW_BOTGRAM_FROM_NAME),
    aw_int (AW_BOTGRAM_FROM),
    aw_string (AW_BOTGRAM_TEXT));
}

aw_event_set (AW_EVENT_BOTGRAM, handle_botgram);

aw_int_set (AW_BOTGRAM_TO, aw_int (AW_LOGIN_OWNER));
aw_string_set (AW_BOTGRAM_TEXT, "Hello");
if (rc = aw_botgram_send ())
  printf ("Unable to send botgram reason %d\n", rc);

SEE ALSO

AW_EVENT_BOTGRAM