If you are confused about when you should use curly braces for variables, read more...
Md Shahriyar Alam
2 years ago
There are multiple places we use variables, In Content, Embed, Pre Code and Post Code. But when should we use curly braces to make them work?
If you are using variables in Content or Embed then you have to use curly braces to make them work. Otherwise they will be treated as normal texts
Example
Hello {user.mention}!If you are using any variables in the Pre Code or Post Code you don't have to use any curly braces at all. In fact using them will cause errors.
Example
add_roles(user, 3904234823402349234)Loading comments…
Have a question, a suggestion, or stuck on something? Reach out — we're happy to help.