callback_DiscordMessageReceived()

Description

This async function is called when a message is sent in a Discord Server you have integrated with Rocket Networking. Edit this function to change its functionality.

Syntax

callback_DiscordMessageReceived(channelId , authorStruct , messageBody)

Author Struct Example

{
  "bot": 0,
  "system": 0,
  "flags": 0,
  "username": "lilshake21",
  "globalName": "lilshake",
  "discriminator": "0",
  "avatar": "330e1da8c68f4b84e902b369b7bb482a",
  "avatarDecoration": null,
  "createdTimestamp": 1502806211501.00,
  "defaultAvatarURL": "https://cdn.discordapp.com/embed/avatars/5.png",
  "tag": "lilshake21",
  "avatarURL": "https://cdn.discordapp.com/avatars/347019145122152448/330e1da8c68f4b84e902b369b7bb482a.webp",
  "displayAvatarURL": "https://cdn.discordapp.com/avatars/347019145122152448/330e1da8c68f4b84e902b369b7bb482a.webp",
  "id": "347019145122152448"
}

Returns

N/A

Example Implementation

function callback_DiscordMessageReceived(channelId , authorStruct , messageBody){
	show_message("Received a message "+messageBody+" from author")
	show_message(authorStruct)

}

Last updated