Hello Lapper users.
I've been working on a new discord feature for LFSLapper.
Feature is been called Discord Embed. You can create multiple messages within a single messagebox.
EDIT: New betaversion: (Only.exe)
This contains some fixes when some variables are empty.
Download the LFSLapper directory from the first post and grab the .exe from this post.
Check for the variables and function below:
Code Example of the Attached Image.
I've been working on a new discord feature for LFSLapper.
Feature is been called Discord Embed. You can create multiple messages within a single messagebox.
EDIT: New betaversion: (Only.exe)
This contains some fixes when some variables are empty.
Download the LFSLapper directory from the first post and grab the .exe from this post.
+---------------------------------------------------------------+
|Changes from 7.0.7.0 to 7.0.7.1 Beta #1 |
+---------------------------------------------------------------+
- A Discordbot must be created to communicate between LFSLapper and Discord.
- In 'bin/default/includes/myInc.LPR' you can enter the 'DiscordToken' and the 'Discordchannel' to receive the messages from.
- Link to create a discordbot: https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token
- Set DeveloperMode in your discordsettings to "ON' to copy the channel ID ( rightclick on the channel)
=================================================
New:
=================================================
1: New function: SendDiscordEmbed(); #Create and send Discord Embed
=================================================
Fix:
=================================================
1: Couldn't use '\n' in discord messages
Check for the variables and function below:
<?php
#DiscordChannel to receive this embed.
$Channel = "";
#Set Title/Description and color of the discord embed
$Title = "Embed Title";
$Desc = "Embed Description";
#Prefix must contain '0x' Followed by 6 chars 0-9 and A-F
$Color = "0xFF0000"; #RED
#Field Values
## Use %nf% to create a new field. (Add %nf% to $FieldValue and $FieldInline aswell) ##
$FieldTitle = "Field_01 Title"; #Title of the Field
$FieldValue = "Field_01 Value"; #Value of the Field
$FieldInline = "True"; #Use 'True' or 'False' to set Inline Fields.
#Use %nf% to add a footer image URL !! Not an local(pc) image.
$Footer = "LFSLapper Footer: ".GetLapperVar("ShortTime");
#Small Image URL on the right side of the Embed box.
$ThumbnailUrl = "";
#The Entire EmbedBox will fit to the same size as the ImageUrl.
$ImageUrl = "";
#Function to send Discord Embed
SendDiscordEmbed($Channel,$Title,$Desc,$Color,$FieldTitle,$FieldValue,$FieldInline,$Footer,$ThumbnailUrl,$ImageUrl);
?>
<?php
CASE "!embed":
#DiscordChannel to receive this embed.
$Channel = "";
#Set Title/Description and color of the discord embed
$Title = "LFSLapper Embed Title";
$Desc = "Embed Description";
#Prefix must contain '0x' Followed by 6 chars 0-9 and A-F
$Color = "0xFF0000"; #RED
#Field Values
## Use %nf% to create a new field. (Add %nf% to $FieldValue and $FieldInline aswell) ##
$FieldTitle =
"Field_01 Title"
."%nf%Field_02 Title"
."%nf%Field_03 Title"
."%nf%Field_04 Title";
$FieldValue =
"*Field_01 Value*\n*Field_01 Value*"
."%nf%Field_02 Value"
."%nf%```New BlockLine_01\nNew BlockLine_02\nNew BlockLine_03\nNew BlockLine_04\nNew BlockLine_05\nNew BlockLine_06\nNew BlockLine_07```"
."%nf%**Field_04 Value**\n**Field_04 Value**\n**Field_04 Value**\n**Field_04 Value**";
$FieldInline = "True%nf%True%nf%False%nf%False";
#Use %nf% to add a footer image URL !! Not an local(pc) image.
$Footer = "LFSLapper Footer: ".GetLapperVar("ShortTime")." %nf% https://velocitymsports.com/home/vmlogo.png ";
#Small Image URL on the right side of the Embed box.
$ThumbnailUrl = "https://velocitymsports.com/home/vmlogo.png";
#The Entire EmbedBox will fit to the same size as the ImageUrl.
$ImageUrl = "";
#Function to send Discord Embed
SendDiscordEmbed($Channel,$Title,$Desc,$Color,$FieldTitle,$FieldValue,$FieldInline,$Footer,$ThumbnailUrl,$ImageUrl);
BREAK;
?>