Advertisement
Asty_

Send a Conditional Embed | Carl-bot and TagScript

Aug 8th, 2022
1,017
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.32 KB | None | 0 0
  1. {"title":"Send an Embed Message conditionally (only when 1 or more conditions are met)","description":"`1)` Use the blank variable trick to **conditionally `blacklist` anyone using the command** not meeting a specific condition, while sending an optional error message:```css\n{=():}\n{{if(=={1}):blacklist(Your error message goes here.):{server(id)}}}\n``` `{server(id)}` here returns your server's ID, which is the same as the `@everyone` role ID in your server; effectively blacklisting *anyone* in your server from using it when the condition isn't met.\n\n`2)` Break the entire output (even text outside of the embed) by **conditionally calling text that is not a URL, into an image URL field.**```css\n{=(condImg):{if(=={1}):placeholder|a image url if you want any when the condition is truthy}}\n{c:echo {channel(id)} Error message here.}\n```Now you would call `{condImg}` (name if whatever you prefer), in the image URL field, and the echo command will send an error message for you.\n\n`3)`** Conditionally execute the `embed`/`cembed` command** using the blank variable trick:```css\n{=():}\n{=(error):Error message as plain text.}\n{{if(=={1}):error|c:embed #2f3136 Title|Description}}\n```If you instead want your error message to be an embed, make the content of your embed conditional instead of the entire command.","color":3092790}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement