$splitContent
Splits the content in the `content` field with the content in the `splitter` field. The content in the `actual` field will be splitted at every `arg` field.

FUNCTION USAGE

  • $splitContent[content;arg;actual;splitter]

Properties:

content - The content to be splitted. arg - The number of times to split. Must be a number. actual - The actual content to split. splitter - Replaces to this from the content in the 3rd field.

Example:

1
bot.Command({
2
name: "test",
3
code: `
4
$splitContent[<@&$getServerVar[role]>;1;<@&None>;Role is not set]
5
`
6
})
Copied!
It's kind of like $replaceText, but with different characteristics

Now imagine you have a variable with the name role and the value is None .

1- Using the code above given in the code block and looking at the all images, we can see that if the content in the 1st field <@&$getServerVar[role]> ,

2- matches the content in the 3rd field <@&None> ,

3- it will return the value in the 4th field Role is not set.

However, if the value is a roleID, we should get the mentioned version of the role instead -as per the given code

This function is more on the advanced side. Don't be upset if you don't understand right away. Play with it and if there's anything we may have missed or gotten wrong about this function, please report it to Speshul#5441 If anymore is found, it will be documented
Give much thanks to these 3 members of our community with assisting in finding the right description for this diverse function. - Dejvy#0591 - kaiツ#0214 - Megill#6850 With thier help as a team, we were able to figure out how this function works. Thank you guys!
Last modified 4mo ago
Copy link
Contents
Properties: