Hello, my discord eval command works, but is there any way for me to change the message of the evaluation like it just sends the result of the eval. I would like to make a custom message that has the result of the eval in it. The attached images is how I want it. Here is my code.
Code:
discord command evaluate <text>:
aliases: eval
prefixes: spn!
trigger:
if event-member has permission view audit logs:
set {_code} to regex replace "^\s+" with "" in arg-1
if first 3 characters of {_code} is "```":
if last 3 characters of {_code} is "```":
if first 6 characters of {_code} is "```vbs": # VB.Net syntax highlighting support on code blocks
set {_code} to subtext of {_code} from character 7 to (length of {_code} - 3)
else:
set {_code} to subtext of {_code} from character 4 to (length of {_code} - 3)
else:
create embed:
set description of the embed to ":x: Invalid code block!"
set color of the embed to color from rgb 255, 0, 0
reply with the last created embed
stop
evaluate logging in {_errors::*}: {_code} #<----- this just sends the result, and I would like to make a custom message that has the result in it.
if {_errors::*} is set:
create embed:
set title of the embed to ":x: Evaluate Errors (%size of {_errors::*}%)"
add field named ":inbox_tray: Input" with value "```vbs%nl%%{_code}%%nl%```" to embed
add field named ":outbox_tray: Output" to embed
set the color of the embed to red
set the thumbnail of embed to "https://cdn.discordapp.com/attachments/523201265405263912/524492930170486784/SpnIcon3.png"
set footer of embed to footer with text "Supernatural" and icon "https://cdn.discordapp.com/attachments/523201265405263912/524483277931937802/SpnIcon.png"
set the author info of the embed to author named "Bot made by: XxItzMichael2xX" with no url and icon "https://cdn.discordapp.com/attachments/523201265405263912/524483277931937802/SpnIcon.png"
set the timestamp of embed to now
loop {_errors::*}:
set {_parse::*} to loop-value parsed as "%text% \(TuSKe\/evaluate.sk, line %integer%\: %text%'\)"
add field named "Line %{_parse::2}%:" with value "```vbs%nl%%{_parse::1}%%nl%> %{_parse::3}%%nl%```" to embed
reply with the last created embed