When should I use curly braces and when not for variables?

Md Shahriyar Alam

4 days 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?

When to use?

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

pyHello {user.mention}!

When not to use?

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

pyadd_roles(user, 3904234823402349234)

Need help?

If you still need any kind of help, have a suggestion for us or having a question in mind? Feel free to reach us out.

Join support server
logoCustom Commands

#1 Custom commands discord bot available on the internet

We Accept

stripe

Contact

20-22 Wenlock RoadEnglandN1 7GU

© WEiRDSOFT LTD. All rights reserved.