$replaceText
If the content in the 1st field matches the content in the 2nd field, the function will return the content in the 3rd field. Otherwise, the function will return the content in the 1st field.

FUNCTION USAGE

    $replaceText[content;matches;new]

Properties:

content - The content that the function will look at when matching with the 2nd field. matches - The content that matches the 1st field. new - The new content that will be replaced with the content in the first field. Now accepts {execute:} in this field!
1
bot.JoinedCommand({
2
name:`$getServerVar[welcome]`,
3
code:`
4
$title[Welcome]
5
$description[$replaceText[$replaceText[$getServerVar[wmessage];{user};<@$authorID>];{membersCount};$membersCount]]
6
$footer[GreenBot | gb!help | gb!invite ]
7
$color[1043ce]
8
$thumbnail[$authorAvatar]
9
`
10
});
11
bot.onJoined()
12
13
bot.LeaveCommand({
14
name:`$getServerVar[goodbye]`,
15
code:`
16
$title[Goodbye]
17
$description[$replaceText[$replaceText[$getServerVar[gmessage];{user};<@$authorID>];{membersCount};$membersCount]]
18
$footer[GreenBot | gb!help | gb!invite ]
19
$color[1043ce]
20
$thumbnail[$userAvatar[$authorID]]
21
`
22
});
23
bot.onLeave()
24
Copied!
Last modified 3mo ago
Copy link
Contents
Properties: