diff --git a/guide/Bot/botCount.md b/guide/Bot/botCount.md index 357bd44..b2c0cde 100644 --- a/guide/Bot/botCount.md +++ b/guide/Bot/botCount.md @@ -13,7 +13,7 @@ Returns the amount of bots in your server/guild! ::: danger Warning -This data comes from the cache, not the api, therefore it may not be precise unless all the guild members are cached (which only in tier 5). +This data comes from the cache, not the api, therefore it may not be precise unless all the guild members are cached (which is only in tier 5). ::: ##### Function Difficulty: diff --git a/guide/Bot/botOwnerID.md b/guide/Bot/botOwnerID.md index 8faa1fb..7684531 100644 --- a/guide/Bot/botOwnerID.md +++ b/guide/Bot/botOwnerID.md @@ -1,8 +1,8 @@ # $botOwnerID Returns the ID of the bot owner. -If the bot belongs to a team, it'll return multiple ID. -Optionally, and if there is more than one owner (team), you can input a separator. +If the bot belongs to a team, it'll return multiple IDs. +Optionally, if there is more than one owner (team) you can input a separator. ## Usage diff --git a/guide/Bot/ping.md b/guide/Bot/ping.md index 59e9251..3e98ecb 100644 --- a/guide/Bot/ping.md +++ b/guide/Bot/ping.md @@ -5,10 +5,10 @@ This function returns the bot's ping, it can be used to check if the bot is onli
- !!exec `$ping`ms + !!exec $ping ms - `20`ms + 20 ms diff --git a/guide/Bot/serverCount.md b/guide/Bot/serverCount.md index f3ec684..b7c696e 100644 --- a/guide/Bot/serverCount.md +++ b/guide/Bot/serverCount.md @@ -5,10 +5,10 @@ Returns the amount of servers the bot is in.
- !!exec I am in `$serverCount` servers. + !!exec I am in $serverCount servers. - I am in `15000` servers. + I am in 15000 servers. diff --git a/guide/Channel/vcAfter.md b/guide/Channel/vcAfter.md index ca6c1af..a9510e3 100644 --- a/guide/Channel/vcAfter.md +++ b/guide/Channel/vcAfter.md @@ -1,6 +1,6 @@ # $vcAfter -Returns the Voice channelID that the user switched to, **after**. +Returns the Voice channelID that the user switched to, **after** switching voice channels or joining a voice channel without being in one prior. ## Usage diff --git a/guide/Channel/vcBefore.md b/guide/Channel/vcBefore.md index 0c4ff7d..9a448b0 100644 --- a/guide/Channel/vcBefore.md +++ b/guide/Channel/vcBefore.md @@ -1,6 +1,6 @@ # $vcBefore -Returns the Voice channelID the user switched from. +Returns the Voice channelID the user switched from when switching voice channels or when a user leaves a voice channel. ## Usage diff --git a/guide/CodeReferences/ref.message_types.md b/guide/CodeReferences/ref.message_types.md new file mode 100644 index 0000000..ea9299d --- /dev/null +++ b/guide/CodeReferences/ref.message_types.md @@ -0,0 +1,42 @@ +# Message types +Use the `$messageType` function to return the type of the message. + +### Current message types: +``` +Default +Recipient Add +Recipient Remove +Call +Channel Name Change +Channel Icon Change +Channel Pinned Message +User Join +Guild Boost +Guild Boost Tier 1 +Guild Boost Tier 2 +Guild Boost Tier 3 +Channel Follow Add +Guild Discovery Disqualified +Guild Discovery Requalified +Guild Discovery Grace Period Initial Warning +Guild Discovery Grace Period Final Warning +Thread Created +Reply +Chat Input Command +Thread Starter Message +Guild Invite Reminder +Context Menu Command +Auto Moderation Action +Role Subscription Purchase +Interaction Premium Upsell +Stage Start +Stage End +Stage Speaker +Stage Topic +Guild Application Premium Subscription +Guild Incident Alert Mode Enabled +Guild Incident Alert Mode Disabled +Guild Incident Report Raid +Guild Incident Report False Alarm +Purchase Notification +``` diff --git a/guide/Contribution_Info/main.md b/guide/Contribution_Info/main.md index 7baa1e7..bd69893 100644 --- a/guide/Contribution_Info/main.md +++ b/guide/Contribution_Info/main.md @@ -1,26 +1,26 @@ # Main Information ## Rules -Please follow the following rules: +Please follow the contribution rules: * Use the template for every function. Template can be found [here](./function_template.md) * Please use correct English sentences. Swearing is forbidden -* Make clear what you have changed when you make an pull request. Use an appropriate title & description -* Make sure you make docs on functions you know well. You should prevent, in any way possible, that wrong information is pushed. +* Make clear what you have changed when you make a pull request. Use an appropriate title & description +* Make sure you make docs on functions you know well. You should avoid, in any way possible, that wrong information is pushed. ### Editing existing or adding docs You can edit pages in our github repo. You can click the edit page button for existing page. #### Requirements * Github [account](https://github.com) - * Never used Github? Check this https://docs.github.com/en + * Never used Github? Check the github [docs](https://docs.github.com/en) * Basic knowledge of [markdown]( https://www.markdownguide.org/cheat-sheet/) Since the function doesn't exist,you have to create a file inside the specific folder in the [repo](https://github.com/raspdevpy/ccdoc/tree/main/guide) Example $botCount 0. Check in `undone.md` to be sure,that nobody else already documented the function. -1. Fork the [repo](https://github.com/raspdevpy/ccdoc/tree/ +1. Fork the [repo](https://github.com/raspdevpy/ccdoc/tree/) ![](https://i.ibb.co/2kPRCX0/image.png) 2. Create a file in bot folder with name `botCount.md` ![](https://i.ibb.co/BLCbs7q/image.png) @@ -30,8 +30,8 @@ Example $botCount ![](https://i.ibb.co/8XvCCdm/image.png) 5. go to undone.md and move the function to done ![](https://i.ibb.co/85PxQjM/image.png) -5. If you have done all your changes(add many function docs,not only 1 change), do a pull request,which we will review. +5. If you have done all your changes(add/change many function docs,not only 1), do a pull request,which we will review. ![](https://i.ibb.co/p3RCGYf/image.png) ![](https://i.ibb.co/R9fJz7g/image.png) -### For extra information, please contact a moderator/ developer in our discord server! \ No newline at end of file +### For extra information, please contact a moderator/developer in our discord server! diff --git a/guide/Date/formatDate.md b/guide/Date/formatDate.md index 65cdc46..f7c037e 100644 --- a/guide/Date/formatDate.md +++ b/guide/Date/formatDate.md @@ -1,5 +1,5 @@ # $formatDate -Formats the providen Date in Milliseconds / Stringed Date / ISO String to default/given format. syntax of formats can be found (here)[https://momentjs.com/docs/#/parsing/string-format/] +Formats the providen Date provided in Milliseconds/Stringed Date/ISO String to default/given format. Syntax of formats can be found [here](https://momentjs.com/docs/#/parsing/string-format/) #### Usage: `$formatDate[date in ms / string / iso string / javascript convertable date;format]` Example:
@@ -39,4 +39,4 @@ Date functions uses on default UTC timezone,but you can change it [Learn More](. ::: ##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Date/humanizeMS.md b/guide/Date/humanizeMS.md index aad0b6e..cf0f0bb 100644 --- a/guide/Date/humanizeMS.md +++ b/guide/Date/humanizeMS.md @@ -1,5 +1,5 @@ # $humanizeMS -Converts Milliseconds into a Readable durations +Converts milliseconds into human readable durations #### Usage: `$humanizeMS[MS;limit (Number) (optional), separator (optional)]` Example: @@ -13,9 +13,9 @@ Example: -::: tip Other Timezone -Date functions uses on default UTC timezone,but you can change it [Learn More](./timezone.md) +::: tip Other Timezones +Date functions by default use the UTC timezone,but you can change it [Learn More](./timezone.md) ::: ##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Date/memberJoinedDate.md b/guide/Date/memberJoinedDate.md index 76140b7..4885a9d 100644 --- a/guide/Date/memberJoinedDate.md +++ b/guide/Date/memberJoinedDate.md @@ -1,5 +1,5 @@ # $memberJoinedDate -returns the date the member Joined in date or time or from the current Author +Returns the date a member joined in date or time from the provided user/command executor. #### Usage: `$memberJoinedDate[userid;date/time(optional)]` or `$memberJoinedDate` Example:
@@ -17,4 +17,4 @@ Date functions uses on default UTC timezone,but you can change it [Learn More](. ::: ##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Date/timezone.md b/guide/Date/timezone.md index ccb6123..e64a2cc 100644 --- a/guide/Date/timezone.md +++ b/guide/Date/timezone.md @@ -1,6 +1,6 @@ # $timezone -this function set the timezone for all date functions -get tz name (here)[https://en.wikipedia.org/wiki/List_of_tz_database_time_zones] +This function sets the timezone for all date functions after the `$timezone` function itself.\ +Get valid timezone names from [this website](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) #### Usage: `$timezone[Region/City]` Example: diff --git a/guide/Events/eventDelete.md b/guide/Events/eventDelete.md index 3a006cb..7d6da56 100644 --- a/guide/Events/eventDelete.md +++ b/guide/Events/eventDelete.md @@ -1,7 +1,6 @@ # $eventDelete -to delete an already existed event - +To delete an existing event ## Usage ```bash diff --git a/guide/Guide/1.create.md b/guide/Guide/1.create.md index ba55986..fde7076 100644 --- a/guide/Guide/1.create.md +++ b/guide/Guide/1.create.md @@ -20,11 +20,11 @@ Before we start working on our command, we have to create one. > ![](https://i.imgur.com/VFsbL20.png) ::: tip Tour On your first visit you will be greeted with a dashboard tour! -We highly suggest NOT skipping through it... It will save you a lot of trouble in the future! +We highly suggest NOT skipping through it. It will save you a lot of trouble in the future! ::: ## Type -A very first part of every command is it's type, an action which will activate your command. +The very first part of every command is it's type, an action which will activate your command. It can be selected using this dropdown menu: > ![Type dropdown](https://cdn.discordapp.com/attachments/957286111250624552/1096882428422918164/image.png) @@ -50,8 +50,8 @@ You can proceed to a guide on specific trigger by clicking the green name of it. ::: ## Trigger -Command type is sometimes not enough to make your command working perfectly. -Sometimes you need the action to meet some conditions, for example: a message should be a certain `!ping` to activate your **ping** command. +Command type is sometimes not enough to make your command work perfectly. +Sometimes you need the action to meet some conditions, for example: a message should start with `!ping` to activate your **ping** command. This field can be specified using this input field: > ![trigger input](https://cdn.discordapp.com/attachments/957286111250624552/1096884667686326302/image.png) ::: tip @@ -61,7 +61,7 @@ The value expected greatly depends on the type of your command. We recommend che ## Code -Now as you know how to make a triggered, we can move on to the real **meat** of a custom command, the **code**. +Now as you know how to make a trigger, we can move on to the real **meat** of a custom command, the **code**. Code is simply what the bot will do upon triggering. It can be set using this field: > ![code editor](https://cdn.discordapp.com/attachments/957286111250624552/1096900826791944304/image.png) @@ -69,7 +69,7 @@ It can be set using this field: ### What should I put there? The simplest code is just a text which gets sent after triggering. But typing in a plain text is of course not all you can do with CC. -Inside the code field you can use various functions, which you can find under `Functions` tab in this documentation, or in docs built-in the dashboard. +Inside the code field you can use various functions, which you can find under the `Functions` tab in this documentation, or in docs built into the dashboard. ::: tip Examples You can find some examples of CC in action in the [Tutorials & Examples](../Tutorials/1.ping.md) tab. @@ -95,4 +95,4 @@ Here's a short explanation of all of them: You do not always have to code every single command by yourself. From the dashboard you get access to a great deal of templates, that can be effortlessly imported and setup easily. #### Want to learn more? -If you want to learn more about what templates are, and how to get them, please check the [template section](./4.template.md). \ No newline at end of file +If you want to learn more about what templates are, and how to get them, please check the [template section](./4.template.md). diff --git a/guide/Guide/2.faq.md b/guide/Guide/2.faq.md index 9341174..a3fce9b 100644 --- a/guide/Guide/2.faq.md +++ b/guide/Guide/2.faq.md @@ -1,35 +1,35 @@ # Frequently Asked Questions -## Why does the bot has such high cooldowns? +## Why does the bot have such high cooldowns? ::: details Answer Our bot is unique in it's sort. -But sadly we aren't quite big enough yet, to get our raidimits decreased! +But sadly we aren't quite big enough yet to get our rateimits decreased. Regarding to this, we sadly have to add cooldowns to functions and command executions. This to prevent a punishment from Discord Inc. ::: ## I don't see the "copy ID" option. Help! :::details Fix -Enable the developer mode on discord. This will give you all the required options! +Enable developer mode on discord. This will give you all the required options! https://media.discordapp.net/attachments/772051120368910371/882629065314566144/get_id.gif ::: -## Are there inbuild commands? Or do I have to code them all myself +## Are there inbuilt commands, or do I have to code them all myself? :::details Answer -You kind of need to... We only have some basic commands like `!!purge` & `!!ban` build in. +You kind of need to. We only have some basic commands like `!!purge` and `!!ban` built in. You can view them all by running `!!commands` in your server. -There are some commands that you can use to get a dashboard link and your total amount of votes. Read [me](../Guide/botInfo.md) to learn more +Other commands that you can use include getting a dashboard link or your total amount of votes. Read [me](../Guide/botInfo.md) to learn more ::: -## Why does my embed not sends correctly? +## Why does my embed not send correctly? ::: details Answer -It's probably because you have a hyperlink in it... +It's probably because you have a hyperlink in it. ![](https://media.discordapp.net/attachments/772051120368910371/883355096308654080/url_in_description_embed.gif) ::: -## How do I get an ID from a channel, user, message, thread or guild? +## How do I get an ID from a channel, user, message, thread or guild(server)? ::: details Answer ![](https://media.discordapp.net/attachments/772051120368910371/882629065314566144/get_id.gif) @@ -47,4 +47,4 @@ This is bugged in the web version of discord! You need to use the desktop client A variable is a place to store some data and get it back later. For example in another command! Check out the variable category, to see all types available! -::: \ No newline at end of file +::: diff --git a/guide/Guide/3.policy.md b/guide/Guide/3.policy.md index 0b0e0e6..4d2e9b5 100644 --- a/guide/Guide/3.policy.md +++ b/guide/Guide/3.policy.md @@ -1,59 +1,59 @@ -# Custom Command Bot's Privacy Policy -Get detailed information here about our, your rights and other information. +# Custom Command bot's Privacy Policy +Get detailed information here about our rights, your rights and other information. # Our Rights -* Children under 13 years are not allowed to use our service +* Children under 13 years are not allowed to use our service. -* Any type of Selfbotting or Misusage of our Bot is strictly prohibited +* Any type of selfbotting or misusage of our bot is strictly prohibited. -* Our Bot including Custom Bots can't be used to send/host Discussing Offensive/Controversial Material/Pirated content and NSFW Content. +* Our bot including Custom bots can't be used to send/host Discussing Offensive/Controversial Material/Pirated content and NSFW Content. * You are not allowed to break the Discord TOS or third-party TOS. -Not following our rules can lead to a ban and, in the worst case, a detailed report to Discord. For example, (Scam Servers). +Not following our rules can lead to a ban and, in the worst case, a detailed report to Discord. For example, Scam Servers. # User Rights * **Data Removal/Request**: You can contact us to have your data deleted or requested. - * (Server Owner)You can delete data yourself by deleting all Custom Commands and Variables. - * (User) + * Server Owner: You can delete data yourself by deleting all Custom Commands and Variables. + * User: You can leave the server or contact us to opt-out -* **Content Removal** The Bot and the website use third-party content like open source icons. As owner/maintainer, you have the right to request content removal. +* **Content Removal**: The bot and the website use third-party content like open source icons. As owner/maintainer, you have the right to request content removal. -* **Reports** Every user has the right to report a server that misuses our bot. +* **Reports**: Every user has the right to report a server that misuses our bot. # Data we collect * Server ID for identifying data and storing functional data (for example, commands count) -* Users work like commands content(code) -We don't store any private data like other bots. Generally, we only store IDs of servers that are functional for the Bot. +* User's work like command code +We don't store any private data like other bots. Generally, we only store IDs of servers that are functional for the bot. -* Variables setted by yourself on a command. You can leave the server to opt-out. +* Variables set by yourself on a command. You can leave the server to opt-out. # New: Message Content Intent Since the new approval of the discord message intent Useful information gets listed here. -* We don't log out/save any type of message. -If a user sends a message, a custom command with the specified trigger gets executed. So not every message triggers a custom command. In this way, your privacy stays protected.Moreover, we have cooldowns, where a command can only receive a message every 4s if the command has been triggered. With the command! !!view, you can view what type of commands the server uses. -* You can always **opt-out** from our bot by leaving the server, and your data will be deleted within 15 days or immediately(~ 1-2 day) (you must contact us for this). +* We don't log/save any type of message. +If a user sends a message, a custom command with the specified trigger gets executed. So not every message triggers a custom command. In this way, your privacy stays protected. Moreover, we have cooldowns, where a command can only receive a message every 4s if the command has been triggered. With the command `!!view`, you can view what commands the server uses. +* You can always **opt-out** from our bot by leaving the server, and your data will be deleted within 15 days or immediately(~ 1-2 days) (you must contact us for this). # Data Retention * We regularly do backups(every 10 days). Old backups get overwritten. -For more detailed information about what "User ID","Session Cookies" are, look [here pls.](https://ccommandbot.com/docs) (difficult to read due to lawyer English) +For more detailed information about what "User ID", "Session Cookies" are, look [here please.](https://ccommandbot.com/docs) (difficult to read due to lawyer English) # Encryption -All data is saved encrypted in our database. In this way, nobody can view the plain database (Example: on an exploit) without our salted token. +All data is saved and encrypted in our database. In this way, nobody can view the plain database (Example: on an exploit) without our salted token. # Contact Us -Generally,we recommend you contact us through our server to get a faster response. +Generally, we recommend you contact us through our server to get a faster response. * Email: [contact@ccommandbot.com](mailto:contact@ccommandbot.com) -* Server: [ccommandbot.com/join](http://ccommandbot.com/join) \ No newline at end of file +* Server: [ccommandbot.com/join](http://ccommandbot.com/join) diff --git a/guide/Guide/4.template.md b/guide/Guide/4.template.md index 0f72cdb..13d66e0 100644 --- a/guide/Guide/4.template.md +++ b/guide/Guide/4.template.md @@ -5,23 +5,23 @@ They can be effortlessly imported, and set up directly in the dashboard (no bot ## How to import a template? 1. Go to the custom commands tab -2. Click a yellow template button +2. Click the yellow template button(middle button) 3. Find a template you want to import -4. Select all commands of the template +4. Select all commands of the template(if multiple exist) ::: details Video 1 ![Guide part 1](/images/template/templates1.gif) ::: -1. Configure the command (not for all templates) -2. Wait for the template to import -3. Read usage instructions +5. Configure the command (not all the templates need to be configured) +6. Wait for the template to import +7. Read the usage instructions ::: details Video 2 ![Guide part 2](/images/template/templates2.gif) ::: -8. Template will be imported as custom command(s) +8. Template(s) will be imported as custom command(s) 9. You can edit them at any time ::: details Video 3 diff --git a/guide/Guide/5.comment.md b/guide/Guide/5.comment.md index 6a045ef..90bbd35 100644 --- a/guide/Guide/5.comment.md +++ b/guide/Guide/5.comment.md @@ -11,19 +11,18 @@ Comments come in handy in a few situations: With our syntax it's pretty easy to add comments: ``` -// Single Line Comment +// Single line comment -/* Multiple -Lines -Comments +/* Multi +Line +Comment */ ``` ## Single line Comment -The first comment type, is a single line one. -It can be achieved by placing to slashes on the beginning of the line: +A single line comment can be achieved by placing two forward slashes at the beginning of a line: ### Code -Let's create a code and describe it with a short comment +Let's code something and describe it with a short comment ```bash // this part sums 2 numbers $let[num1;5] @@ -42,8 +41,8 @@ Now it's time to check if the comment worked fine As you see the comment at line 1 didn't appear in the result ## Multiple Lines Comment -In some cases you may want to comment out more then one line, or just a specific part of it. -You can do that by wrapping the comment with a combination of slashes and asterisks `/* Comment */` +In some cases you may want to comment out more than one line or a specific part of it. +You can do that by wrapping the comment with a combination of slashes and asterisks: `/* Comment */` ### Code Let's extend our previous comment with some extra lines: @@ -71,5 +70,5 @@ Here's what the bot returns: As you can see it didn't add any extra content despite adding more lines. ::: tip Keystroke -When using the dashboard editor, you can hit `ctrl` + `/` to automatically comment out selected line(s) +When using the dashboard editor, you can hit `ctrl` + `/` to automatically comment out the selected line(s) ::: diff --git a/guide/Guide/6.variables.md b/guide/Guide/6.variables.md index 23115dd..16c4209 100644 --- a/guide/Guide/6.variables.md +++ b/guide/Guide/6.variables.md @@ -2,17 +2,16 @@ Variables are used to store data, Custom Command supports two main types of variables: temporary and permanent. ## Temporary -Temporary variables are usually deleted right after execution, can be accessed really easily, and are commonly used when editing the data. +Temporary variables are usually deleted right after execution, can be accessed really easily, and are commonly used when editing data. ### How to use them? * [$let](../Variables/let.md) - to define temporary variables -* [$get](../Variables/get.md) - to get value of temporary variable +* [$get](../Variables/get.md) - to get the value of temporary variables -Also temporary variables can be accessed by typing their name prefixed by a dollar sign. -For example: `$name` will return the value of `name` variable. +Temporary variables can also be accessed by typing their name prefixed by a dollar sign. +For example: `$name` will return the value of the `name` variable. ### Examples -Here are some examples of using temporary variables ## 1. Basic usage In this example we will save information about Bob, and send a text with all the info in it: @@ -36,7 +35,7 @@ Let's see what would be the output: -As you can see all variables have been replaced by their corresponding values. +As you can see all the variables have been replaced by their corresponding values. ## 2. Saving function output Variables do not always have to keep a fixed text or number, you may also include a function when defining a variable. @@ -50,8 +49,8 @@ Command we are going to work on will be report command used in the following way So we will use the following code: ```php /* Note: - $user would interfere with a default $user function. - We will have to use $get function. + $user would interfere with the default $user function. + We will have to use the $get function. */ $let[user;$message[1]] $let[reason;$message[2+]] @@ -74,15 +73,15 @@ You can see all the message parameters have been printed out successfully. ## Permanent -As the name suggests, permanent variables remain after executions. -In CC, permanent variable can be attached to one of a few discord components. +As the name suggests, permanent variables remain after execution. +In CC, permanent variables can be attached to one of a few discord components. * **Server** - one value for the whole server * **Channel** - one value for each channel * **User** - one value for every user * **Message** - one value for each message -### How to define one? +### How to define a permanent variable All functions used to define & access permanent variables follow the same naming convention: ```bash $[action][vartype]Var @@ -94,7 +93,7 @@ $setMessageVar ``` ### Examples -Here are some examples of putting permanent variables into reality +Here are some examples of implementing permanent variables: ::: tip Where is the data stored? Permanent variables are not stored within discord, they are kept in Custom Command's database. @@ -102,7 +101,7 @@ If you are concerned about privacy please refer to the [Privacy Policy](./3.poli ::: ## 1. Server -Let's define a server variable called `welcomeMsg` containing content of welcome message. +Let's define a server variable called `welcomeMsg` containing content of a welcome message. @@ -167,10 +166,10 @@ You can see that different channels received different values of the same `descr ## 3. User -Another type of permanent variables are **user** variables. -As the name suggests the same user variable can have varying values among users. +Another type of permanent variable is the **user** variable. +The same user variable can have varying values among different users, the same as channel variables. -This example will show user variables by creating an `!aboutMe` command that allows users to set their own descriptions. +This example will show user variables by creating an `!aboutMe` command that allows users to set their own description. ### `!aboutMe` command Let's start of by creating a command for setting a description @@ -185,7 +184,7 @@ $setUserVar[aboutMe;$message] Your about me has been set successfully ``` -Now two different members, Member, and Steve will set their descriptions: +Now two different members, Member and Steve, will set their descriptions: @@ -242,7 +241,7 @@ It's time to see if !profile command returns the correct descriptions ## 4. Message If you read the previous sections carefully, you should already get the idea of permanent variables. -Message variables work in the same way as other types do, but can be attached to a single message. +Message variables work in the same way as other types do, but are attached to a single message. Here we will make a nickname change request command, that will allow button handler to access requested nickname. @@ -288,8 +287,8 @@ Let's create a new command with **button** trigger. The code has to: -1. Grab **new nickname** and **requesting user** from message variables -2. Change the nicknamee +1. Grab the **new nickname** and **requesting user** from the message variables +2. Change the nickname 3. Notify user in the `#bots` channel 4. Disable the approve button @@ -322,5 +321,5 @@ That's because the default value of the third parameter is `$messageID` which is ::: ::: warning Server owner -Keep in mind that discord doesn't allow bots to change server owner's nickname. If server owner executes this command, the bot will reply with an error message. +Keep in mind that discord doesn't allow bots to change the server owner's nickname. If the server owner executes this command, the bot will reply with an error message. ::: diff --git a/guide/Guide/7.array.md b/guide/Guide/7.array.md index ade37ed..9a02406 100644 --- a/guide/Guide/7.array.md +++ b/guide/Guide/7.array.md @@ -1,10 +1,10 @@ # Using arrays -In this guide you will learn: what arrays are, and how to use them. +In this guide you will learn what arrays are, and how to use them. ## General info Generally speaking, arrays are collections of elements arranged in order. -You can think of them as lines, queues containing multiple elements. +You can think of them as lines/queues containing multiple people(elements). ## Indexing Indexes are used to differentiate elements in most array-related functions. @@ -15,7 +15,7 @@ Let's say we had an array of three people: **Bob**, **Adam**, and **Lucy**. * **Adam**'s index is 2 * **Lucy**'s index is 3 -Once you have an array, you can use a variety of functions to edit, and get information from it. +Once you have an array, you can use a variety of functions to edit and get information from it. ## Using arrays In Custom Command there are two main ways of creating an array. In this guide, we will cover both of them. @@ -47,13 +47,13 @@ Let's execute the code, and check how many elements have been created. -As you can see, the number returned matches with the number of fruits we provided in the first place. +As you can see, the number returned matches with the number of fruits we provided. ## 2. Pushing elements You may not always want to create an array from a given text. In some cases, you may prefer to start building an array, by appending new elements to an empty one. -In order to do that, you may use [$arrayPush](../Text/Array/arrayPush.md) function, which adds a new element to the end of the array. +In order to do that, you can use the [$arrayPush](../Text/Array/arrayPush.md) function, which adds a new element to the end of the array. Let's craft an array of a few different animals, and check what's the first and last one. @@ -84,7 +84,7 @@ Generally, this kind of behavior is convenient, but we also need a way to get th Here's how to use [$arraySearch](../Text/Array/arraySearch.md) to do just that. -Let's start off by creating a new array of a few staff members, and check `fajfaj`'s index. +Let's start off by creating a new array of a few staff members, and get `fajfaj`'s index. ```php $arrayCreate[RAKE Oanretesue Mido fajfaj ThatKev; ] @@ -101,11 +101,11 @@ Now, head back to discord, and let's check the output: ## 4. Saving arrays By default, all changes made to an array are reset right after execution. -However, you may want to use arrays to store some valuable data, that has to keep track of all changes among the executions. +However, you may want to use arrays to store some data across executions/commands, that has to keep track of all changes among the executions. -In that case [Permanent variables](./6.variables.md#permanent) come in handy. +In that case [permanent variables](./6.variables.md#permanent) come in handy. -In this example we will create `!todo` command that will store and display all tasks scheduled. +In this example we will create a `!todo` command that will store and display all tasks scheduled. More specifically, we want it to: ![](https://cdn.discordapp.com/attachments/1105873889155895407/1109232936735232100/image.png) @@ -150,4 +150,4 @@ Notice that changes made to the array do not expire after execution. ### 🎉 Congratulations You've reached the end of this tutorial, but not the end of array capabilities! -There's a plenty of functions that make arrays tick, have fun exploring the [Array category](../Text/Array/arrayClear.md)! \ No newline at end of file +There's plenty of functions that make arrays tick, have fun exploring the [Array category](../Text/Array/arrayClear.md)! diff --git a/guide/Image/imageFill.md b/guide/Image/imageFill.md index b7af9ad..3c5591d 100644 --- a/guide/Image/imageFill.md +++ b/guide/Image/imageFill.md @@ -1,6 +1,6 @@ # $imageFill -Fill image with specific color name +Fill an image with a specific color ## Usage @@ -9,7 +9,7 @@ $imageFill[color;x;y;width;height;opacity] ``` ### Colors: -Accept Color Hex or Common Color Names like gray, black +Accepts hex or Common Color Names like gray or black # Position: X & Y You can read more about X, Y [here](./../CodeReferences/ref.imgbuild.position.md) @@ -38,4 +38,4 @@ You can read more about Width, Height [here](./../CodeReferences/ref.imgbuild.si - \ No newline at end of file + diff --git a/guide/Image/imageOutput.md b/guide/Image/imageOutput.md index fe50cfa..e9c388f 100644 --- a/guide/Image/imageOutput.md +++ b/guide/Image/imageOutput.md @@ -1,9 +1,6 @@ # $imageOutput -Generate the current draw into file, and return the filename, it can be used inside $image or {image:.\ -.\ -.\ -} and other places that accept image +Generate the current draw into file, and return the filename, it can be used inside $image or {image:...} and other places that accept image ## Usage @@ -28,4 +25,4 @@ $image[$imageOutput] // send the image $imageCreate[..] // Building the image $sendMessage[{image:$imageOutput[png]}] // send the image -``` \ No newline at end of file +``` diff --git a/guide/Image/imageStrokeWidth.md b/guide/Image/imageStrokeWidth.md index 76711af..ccb514c 100644 --- a/guide/Image/imageStrokeWidth.md +++ b/guide/Image/imageStrokeWidth.md @@ -1,6 +1,6 @@ # $imageStrokeWidth -Control the stroke line thickness when drawing like $imageStroke +Control the stroke line thickness when drawing with $imageStroke ## Usage @@ -25,4 +25,4 @@ You can read more about Width, Height [here](./../CodeReferences/ref.imgbuild.si
- \ No newline at end of file + diff --git a/guide/Image/imageTextAlign.md b/guide/Image/imageTextAlign.md index 17c7677..3145163 100644 --- a/guide/Image/imageTextAlign.md +++ b/guide/Image/imageTextAlign.md @@ -1,6 +1,6 @@ # $imageTextAlign -specify the alignment of the text, effects the meaning of pos x and pos y for writing text positions +specify the alignment of the text, affects the meaning of pos x and pos y for writing text positions ## Usage @@ -9,4 +9,4 @@ $imageTextAlign[Alignment] ``` # Alignments -left, center, right \ No newline at end of file +left, center, right diff --git a/guide/Image/imageTextWeight.md b/guide/Image/imageTextWeight.md index e3c12d1..f8798c5 100644 --- a/guide/Image/imageTextWeight.md +++ b/guide/Image/imageTextWeight.md @@ -1,8 +1,6 @@ # $imageTextWeight -specify the weight of font, i.\ -e bold, italic.\ -. +specify the weight of the font, i.e bold, italic. ## Usage @@ -11,4 +9,4 @@ $imageTextWeight[Weight Type] ``` # Types -regular, bold, italic, bold italic \ No newline at end of file +regular, bold, italic, bold italic diff --git a/guide/Member/ban.md b/guide/Member/ban.md index 4604986..8a2dfb7 100644 --- a/guide/Member/ban.md +++ b/guide/Member/ban.md @@ -35,7 +35,7 @@ Discord prevents users (members/bots) from banning members above their highest r ::: ::: danger Be really careful with adding this to a command! -EVERY member that can execute the command, this function is added in. Will be able to BAN everyone below the bot role! +EVERY member that can execute the command that this function is added in will be able to BAN everyone below the bot role! We highly suggest, not putting the bot role above "Admin" and "head moderator" ::: @@ -47,4 +47,4 @@ We highly suggest, not putting the bot role above "Admin" and "head moderator" ::: ##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Member/hasAnyPerm.md b/guide/Member/hasAnyPerm.md index 9d87898..40a303b 100644 --- a/guide/Member/hasAnyPerm.md +++ b/guide/Member/hasAnyPerm.md @@ -1,6 +1,6 @@ # $hasAnyPerm -Checks if an user or author has one of the provided permissions +Checks if a user or the author has one of the provided permissions ## Usage diff --git a/guide/Member/kick.md b/guide/Member/kick.md index 206c726..b3dcf1f 100644 --- a/guide/Member/kick.md +++ b/guide/Member/kick.md @@ -32,7 +32,7 @@ Discord prevents users (members/bots) from kicking members above their highest r ::: ::: danger Be careful with adding this to a command! -every member that can execute the command, this function is added in. Will be able to kick everyone below the bot role! +EVERY member that can execute the command this function is added in will be able to kick everyone below the bot role! We highly suggest, not putting the bot role above "Admin" and "head moderator" ::: @@ -44,4 +44,4 @@ We highly suggest, not putting the bot role above "Admin" and "head moderator" ::: ##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Member/unban.md b/guide/Member/unban.md index 717c415..bb241ff 100644 --- a/guide/Member/unban.md +++ b/guide/Member/unban.md @@ -13,10 +13,10 @@ If member can be banned by the bot: ::: tip Related Functions -[$kick](../Member/kick.md), to kick a member instead of banning him/here +[$kick](../Member/kick.md), to kick a member instead of banning him/her [$ban](../Member/ban.md), to ban a member ::: ##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Member/userConnectedVC.md b/guide/Member/userConnectedVC.md index b34d39f..360f345 100644 --- a/guide/Member/userConnectedVC.md +++ b/guide/Member/userConnectedVC.md @@ -1,6 +1,6 @@ # $userConnectedVC -return the voice channel ID of the voice channel to which the user is currently connected +return the voice channel ID of the voice channel to which the user is currently connected to ## Usage @@ -8,7 +8,7 @@ return the voice channel ID of the voice channel to which the user is currently $userConnectedVC[User ID (default is $authorID)] ``` -### In case of no connected: +### If the user is not connected: the function will return `undefined` ### Example: @@ -19,4 +19,4 @@ the function will return `undefined` 951224449250779199 - \ No newline at end of file + diff --git a/guide/Member/userReacted.md b/guide/Member/userReacted.md index 57c566d..f0d5d11 100644 --- a/guide/Member/userReacted.md +++ b/guide/Member/userReacted.md @@ -13,9 +13,9 @@ checks if a user reacted on a message or users which reacted on a message -::: info Member must be cached! +::: tip Member must be cached! If you use the main bot the member must be cached to get valid results.You can ignore the message,if you use custom bot! ::: ##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Member/userRoleColor.md b/guide/Member/userRoleColor.md index 88bf098..9d81c65 100644 --- a/guide/Member/userRoleColor.md +++ b/guide/Member/userRoleColor.md @@ -13,9 +13,9 @@ returns the hex color of the highest role of the user -::: info Member must be cached! +::: tip Member must be cached! If you use the main bot the member must be cached to get valid results.You can ignore the message,if you use custom bot! ::: ##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Member/usersWithRole.md b/guide/Member/usersWithRole.md index 46d1a98..c223aff 100644 --- a/guide/Member/usersWithRole.md +++ b/guide/Member/usersWithRole.md @@ -1,7 +1,6 @@ # $usersWithRole -Returns a list of users with given role (members are given from the cache.\ -) +Returns a list of users with given role (members are given from the cache.) ## Usage diff --git a/guide/Message/awaitMessage.md b/guide/Message/awaitMessage.md index 5a76bd9..da631c6 100644 --- a/guide/Message/awaitMessage.md +++ b/guide/Message/awaitMessage.md @@ -1,6 +1,6 @@ # $awaitMessage -Awaits a message from given user ID or everyone in this channel, and return it +Awaits a message from given user ID or everyone in this channel, and returns it's message id/content. ## Usage @@ -9,8 +9,8 @@ $awaitMessage[MESSAGE (Optional);userid / everyone (optional, default everyone); return the user reply or undefined ``` ### Timeout -It means the maximum time bot can wait user message for.\ -it accept format of time like `10s`.\ +The maximum time the bot waits for a user to send a message.\ +Accepts time in the format `10s` for example.\ The max time is `60 x (bot tier + 1)` seconds, for example for tier 3 it would be `240` seconds. ### Example: @@ -27,4 +27,4 @@ The max time is `60 x (bot tier + 1)` seconds, for example for tier 3 it would b Your answer is: YES - \ No newline at end of file + diff --git a/guide/Message/deleteIn.md b/guide/Message/deleteIn.md index 6da75f9..94f40d8 100644 --- a/guide/Message/deleteIn.md +++ b/guide/Message/deleteIn.md @@ -1,5 +1,5 @@ # $deleteIn -Deletes a message send, after a certain time +Deletes a message sent after a certain time #### Usage: `$deleteIn[time]` @@ -14,4 +14,4 @@ Deletes a message send, after a certain time ##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Message/deleteWebhook.md b/guide/Message/deleteWebhook.md index 890b1e9..c05ac38 100644 --- a/guide/Message/deleteWebhook.md +++ b/guide/Message/deleteWebhook.md @@ -3,5 +3,5 @@ Deletes a webhook by using its token and ID #### Usage: `$deleteWebhook[webhookID;webhookToken`
-##### Function difficulty: -###### Tags: \ No newline at end of file +##### Function difficulty: +###### Tags: diff --git a/guide/Message/editMessage.md b/guide/Message/editMessage.md index 38d58d0..5b54f27 100644 --- a/guide/Message/editMessage.md +++ b/guide/Message/editMessage.md @@ -1,5 +1,5 @@ # $editMessage -Edits a message. +Edits a message sent by the bot. #### Usage: `$editMessage[messageid;new message;channelid(optional)]`
diff --git a/guide/Message/hasEmbeds.md b/guide/Message/hasEmbeds.md index 9610604..7849a31 100644 --- a/guide/Message/hasEmbeds.md +++ b/guide/Message/hasEmbeds.md @@ -1,7 +1,7 @@ # $hasEmbeds -Checks if given message ID contains an embed.\ - returns true or false +Checks if given message ID contains an embed. Returns true or false.\ +This includes images/videos you upload for example. ## Usage diff --git a/guide/Message/messageExists.md b/guide/Message/messageExists.md index 5f78436..22066fd 100644 --- a/guide/Message/messageExists.md +++ b/guide/Message/messageExists.md @@ -1,5 +1,5 @@ # $messageExists -returns true/false ,if the message Exists from the message +returns true/false if the message exists #### Usage: `$messageExists[channelID;messageID]` @@ -14,4 +14,4 @@ returns true/false ,if the message Exists from the message ##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Message/messagePublish.md b/guide/Message/messagePublish.md index d5aea71..f7ef8a6 100644 --- a/guide/Message/messagePublish.md +++ b/guide/Message/messagePublish.md @@ -1,7 +1,7 @@ # $messagePublish Publishs message to an annoucemnet channel -#### Usage: $messagePublish or $messagePublish[messageID] or $messagePublish[channelID;messageID] +#### Usage: `$messagePublish or $messagePublish[messageID] or $messagePublish[channelID;messageID]` ##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Message/messageType.md b/guide/Message/messageType.md index 4667484..66186ab 100644 --- a/guide/Message/messageType.md +++ b/guide/Message/messageType.md @@ -1,5 +1,5 @@ # $messageType -returns the id of the webhook +Returns the type of this message. #### Usage: `$messageType` @@ -13,5 +13,9 @@ returns the id of the webhook +::: tip Note +This function returns a type of message from this [list.](../CodeReferences/ref.message_types.md) +::: + ##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Message/newTicket.md b/guide/Message/newTicket.md index a860059..87a32f9 100644 --- a/guide/Message/newTicket.md +++ b/guide/Message/newTicket.md @@ -4,9 +4,8 @@ Create a ticket which can be closed using $closeTicket function #### Usage: `$newTicket[ticket name;ticket message(optional);categoryID(optional);return ticket ID(yes/no)(optional);error message(optional)]`
This will create a ticket named "Member-ticket" and send "Hello World!" in the ticket channel: -``` - !!exec $newTicket[$usertag-Ticket;Hello World!] -``` + +```!!exec $newTicket[$usertag-Ticket;Hello World!]``` ::: tip Looking for tickets system There are templates which you can clone directly from the dashboard, that includes button tickets. Higly customizable. diff --git a/guide/Message/referenceChannelID.md b/guide/Message/referenceChannelID.md index 69b42bc..8679ba8 100644 --- a/guide/Message/referenceChannelID.md +++ b/guide/Message/referenceChannelID.md @@ -1,6 +1,6 @@ # $referenceChannelID -The ID of the channel where this user replied in +The ID of the channel where the message the user replied to is in ## Usage diff --git a/guide/Other/CustomBot.md b/guide/Other/CustomBot.md index 6604b54..45edf32 100644 --- a/guide/Other/CustomBot.md +++ b/guide/Other/CustomBot.md @@ -1,8 +1,8 @@ # Custom Bot -You can find here how to setup custom bot. You need this if you have tier 3+ by redeeming it or by winning in our support server. +Here you can find how to setup your custom bot. You need to do this if you have tier 3+ by redeeming it or by winning in our support server. -# Steps (Only Once) -## 1. Go to [Discord Dev Portal](https://discord.com/developers/applications) +# Steps (Only do these once) +## 1. Go to the [Discord Developer Portal](https://discord.com/developers/applications) ## 2. Create a new Application @@ -17,19 +17,19 @@ You can find here how to setup custom bot. You need this if you have tier 3+ by ## 4. Go to `Bot` ![go to section bot](https://i.imgur.com/xUCbccq.png) -## 5. Click Reset Token, To show a new valid token +## 5. Click Reset Token, to show a new valid token ![](https://i.imgur.com/GbWfwyy.png) ## 6. Click on 'Copy' to copy the token ![](https://i.imgur.com/pHYqcIT.png) -## 7. Go to the Dashboard [(click here)](https://ccommandbot.com/dashboard) and select the server where you want to have premium. +## 7. Go to the [Dashboard](https://ccommandbot.com/dashboard) and select the server where you want premium. ![](https://i.imgur.com/Ostshet.png) ![](https://i.imgur.com/fQXdiT3.png) -## 8. Paste the copied token in 'Token' input, then click 'Save' button +## 8. Paste the copied token in 'Token' input and then click 'Save' button ![](https://i.imgur.com/2FAuEKp.png) @@ -37,6 +37,5 @@ You can find here how to setup custom bot. You need this if you have tier 3+ by ![](https://i.imgur.com/zkjCUvB.png) -10. You are done! - Wait for few minutes, your bot should go online. - and that's it :tada:. **Ensure to leave the main bot in your server, otherwise you'll lose the ability to access the dashboard!** +## 10. You are done! + Wait for few minutes and your bot should go online and that's it :tada:! **Ensure to keep the main bot in your server, otherwise you'll lose the ability to access the dashboard!** diff --git a/guide/Other/curl.md b/guide/Other/curl.md index a00d8e5..da527dd 100644 --- a/guide/Other/curl.md +++ b/guide/Other/curl.md @@ -1,6 +1,6 @@ # Curl Arguments -Curl arguments helps to pass arguments to a function instead of using a param array like $randomText[one;two;three]. -We have added curl arguments to improve the readability of long and complicated codes. Its not required anymore to fill optional values with `;;;` +Curl arguments help to pass arguments to a function instead of using a parameter array like $randomText[one;two;three]. +We have added curl arguments to improve the readability of long and complicated codes. With curl it's not required to fill optional values with empty parameter values like this: `;;;` ## Example @@ -13,8 +13,8 @@ $createChannel[ ] ``` -will create a channel without having to specify params like "return ID" & "NSFW" +This will create a channel without having to specify parameters like "return ID" or "NSFW" ## Curl support -Curl are not supported on every function. -Check the curl support by using !!func `fname` \ No newline at end of file +Curl is not supported on every function. +Check if a function supports curl by using !!func `function name` diff --git a/guide/Other/ratelimits.md b/guide/Other/ratelimits.md index 5a3c8f9..82c395c 100644 --- a/guide/Other/ratelimits.md +++ b/guide/Other/ratelimits.md @@ -2,16 +2,20 @@ Rate Limits prevents misleading usage or abuse of the API. Our Bot receives a lot of requests, that's why we have decided to use our own cooldown system. ## Function Cooldown -Many functions have a **cooldown** — time till next execution is possible for the same data input/user/place (e.g. channel or guild). +Many functions have a **cooldown** — time until next execution is possible for the same data input/user/place (e.g. channel or guild). + +The Bot acts differently if a called function is on cooldown: +* waits for cooldown to pass, then execute +* sends an error message +* cancels the execution without warning. -The Bot acts differently if a called function is on cooldown: waits for cooldown to pass, then execute; sends an error message; cancels the execution without warning. ::: tip -You can retrieve the cooldown of a function by using the command `!!func fname`. +You can see the cooldown (if any) of a function by using the command `!!func function name`. ::: ## Function Limit The same function with cooldown can only be called **5 times in the code**.
-If Function Limit is reached, bot cancels the execution of the function without warning. +If the function limit is reached, the bot cancels the execution of the function without warning. ## Execution Limits The Bot supports up to **5 parallel executions** of the same custom command. @@ -25,4 +29,4 @@ Following Limits are removed: * Function Cooldown * Function Limit hard capped to 20 calls * Execution Limits hard capped to 60 parallel executions -* Execution Cooldown hard capped to 0.5 seconds \ No newline at end of file +* Execution Cooldown hard capped to 0.5 seconds diff --git a/guide/Other/syntax.md b/guide/Other/syntax.md index 66dad8d..593e61c 100644 --- a/guide/Other/syntax.md +++ b/guide/Other/syntax.md @@ -8,20 +8,20 @@ We are not affiliated with BDFD. But we're using a similar syntax ::: ## Syntax -In general the code only have 2 types:\ +In general the code only has 2 types:\ 1- [Text](#what-is-text)\ 2- [Function](#what-is-a-function) ## What is Text? -In the code anything is text except for [function](#what-is-a-function)\ +In the code anything is text except for [functions](#what-is-a-function)\ for example in this code: ``` Hello $username to our server ``` -`Hello`: is a text\ +`Hello`: is text\ [`$username`](../Member/username.md): is a function\ -`to our server` is a text +`to our server` is text ## What is a function Any function starts with `$` like [`$username`](../Member/username.md)\ @@ -31,26 +31,25 @@ Hello $username to our server ``` [`$username`](../Member/username.md) is the only function in this code -### But what function does? +### But what do functions do? Each function in general can do one of the 3 things: -* Replace itself by a value +* Replace itself with a value * Do an action -* Do an action and Replace itself by a value +* Do an action and Replace itself with a value -For Example In running this code: +For example running this code: ``` -Hello $username to our server! +Hello $username, welcome to our server! ``` -When this code runs you will find the bot sending: +you will find the bot sends: ``` -Hello Mido to our server! +Hello Mido, welcome to our server! ``` -Which clearly shows that [`$username`](../Member/username.md) function is `Replaced by value` type\ -and this value will always be the username of the author +Which clearly shows that the [`$username`](../Member/username.md) function is `Replaced by value` type and this value will always be the username of the author -::: tip `Replaced by value` type\ is also called `return` -Read carefully function descriptions in docs. +::: tip `Replaced by value` type is also called `return`\ +Read the function descriptions in docs carefully. If a function is replaced by value, it returns that value. E.g.: [`$username`](../Member/username.md) ***Returns*** the name of the user that executed the command @@ -65,9 +64,9 @@ Some functions requires an input from you to behave differently and this is the $function[Inputs] ``` Previously we used [`$username`](../Member/username.md) without inputs but why?\ -because [`$username`](../Member/username.md) documentations will tell you, that by default it will return the author name, but if you want to return someone else username you will need to do an input in this case\ -Assume that we want to get Rake name instead of Mido\ -we will first need to get Rake User ID, assume (1234) and input it to [`$username`](../Member/username.md): +As the [`$username`](../Member/username.md) documentation will tell you, that by default it will return the executor's name, but if you want to return someone else username you will need to do an input in this case\ +Assume that we want to get Rake's name instead of Mido\ +We will first need to get Rake's User ID, assume 1234, and input it to [`$username`](../Member/username.md): ``` Hello $username[1234] ``` @@ -76,13 +75,13 @@ Output Hello Rake ``` ### Multiple Inputs -In some function it wants from you more than just 1 input like $channelSendMessage\ +Some functions need more than just 1 input like $channelSendMessage\ it asks for 2 different inputs (in order): * Channel ID to send to * Message Content -Assume that channel id is `1234`, and content is `Hello $username` -To apply these inputs in the function, we will separate them by `;`\ +Assume that the channel id is `1234`, and content is `Hello $username` +To apply these inputs in the function, we will separate them by a semicolon `;`\ Like this: ``` $channelSendMessage[1234;Hello $username] @@ -92,10 +91,10 @@ Output (in channel with ID 1234): Hello Mido ``` -Note: [`$channelSendMessage`](../Message/channelSendMessage.md) doesn't not get replaced by value, but only does an action (like sending the message) +Note: [`$channelSendMessage`](../Message/channelSendMessage.md) doesn't get replaced by a value, but only does an action (sending a message) ::: tip Function names are case insensitive -It means $authorID and $aUtHoRiD will work! +It means $authorID and $aUtHoRiD will work the same! ::: ## Expressions @@ -105,7 +104,7 @@ Provide an expression In this case, please read about the [expressions](../CodeReferences/ref.expression.md) here ## Escaping Characters -There's some danger characters that is troublesome to work with +There's some dangerous characters that are troublesome to work with for example let's say you want to send [`$username`](../Member/username.md) to be literally be sent like that and not be replaced to be the user name For example code: diff --git a/guide/Other/troubleshooting.md b/guide/Other/troubleshooting.md index 3b48581..e09ed09 100644 --- a/guide/Other/troubleshooting.md +++ b/guide/Other/troubleshooting.md @@ -1,7 +1,7 @@ # Troubleshooting -Since our bot is very advanced, everyone faces there own problems. Because of this, we made a section, with some common problems. Sorted from most common to less common +Since our bot is very advanced, everyone faces their own problems. Because of this, we made a section, with some common problems. Sorted from most common to less common -The problem is the title, the answer is below it & after the question is the trigger type: +The problem is the title, the answer is below it and after the question is the trigger type: ## My command does not trigger Have you set the minimum permission for the command execution to `None`? diff --git a/guide/Other/useful.md b/guide/Other/useful.md index d955ae7..ef5aa98 100644 --- a/guide/Other/useful.md +++ b/guide/Other/useful.md @@ -11,14 +11,14 @@ This page includes useful Information about the bot and this documentation. ::: tip What is a parameter? Parameters are Values, which a Function needs. To understand it let us see the usage of `$giveRoles[userid;roleid]` -* Parameter 1 is a userid. a userid is an ID unique to that user. To get the userid we will use another function named $authorID, which returns the id of the executor +* Parameter 1 is a userid. A userid is an ID unique to that user. To get the userid we will use another function named $authorID, which returns the id of the executor -* Parameter 2 is an roleid. To get the roleid, you can copy the id of the role you want to give or use an another function named `$roleID[rolename]` +* Parameter 2 is a roleid. To get the roleid, you can copy the id of the role you want to give or use an another function named `$roleID[rolename]` ::: #### Example: `$giveRoles[authorid;roleid1;...]` -`...` -> stands for that the func can have more then 1 parameter.Every paramter (in this case roleid ) gets seperated with `;` +`...` -> means the function can have more then 1 parameter. Every paramter (in this case roleid ) gets seperated with `;` #### Example: `$random[min;max;allowDecimals (yes/no)(optional, default=no)]` @@ -28,7 +28,7 @@ You don't have to provide an optional parameter,if you use the default parameter ### Okay, cool... But how do functions even work? ## Functions -A function is a building block for your code. For example, if you want to send a message, you use a function called [$channelSendMessage](../Message/channelSendMessage.md) or [$sendMessage](../Message/sendMessage.md). Or if you want to kick a member, you use a function called [$kick](../Member/kick.md) +A function is a building block for your code. For example, if you want to send a message, you use can a function called [$channelSendMessage](../Message/channelSendMessage.md) or [$sendMessage](../Message/sendMessage.md). Or if you want to kick a member, you use a function called [$kick](../Member/kick.md) ### Nice, now I understand the basics! How do I proceed? diff --git a/guide/Random/randomTextBiased.md b/guide/Random/randomTextBiased.md index c024e95..2d4bbc5 100644 --- a/guide/Random/randomTextBiased.md +++ b/guide/Random/randomTextBiased.md @@ -9,7 +9,7 @@ $randomTextBiased[Text1,Weight1;Text2,Weight2;Text3,Weight3] ``` ### Note: -The more weight a text have, the more likely it will be selected +The more weight a text has, the more likely it is to be selected ### Example (Unlucky guy): @@ -29,4 +29,4 @@ The more weight a text have, the more likely it will be selected Your reward is: Epic Box - \ No newline at end of file + diff --git a/guide/Text/Components/awaitButton.md b/guide/Text/Components/awaitButton.md index 07ea516..8b22e17 100644 --- a/guide/Text/Components/awaitButton.md +++ b/guide/Text/Components/awaitButton.md @@ -1,5 +1,5 @@ # $awaitButton -Wait a button to be pressed and return its button Id, or `undefined` in case of no button pressed until the timeout. +Waits for a button to be pressed and return its button id, or `undefined` in case no button was pressed when the timeout is reached. :::tip Tip This function supports the [Message Curl Format](/CodeReferences/ref.message_curl_format.html). This way, you can send a message with buttons by using `{button:label:style/url:emoji:id:newline(yes/no)}`. @@ -9,8 +9,8 @@ This way, you can send a message with buttons by using `{button:label:style/url:
### Timeout -It means the maximum time bot can wait user button click for.\ -it accept format of time like `10s`.\ +The maximum time the bot waits for a user to click a button.\ +Accepts time in the format `10s` for example.\ The max time is `60 x (bot tier + 1)` seconds, for example for tier 3 it would be `240` seconds. ::: details Examples diff --git a/guide/Text/Components/awaitMenu.md b/guide/Text/Components/awaitMenu.md index ac218cc..98bd686 100644 --- a/guide/Text/Components/awaitMenu.md +++ b/guide/Text/Components/awaitMenu.md @@ -1,7 +1,7 @@ # $awaitMenu -To wait for a menu option to be selected and return the selected options values. -If nothing is selected, it returns `undefined`.` +To wait for a menu option to be selected and return the selected option(s) values. +If nothing is selected, it returns `undefined`. If multiple values are selected, all of them will be returned, separated with `,`. ## Usage @@ -10,8 +10,8 @@ If multiple values are selected, all of them will be returned, separated with `, $awaitMenu[Message (optional);user id (optional, default:author);timeout (optional, default:15s);menu id1 (optional);menu id2...] ``` ### Timeout -It means the maximum time bot can wait user message for.\ -it accept format of time like `10s`.\ +The maximum time the bot waits for a user to select an option.\ +Accepts time in the format `10s` for example.\ The max time is `60 x (bot tier + 1)` seconds, for example for tier 3 it would be `240` seconds. ### Example: @@ -21,4 +21,4 @@ The max time is `60 x (bot tier + 1)` seconds, for example for tier 3 it would b -![](https://i.imgur.com/58Wzc05.gif) \ No newline at end of file +![](https://i.imgur.com/58Wzc05.gif) diff --git a/guide/Text/Components/button.md b/guide/Text/Components/button.md index 21bb546..a97d1f5 100644 --- a/guide/Text/Components/button.md +++ b/guide/Text/Components/button.md @@ -16,11 +16,11 @@ $button[Click me!;;verySimpleButton] ::: tip What's an ID? ID is used to identify the button clicked. This way, you can decide what happens after clicking a specific button. -Keep in mind, that there musn't be two buttons with the same ID in one message. +Keep in mind, that there can't be two buttons with the same ID in one message. ::: ## Colors -There are four button colors available: +There are four button colors discord allows you to use: `blurple`, `grey`, `green`, and `red`. ```php @@ -98,4 +98,4 @@ Check these pages: ::: ##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Text/Components/buttonURL.md b/guide/Text/Components/buttonURL.md index f9c2c60..9bd3aa3 100644 --- a/guide/Text/Components/buttonURL.md +++ b/guide/Text/Components/buttonURL.md @@ -1,6 +1,6 @@ # $buttonURL -Return the clicked button's URL in Button trigger if it exists. Else, returns `undefined`` if not found. +Return the clicked button's URL in Button trigger if it exists. Else, returns `undefined` if not found. ## Usage diff --git a/guide/Text/Embed/addField.md b/guide/Text/Embed/addField.md index 540b483..d70963e 100644 --- a/guide/Text/Embed/addField.md +++ b/guide/Text/Embed/addField.md @@ -1,5 +1,5 @@ # $addField -Adds fields to a message +Adds fields to a message embed. #### Usage: `$addField[title;value;inline(yes/no default=yes)(optional)]`
@@ -56,4 +56,4 @@ Use: `{field:name:value:inline(yes/no default=yes)(optional)}` ::: danger Please be aware!! If you add any `:` in this function it will error! Check out [this](../../Other/syntax.md) -::: \ No newline at end of file +::: diff --git a/guide/Text/Embed/addTimestamp.md b/guide/Text/Embed/addTimestamp.md index 9615331..c0ce10d 100644 --- a/guide/Text/Embed/addTimestamp.md +++ b/guide/Text/Embed/addTimestamp.md @@ -1,5 +1,5 @@ # $addTimestamp -Adds a timestamp to a message +Adds a timestamp to a message embed. #### Usage: `$addTimestamp` or `$addTimestamp[ms]`
@@ -38,4 +38,4 @@ Use: `{timestamp:ms}` ::: danger Please be aware!! If you add any `:` in this function it will error! Check out [this](../../Other/syntax.md) -::: \ No newline at end of file +::: diff --git a/guide/Text/Embed/attachment.md b/guide/Text/Embed/attachment.md index 5944ea1..2b940b5 100644 --- a/guide/Text/Embed/attachment.md +++ b/guide/Text/Embed/attachment.md @@ -1,8 +1,8 @@ # $attachment -adds an attachment.\ +Adds an attachment to a message.\ \ -If name field is given, you must specify the extension for the attachment (png, webp, or gif) +If the name field is given, you must specify the extension for the attachment (png, webp, or gif) ## Usage @@ -11,4 +11,4 @@ $attachment[data;name (optional);type (url or buffer) (optional);spoiler (yes/no ``` ## Example -![](https://i.imgur.com/ZoePBlD.png) \ No newline at end of file +![](https://i.imgur.com/ZoePBlD.png) diff --git a/guide/Text/Embed/author.md b/guide/Text/Embed/author.md index b80f4bc..06d31cd 100644 --- a/guide/Text/Embed/author.md +++ b/guide/Text/Embed/author.md @@ -1,7 +1,7 @@ # $author -Adds the author to a message with hyper link / icon or text +Adds an author to a message embed, with an optional icon url and/or hyperlink. -#### Usage: `$author[text;icon url(optional);hyper link(optional)]` +#### Usage: `$author[text;icon url(optional);hyperlink(optional)]`
@@ -46,4 +46,4 @@ Use: `{author:text:icon url(optional):hyper link(optional)}` ::: danger Please be aware!! If you add any `:` in this function it will error! Check out [this](../../Other/syntax.md) -::: \ No newline at end of file +::: diff --git a/guide/Text/Embed/color.md b/guide/Text/Embed/color.md index 5235e47..fda6c23 100644 --- a/guide/Text/Embed/color.md +++ b/guide/Text/Embed/color.md @@ -1,7 +1,7 @@ # $color sets the color of the embed -#### Usage: `$color[hex or colorname or RANDOM]` +#### Usage: `$color[hex/colorname/random/transparent]`
@@ -24,4 +24,4 @@ Example: `{color:#0099ff}` ::: danger Please be aware!! If you add any `:` in this function it will error! Check out [this](../../Other/syntax.md) -::: \ No newline at end of file +::: diff --git a/guide/Text/Embed/description.md b/guide/Text/Embed/description.md index 07260e3..369991d 100644 --- a/guide/Text/Embed/description.md +++ b/guide/Text/Embed/description.md @@ -1,5 +1,5 @@ # $description -Adds a description to a message +Adds a description to a message embed. #### Usage: `$description[your text]`
@@ -38,4 +38,4 @@ Use: `{description:your text}` ::: danger Please be aware!! If you add any `:` in this function it will error! Check out [this](../../Other/syntax.md) -::: \ No newline at end of file +::: diff --git a/guide/Text/Embed/example.md b/guide/Text/Embed/example.md index 87158e6..b450976 100644 --- a/guide/Text/Embed/example.md +++ b/guide/Text/Embed/example.md @@ -1,13 +1,12 @@ # Complete Embed -Here is a code for a complete embed and a comprehension of both embed formats. - +Here is a code example for a complete embed in both function and curl format. ## Function Format ```php $author[name;avatar;link] $title[title;url] -$color[hex/int/COLOR] +$color[hex/colorname/random] $thumbnail[url] $description[description] $addField[name;value;inline (yes/no)] @@ -30,7 +29,7 @@ Here are all curl embed components you can use in any function containing `messa ``` {author:name:avatar:link url} {title:title} -{color:hex/int/COLOR} +{color:hex/colorname/random} {url:title url} {thumbnail:url} {description:description} @@ -62,10 +61,10 @@ These arguments can be used in interaction trigger commands. {message=content, curl embed, menus, buttons...} // Only in $interactionReply ``` -::: tip What are ephemerals? -Ephemerals are interaction replies visibile only to the one who executed the command. +::: tip What are ephemeral messages? +Ephemeral messages are interaction replies visibile only to the one who executed the command. -![Ephemerals preview](https://cdn.discordapp.com/attachments/957286111250624552/1100459877480013914/image.png) +![Ephemeral message preview](https://cdn.discordapp.com/attachments/957286111250624552/1100459877480013914/image.png) ::: ## What is the difference between function and embed format? @@ -88,7 +87,7 @@ $changeNickname[$authorID;$toLowercase[$username]] ### 2. Curl Format: -Curl embeds are a more complex way of sending embeds. It's used to "attach" an embed to a message sent with a function like `$sendMessage`, or `$interactionReply`. +Curl embeds are a more complex way of sending embeds. It's used to "attach" an embed to a message sent with a function like `$sendMessage` or `$interactionReply`. This format unlike the previous one, follows the normal code flow. #### Example: @@ -113,8 +112,8 @@ $editMessage[$sentMessageID; ::: danger Separators Please note, that separators vary between the formats: -* Function arguments are separated `;` -* Curl embed arguments are separated with `:` +* Function arguments are separated by a `;` +* Curl embed arguments are separated by a `:` ::: ###### Tags: diff --git a/guide/Text/Embed/footer.md b/guide/Text/Embed/footer.md index 67963d7..277c8c1 100644 --- a/guide/Text/Embed/footer.md +++ b/guide/Text/Embed/footer.md @@ -1,7 +1,7 @@ # $footer -Adds a footer to a message +Adds a footer to a message embed with an optional icon url -#### Usage: `$footer[YOUR TEXT HERE;icon url(optional)]` +#### Usage: `$footer[text;icon url(optional)]`
@@ -25,4 +25,4 @@ Use: `{footer: Your text here:icon url(optional)}` If you add any `:` in this function it will error! Check out [this](../../Other/syntax.md) Link escapes are needed, use `\` to escape characters. Read [me](../../Other/syntax.md) to see more -::: \ No newline at end of file +::: diff --git a/guide/Text/Embed/image.md b/guide/Text/Embed/image.md index d410d68..b9fb2e2 100644 --- a/guide/Text/Embed/image.md +++ b/guide/Text/Embed/image.md @@ -1,5 +1,5 @@ # $image -Adds an image to a message +Adds an image to a message embed #### Usage: `$image[YOUR URL HERE]`
@@ -25,4 +25,4 @@ Use: `{image: Your link here}` If you add any `:` in this function it will error! Check out [this](../../Other/syntax.md) Link escapes are needed, use `\` to escape characters. Read [me](../../Other/syntax.md) to see more -::: \ No newline at end of file +::: diff --git a/guide/Text/Embed/thumbnail.md b/guide/Text/Embed/thumbnail.md index 787bfc1..5755af5 100644 --- a/guide/Text/Embed/thumbnail.md +++ b/guide/Text/Embed/thumbnail.md @@ -1,5 +1,5 @@ # $thumbnail -Adds an thumbnail to an message +Adds a thumbnail to a message embed. #### Usage: `$thumbnail[YOUR URL HERE]`
@@ -25,4 +25,4 @@ Use: `{thumbnail: Your link here}` If you add any `:` in this function it will error! Check out [this](../../Other/syntax.md) Link escapes are needed, use `\` to escape characters. Read [me](../../Other/syntax.md) to see more -::: \ No newline at end of file +::: diff --git a/guide/Text/Embed/title.md b/guide/Text/Embed/title.md index c90e773..ea95462 100644 --- a/guide/Text/Embed/title.md +++ b/guide/Text/Embed/title.md @@ -1,5 +1,5 @@ # $title -Adds an title to an message +Adds a title to a message embed. #### Usage: `$title[YOUR TITLE TEXT HERE;url(optional)]`
@@ -39,4 +39,4 @@ Use: `{title: Your title here}` ::: danger Please be aware!! If you add any `:` in this function it will error! Check out [this](../../Other/syntax.md) -::: \ No newline at end of file +::: diff --git a/guide/Text/Math/abs.md b/guide/Text/Math/abs.md index 353cb15..60f8ccf 100644 --- a/guide/Text/Math/abs.md +++ b/guide/Text/Math/abs.md @@ -1,6 +1,6 @@ # $abs -Return the absolute of a number +Return the absolute value of a number. Basically forces a number to be positive ## Usage @@ -16,4 +16,4 @@ $abs[Number] 25 -
\ No newline at end of file +
diff --git a/guide/Text/Math/divide.md b/guide/Text/Math/divide.md index a7f8146..b6ec478 100644 --- a/guide/Text/Math/divide.md +++ b/guide/Text/Math/divide.md @@ -1,5 +1,5 @@ # $divide -divides (a) number(s) from each other +divides (a) number(s) from each other, from left to right #### Usage: `$divide[10;2;...]`
@@ -13,4 +13,4 @@ divides (a) number(s) from each other
##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Text/Math/mathMax.md b/guide/Text/Math/mathMax.md index 0c3d179..464e5b0 100644 --- a/guide/Text/Math/mathMax.md +++ b/guide/Text/Math/mathMax.md @@ -1,6 +1,6 @@ # $mathMax -Return the highest number from a list of numbers +Return the largest number from a list of numbers ## Usage @@ -16,4 +16,4 @@ $MathMax[Number 1;Number 2;Number 3;...] 150 - \ No newline at end of file + diff --git a/guide/Text/Math/mathMin.md b/guide/Text/Math/mathMin.md index f1551bc..8a21b9e 100644 --- a/guide/Text/Math/mathMin.md +++ b/guide/Text/Math/mathMin.md @@ -1,6 +1,6 @@ # $mathMin -Return the lowest number from a list of numbers +Return the smallest number from a list of numbers ## Usage @@ -16,4 +16,4 @@ $mathMin[Number 1;Number 2;Number 3;...] 50 - \ No newline at end of file + diff --git a/guide/Text/Math/modulo.md b/guide/Text/Math/modulo.md index 4297d7c..6e7ed53 100644 --- a/guide/Text/Math/modulo.md +++ b/guide/Text/Math/modulo.md @@ -1,5 +1,5 @@ # $modulo -calculates the rest of a division +calculates the remainder of a division operation #### Usage: `$modulo[10;2;...]`
@@ -13,4 +13,4 @@ calculates the rest of a division ##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Text/Math/round.md b/guide/Text/Math/round.md index e7f7e46..4619370 100644 --- a/guide/Text/Math/round.md +++ b/guide/Text/Math/round.md @@ -1,5 +1,5 @@ # $round -Rounds the number to the unit! +Rounds the number to the nearest integer. #### Usage: `$round[number]`
diff --git a/guide/Text/Math/roundTenth.md b/guide/Text/Math/roundTenth.md index 8bce07f..bb27c4c 100644 --- a/guide/Text/Math/roundTenth.md +++ b/guide/Text/Math/roundTenth.md @@ -1,16 +1,16 @@ # $roundTenth -rounds the number to a fixed decimals after comman +Rounds the number to the nearest decimal specified in `toFixed` #### Usage: `$roundTenth[number;tofixed]`
- !!exec $roundTenth[10.897890790;2] + !!exec $roundTenth[10.877890790;2] - 10.90 + 10.88 ##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Text/Object/ObjectGet.md b/guide/Text/Object/ObjectGet.md index c4e2047..b7364b1 100644 --- a/guide/Text/Object/ObjectGet.md +++ b/guide/Text/Object/ObjectGet.md @@ -1,5 +1,5 @@ # $objectGet -Get a object value/property by key, if key not found them return `undefined` (same as `$getObjectProperty`) +Get a object value/property by key, if the key is not found then return `undefined` (same as `$getObjectProperty`) #### Usage: `$objectGet[key]`
diff --git a/guide/Text/Object/ObjectIncrease.md b/guide/Text/Object/ObjectIncrease.md index f8fccee..d19c199 100644 --- a/guide/Text/Object/ObjectIncrease.md +++ b/guide/Text/Object/ObjectIncrease.md @@ -1,6 +1,6 @@ # $ObjectIncrease -To increase key value, if not exists, it will create it and set to the value +To increase a key value, if the key doesn't exist, it will create one and set to that value ## Usage @@ -30,4 +30,4 @@ $ObjectIncrease[Key;Amount] {"Mido":20} - \ No newline at end of file + diff --git a/guide/Text/Object/ObjectKeys.md b/guide/Text/Object/ObjectKeys.md index 4378150..c720aa7 100644 --- a/guide/Text/Object/ObjectKeys.md +++ b/guide/Text/Object/ObjectKeys.md @@ -1,6 +1,6 @@ # $ObjectKeys -Return the Object Keys with seperator between each key +Return the Object Keys with the seperator between each key ## Usage @@ -26,4 +26,4 @@ $ObjectKeys[Seperator (optional, default:, );Nested Property 1;Nested Property 2 name/id/weapon - \ No newline at end of file + diff --git a/guide/Text/Object/ObjectLoop.md b/guide/Text/Object/ObjectLoop.md index f849f9f..1f716a6 100644 --- a/guide/Text/Object/ObjectLoop.md +++ b/guide/Text/Object/ObjectLoop.md @@ -14,9 +14,9 @@ CODE... ### Example: - !!exec $objectSet[Mido;Sword]
$objectSet[Rake;Staff]
$objectLoop[name;weapon;index]{
$index. $name has $weapon
}
$arrayLoop[age]{
age is $age
}

+ !!exec $objectSet[Mido;Sword]
$objectSet[Rake;Staff]
$objectLoop[name;weapon;index]{
$index. $name has $weapon
}

1. Mido has Sword
2. Rake has Staff
-
\ No newline at end of file + diff --git a/guide/Text/Object/ObjectSet.md b/guide/Text/Object/ObjectSet.md index e82388c..59b97af 100644 --- a/guide/Text/Object/ObjectSet.md +++ b/guide/Text/Object/ObjectSet.md @@ -5,7 +5,7 @@ set an object property value by key
- !!exec $createObject[{"name":"Wiki"}] $objectSet[name;Rake] $objectSet[tag;0001] $getObject + !!exec $objectCreate[{"name":"Wiki"}] $objectSet[name;Rake] $objectSet[tag;0001] $getObject {"name":"Rake","tag":"0001"} @@ -14,12 +14,12 @@ set an object property value by key ::: tip Setting Objects inside Objects ``` -$createobject[{"type":0}] +$objectCreate[{"type":0}] $objectset[version;2.5] /* will return {"type:0,"version":"2.5"} */ -$createobject[{"type":0}] +$objectCreate[{"type":0}] $objectSet[userdata;age;20] $objectSet[userdata;name;Member] @@ -29,7 +29,7 @@ $objectSet[userdata;role;Moderator] ::: tip Setting values inside array ``` - $createobject[{ "userdata":{ + $objectCreate[{ "userdata":{ "age":0, "name":"undefined", "role":"undefined" @@ -40,7 +40,7 @@ $objectSet[userdata;name;Member] $objectSet[userdata;role;Moderator] /* this is the format for normal groups */ -$createobject[{ "userdata":[{ +$objectCreate[{ "userdata":[{ "age":0, "name":"undefined", "role":"undefined" @@ -55,4 +55,4 @@ $objectSet[userdata;0;role;Moderator] ::: ##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Text/Object/getObject.md b/guide/Text/Object/getObject.md index eb47423..0c93950 100644 --- a/guide/Text/Object/getObject.md +++ b/guide/Text/Object/getObject.md @@ -11,15 +11,15 @@ With spaces: $getobject[1] Without spaces: {"Owner":"Rake","Manager":"Mika","Dev":"Mido","Contributor":"Wiki"} -With spaces: { - "Owner": "Rake", - "Manager": "Mika", - "Dev": "Mido", - "Contributor": "Wiki" +With spaces: {
+ "Owner": "Rake",
+ "Manager": "Mika",
+ "Dev": "Mido",
+ "Contributor": "Wiki"
}
##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Text/Regex/regexCheck.md b/guide/Text/Regex/regexCheck.md index 034442c..5468956 100644 --- a/guide/Text/Regex/regexCheck.md +++ b/guide/Text/Regex/regexCheck.md @@ -1,6 +1,6 @@ # $regexCheck -To check if a text match a regex or not +To check if a text matches a regex or not, returns true or false ## Usage @@ -8,7 +8,7 @@ To check if a text match a regex or not $regexCheck[Text;Regex;Flags] ``` -### Example (Check If Text is alphabets): +### Example (Check If Text is letters): !!exec $regexCheck[ABC;^[a-zA-Z]+$]

@@ -26,4 +26,4 @@ $regexCheck[Text;Regex;Flags] false -
\ No newline at end of file + diff --git a/guide/Text/Regex/regexMatch.md b/guide/Text/Regex/regexMatch.md index 9f8298e..da87c4a 100644 --- a/guide/Text/Regex/regexMatch.md +++ b/guide/Text/Regex/regexMatch.md @@ -1,5 +1,5 @@ # $regexMatch -Matches a string with given Regex Pattern +Matches a string with the given Regex Pattern and returns the matched text or multiple matches seperated by the seperator #### Usage: `$regexMatch[text;regexp;flags(optional);group index(optional, 0 by default) or all;separator (optional)]` diff --git a/guide/Text/isandhas/isValidHex.md b/guide/Text/isandhas/isValidHex.md index 05ae202..45e9999 100644 --- a/guide/Text/isandhas/isValidHex.md +++ b/guide/Text/isandhas/isValidHex.md @@ -1,5 +1,5 @@ # $isValidHex -checks if the given int or hex code is valid ,returns true,false +Checks if the given text is a valid hex code, returns true or false #### Usage: `$isValidHex[int or hexcode]` Example: @@ -16,4 +16,4 @@ Example: ##### Function difficulty ###### Tags: - \ No newline at end of file + diff --git a/guide/Text/only/onlyForCategories.md b/guide/Text/only/onlyForCategories.md index a60d107..27356e1 100644 --- a/guide/Text/only/onlyForCategories.md +++ b/guide/Text/only/onlyForCategories.md @@ -1,9 +1,9 @@ # $onlyForCategories -Only in given categories categorie will be able to execute this command +The command will only be executable in the provided categories. #### Usage: `$onlyForCategories[categoryID;categoryID;...;error message]` -#### Example: `$onlyForCategories[797978978978988;:x: - this command is restricted to Main category]` +#### Example: `$onlyForCategories[797978978978988;:x: - this command is restricted to the Main category]` ::: danger Use this code, on the FIRST line of your code! If you do not, it will execute all code before this line and not after! @@ -14,4 +14,4 @@ You can send embed using [Message Curl Format](../../CodeReferences/ref.message_ ::: ##### Function difficulty -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Text/only/onlyIf.md b/guide/Text/only/onlyIf.md index 0211376..ebc658c 100644 --- a/guide/Text/only/onlyIf.md +++ b/guide/Text/only/onlyIf.md @@ -1,5 +1,5 @@ # $onlyIf -Continue execution only if certain [expression](../../CodeReferences/ref.expression.md) is satisfied, else send error message +Continue the execution only if certain [expression](../../CodeReferences/ref.expression.md) is satisfied, otherwise stop the execution and send the error message. In theory $onlyif can replace all other $onlyFor with the proper [expression](../../CodeReferences/ref.expression.md) #### Usage: `$onlyif[Expression;error message]` @@ -14,4 +14,4 @@ You can send embed using [Message Curl Format](../../CodeReferences/ref.message_ ::: ##### Function difficulty -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Text/textSplit/advancedTextSplit.md b/guide/Text/textSplit/advancedTextSplit.md index 184a886..a990d69 100644 --- a/guide/Text/textSplit/advancedTextSplit.md +++ b/guide/Text/textSplit/advancedTextSplit.md @@ -1,11 +1,8 @@ # $advancedTextSplit The first field is the message we want to split and get indexes for. The second -field would be the split used in the text, and the next field would get the value of the index, setting this index value as the new text. The next -fields work as splitters and new indexes. +field would be the split/seperator used in the text, and the next field would get the value of the index provided, setting this index value as the new text. The next +fields work as splitters/seperators and new indexes for this new text. -::: danger Currently bugged -don't even respond at all -::: #### Usage: `$advancedTextSplit[text;split;index;split;index;...]`
@@ -21,4 +18,4 @@ don't even respond at all ::: ##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Text/textSplit/spliceTextJoin.md b/guide/Text/textSplit/spliceTextJoin.md index c242dfc..18d0e7d 100644 --- a/guide/Text/textSplit/spliceTextJoin.md +++ b/guide/Text/textSplit/spliceTextJoin.md @@ -1,5 +1,5 @@ # $spliceTextJoin -Splits a text with `separator1`, then joins with `separator2` every `x` times, and them joins with `separator3`. +Splits a text with `separator1`, then joins with it `separator2` every `x` times, and then joins with `separator3` every `x-1` times. #### Usage: `$spliceTextJoin[text;separator1;separator2;separator3;every]`
@@ -13,4 +13,4 @@ Splits a text with `separator1`, then joins with `separator2` every `x` times, a ##### Function difficulty: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Text/textSplit/textSplit.md b/guide/Text/textSplit/textSplit.md index c163c84..36022d1 100644 --- a/guide/Text/textSplit/textSplit.md +++ b/guide/Text/textSplit/textSplit.md @@ -1,5 +1,5 @@ # $textSplit -splits text into pieces! To access them use: [$arrayGet](./../Array/arrayGet.md) or array functions +Splits the provided text with `seperator` and creates an array. To access them use: [$arrayGet](./../Array/arrayGet.md) or other array functions #### Usage: `$textSplit[text;separator(optional, default = ,)]` @@ -13,4 +13,4 @@ splits text into pieces! To access them use: [$arrayGet](./../Array/arrayGet.md) ##### Function difficulty -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Timeout/timeoutAction.md b/guide/Timeout/timeoutAction.md index 579cdee..238c8b4 100644 --- a/guide/Timeout/timeoutAction.md +++ b/guide/Timeout/timeoutAction.md @@ -1,6 +1,7 @@ # $timeoutAction -Return `add` in case of timeout user, `remove` in case of timeout got removed by someone in Timeout trigger +Returns `add` if a user was timed out, `remove` if the timeout was removed.\ +This function only works in the Timeout trigger. ## Usage diff --git a/guide/Timeout/timeoutBy.md b/guide/Timeout/timeoutBy.md index def9ed9..41b3b1f 100644 --- a/guide/Timeout/timeoutBy.md +++ b/guide/Timeout/timeoutBy.md @@ -1,6 +1,7 @@ # $timeoutBy -Return the user id of the admin/mod that timeout the user in Timeout trigger +Return the user id of the admin/mod that timed out the user.\ +This function only works in the Timeout trigger. ## Usage diff --git a/guide/Timeout/timeoutReason.md b/guide/Timeout/timeoutReason.md index 2a011a5..e8de337 100644 --- a/guide/Timeout/timeoutReason.md +++ b/guide/Timeout/timeoutReason.md @@ -1,6 +1,7 @@ # $timeoutReason -Return the reason of timeout in Timeout trigger +Return the reason of the timeout.\ +This function only works in the Timeout trigger. ## Usage diff --git a/guide/Timeout/userGetTimeout.md b/guide/Timeout/userGetTimeout.md index 9d8ad55..d9d8b01 100644 --- a/guide/Timeout/userGetTimeout.md +++ b/guide/Timeout/userGetTimeout.md @@ -1,7 +1,7 @@ # $userGetTimeout -Return timeleft for timeout expiry in milliseconds\ -If user is not timeout, it will return 0 +Return the time left of the timeout in milliseconds.\ +If user is not timed out, it will return 0. ## Usage diff --git a/guide/Timeout/userRemoveTimeout.md b/guide/Timeout/userRemoveTimeout.md index 71a28e7..5240fd5 100644 --- a/guide/Timeout/userRemoveTimeout.md +++ b/guide/Timeout/userRemoveTimeout.md @@ -1,6 +1,6 @@ # $userRemoveTimeout -Remove timeout on a user, so he can talk +Removes a timeout from a user. ## Usage diff --git a/guide/Timeout/userSetTimeout.md b/guide/Timeout/userSetTimeout.md index 7718b7c..ec64460 100644 --- a/guide/Timeout/userSetTimeout.md +++ b/guide/Timeout/userSetTimeout.md @@ -1,6 +1,6 @@ # $userSetTimeout -Set timeout user so he can't chat or communicate for specified period +Sets a user timeout, so the user cannot talk/interact in the server. ## Usage diff --git a/guide/Trigger/1.triggers.md b/guide/Trigger/1.triggers.md index e99c1fd..2e3d0ad 100644 --- a/guide/Trigger/1.triggers.md +++ b/guide/Trigger/1.triggers.md @@ -2,15 +2,15 @@ Here's a quick preview of all available triggers: ## [Word](./word.md) -Responds to a message with specified content +Triggers on specific words/patterns > ![Word](https://i.imgur.com/zQtDgDM.png) ## [Reaction](./reaction.md) -Fires off once someone reacts to a message +Fires once someone reacts to a message > ![](https://i.imgur.com/h1pe28J.gif) ## [Button](./button.md) -Detects users clicking buttons +Detects users clicking buttons sent by the bot > ![](https://i.imgur.com/QrxFg8d.png) ## [Menu](./menu.md) @@ -18,11 +18,11 @@ Activates when someone confirms their choice in menu > ![](https://i.imgur.com/7wZLMIq.gif) ## [Slash command](./slash.md) -Responds to a discord slash command +Responds to a discord slash command created with the bot > ![](https://i.imgur.com/Hspy46H.gif) ## [Modal](./modal.md) -Triggers on submittion of a modal (form) +Triggers on submittion of a modal (form) if that modal was sent by the bot > ![](https://i.imgur.com/ON9e1D4.png) ## [Channel](./channel.md) @@ -31,35 +31,30 @@ Detects channels being added or removed ## [Role](./roleaddremove.md) Triggers on role assignment - > ![](https://cdn.discordapp.com/attachments/957286111250624552/1105149730553614486/voice-trigger.gif) ## [Timed event](./time.md) -Executes the code in provided time +Executes the code at a set time > ![](https://cdn.discordapp.com/attachments/1105135517055594508/1105141376083038240/image.png) ## [Interval](./time.md) -Repeatedly executes the code once in a specific time (e.g per hour) +Repeatedly executes the code once in a specific time (e.g every hour) > ![](https://cdn.discordapp.com/attachments/1100128432395927765/1116042286812385370/image.png) ## [Voice](./voicecondecon.md) Fires of when user leaves or joins a voice channel - > ![](https://cdn.discordapp.com/attachments/957286111250624552/1105149730553614486/voice-trigger.gif) ## [Server boost](./serverboost.md) Detects people boosting the server - > ![](https://cdn.discordapp.com/attachments/957286111250624552/1105142982270783587/image.png) ## [Join or Leave](./joinorleave.md) Triggers when someone joins or leaves the server - > ![](https://cdn.discordapp.com/attachments/957286111250624552/1105143572510027806/image.png) ## [Library](./library.md) A code which can be imported in any other code - > ![](https://cdn.discordapp.com/attachments/957286111250624552/1105145858581872750/image.png) > > In this example $includeLibrary has been used to import a library called `tools` which contained a custom $embedMsg function. diff --git a/guide/Trigger/button.md b/guide/Trigger/button.md index 644abb4..63bcd6b 100644 --- a/guide/Trigger/button.md +++ b/guide/Trigger/button.md @@ -1,6 +1,6 @@ # Button Click -This trigger type, will detect when a user clicks a button. +This trigger type will detect when a user clicks a button. The button has to be sent by the bot. #### Example of a button: @@ -9,13 +9,13 @@ The button has to be sent by the bot. ## Syntax -In order for button command to work, there must be button ID to be matched specified. Here's how you can provide it: +In order for a button command to work, there must be a button ID specified. Here's how you can provide it: | Name | Syntax | Example | Explanation | | --- | --- | --- | --- | | Single ID | `button ID` | `staff-app` | Detects a button with "staff-app" ID | | Multiple IDs | `buttonID\|buttonID` | `Apple\|Banana\|Orange` | Matches a buttons with IDs: "Apple", "Banana", or "Orange" | -| Regex | `/RegExp/` | `/User-\d{18,}/` | Will trigger on any following the pattern "User-ID" like "User-434342521997492224" | +| Regex | `/RegExp/` | `/User-\d{18,}/` | Will trigger on any button following the pattern "User-ID" like "User-434342521997492224" | ::: tip Capitalization @@ -49,4 +49,4 @@ In regex ^ and $ are used to match the start and end of the string. ## More Info -Do you want to know more, about the bot's syntax? You can check out [this](../Other/syntax.md) page to learn more! +Do you want to know more about the bot's syntax? You can check out [this](../Other/syntax.md) page to learn more! diff --git a/guide/Trigger/channel.md b/guide/Trigger/channel.md index 2edfd06..f29fc6b 100644 --- a/guide/Trigger/channel.md +++ b/guide/Trigger/channel.md @@ -17,12 +17,12 @@ Use this syntax to let the bot trigger when a channel is added or removed or bot `remove=category id` -> trigger when a channel is being deleted in category with id `category id` -::: tip Supported Channel Type +::: tip Supported Channel Types You can see the whole list [here.](../CodeReferences/ref.channel_types.md) ::: ## Related Functions -The following list is a functions that you might need: +The following list is functions that you might need: [$eventChannelID](../Channel/eventChannelID.md): will return the channel id that got created/removed diff --git a/guide/Trigger/joinorleave.md b/guide/Trigger/joinorleave.md index 56414ca..9a356e6 100644 --- a/guide/Trigger/joinorleave.md +++ b/guide/Trigger/joinorleave.md @@ -1,14 +1,14 @@ # Member Join/Leave ## Basic Information -This trigger type, will trigger when a user joins or leaves the server. For premium users, the present intent needs to be enabled! +This trigger type will trigger when a user joins or leaves the server. For premium users, the presence intent permission needs to be enabled! #### Example of a join trigger: ![](https://cdn.discordapp.com/attachments/772051120368910371/882199989873414184/join_leave.gif) ## Syntax -Use this syntax to let the bot trigger when a member joined/ left your guild/ server +Use this syntax to let the bot trigger when a member joined/left your guild/server `add` -> If this is filled in in the trigger field, the command will trigger when a member joined your server! @@ -16,7 +16,7 @@ Use this syntax to let the bot trigger when a member joined/ left your guild/ se `remove` -> If this is filled in in the trigger field, the command will trigger when a member left your server! ::: tip Testing -We understand that testing with this trigger, can be quite difficult! For that reason, we made a command! +We understand that testing with this trigger can be quite difficult! For that reason, we made a command! `!!emit uadd` to simulate that you joined your guild @@ -25,4 +25,4 @@ We understand that testing with this trigger, can be quite difficult! For that r ## More Info -Do you want to know more, about the bot's syntax? You can check out [this](../Other/syntax.md) page to learn more! \ No newline at end of file +Do you want to know more about the bot's syntax? You can check out [this](../Other/syntax.md) page to learn more! diff --git a/guide/Trigger/library.md b/guide/Trigger/library.md index abbcf62..e5bf0a1 100644 --- a/guide/Trigger/library.md +++ b/guide/Trigger/library.md @@ -1,25 +1,22 @@ # Library ## Basic Information -Library is one of the unique triggers, that doesn't get triggered automatically -but only by you (the designer) +Library is one of the unique triggers, that doesn't get triggered by events in your server. It can be included in other commands so you can use the code in it by calling `$includeLibrary[Library name]` -it helps you execute a code by calling `$includeLibrary[Library name]` - -the goal of this trigger, is simply sharing a code or functions between custom commands (you will understand in the examples) +The goal of this trigger is simply sharing code or functions between custom commands (you will understand in the examples) ## Syntax -the value of this trigger is the `Library name` +the value of the trigger is the `Library name` ## Example -### Create your library that contains users informations -> note that the library name is `users` we will use it in next step. +### Create your library that contains users' information +> note that the library name is `users`. We will use it in next step. ![](https://i.imgur.com/93WZesG.png) ### Create a normal word command `whois` First let's include the library, with `$includeLibrary` -after including, we can directly use the object and retrieve some informations to display. +after including, we can directly use the object and retrieve some information to display. ![](https://i.imgur.com/KQbkjrS.png) @@ -28,12 +25,12 @@ after including, we can directly use the object and retrieve some informations t ## What is the point? Here we only included this library in 1 commands -what if we have 10 or 50 commands that uses these informations, you can easily use it without copy the user informations for each commands, -besides if you plan to add a new user, with library you will only add it to the `users` library -but without library, you would have to add the same users 50 times, to update every commands +what if we have 10 or 50 commands that uses this information, you can easily use it without copying the user information for each command, +besides if you plan to add a new user, with libraries you will only add it to the `users` library +but without libraries, you would have to add the same users 50 times, to every command -that's demonstrate Library usefulness. +That demonstrates Library's usefulness. ## Some functions related to Library -[$includeLibrary](../Unclassified/includeLibrary.md): Include your library \ No newline at end of file +[$includeLibrary](../Unclassified/includeLibrary.md): Include your library diff --git a/guide/Trigger/menu.md b/guide/Trigger/menu.md index e7cc55b..9ad5367 100644 --- a/guide/Trigger/menu.md +++ b/guide/Trigger/menu.md @@ -1,14 +1,14 @@ # Menu Interaction ## Basic Information -This trigger type, will trigger when a user select an option in a menu. +This trigger type will trigger when a user selects an option in a menu. ## Syntax the value is the menu id, for example: -`test` -> will trigger only when a user select an option in a menu with id `test` +`test` -> will trigger only when a user selects an option in a menu with id `test` -`menu_1|menu_2` -> will trigger only when a user select an option in a menu with id `menu_1` or `menu_2` +`menu_1|menu_2` -> will trigger only when a user selects an option in a menu with id `menu_1` or `menu_2` ## Example ### let's first send a menu (with id mymenu) with some options using [$selectMenu](../Text/Components/selectMenu.md) @@ -29,4 +29,4 @@ Now to know which option the user selected, we will use a function `$eventSelect ## Some functions related to Menu Trigger `$eventSelected`: Return the option's value that user selected -`$menuId`: Return the menu id that triggered the command \ No newline at end of file +`$menuId`: Return the menu id that triggered the command diff --git a/guide/Trigger/modal.md b/guide/Trigger/modal.md index 9bd43b1..4d9b50b 100644 --- a/guide/Trigger/modal.md +++ b/guide/Trigger/modal.md @@ -1,14 +1,14 @@ # Modal (Form) Interaction ## Basic Information -This trigger type, will trigger when a user submit a modal. +This trigger type will trigger when a user submits a modal. ## Syntax the value is the modal id, for example: -`modal_1` -> will trigger only when a user submit a modal with id `modal_1` +`modal_1` -> will trigger only when a user submits a modal with id `modal_1` -`modal_1|modal_2` -> will trigger only when a user submit a modal with id `modal_1` or `modal_2` +`modal_1|modal_2` -> will trigger only when a user submits a modal with id `modal_1` or `modal_2` ## Example ### let's first send a button (with id apply-form) using [$button](../Trigger/button.md) @@ -41,4 +41,4 @@ To get what user input in the modal, we will use [$modalAnswer](../Interaction/m You need to send a modal with [$modal](../Interaction/modal.md) within 1 second of button/menu/slash execution ::: -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Trigger/reaction.md b/guide/Trigger/reaction.md index 709be16..373af76 100644 --- a/guide/Trigger/reaction.md +++ b/guide/Trigger/reaction.md @@ -5,7 +5,7 @@ triggers when user react/unreact with certain emoji ## Trigger When User React With Emoji ### Single Emoji -To set it to trigger when user react with certain emoji (i.e 👍), set trigger to: add, emoji\ +To set it to trigger when user react with a certain emoji (i.e 👍), set trigger to: add, emoji\ Example: ![](https://i.imgur.com/PZEM5gu.png) diff --git a/guide/Trigger/roleaddremove.md b/guide/Trigger/roleaddremove.md index 158a14e..9de0e82 100644 --- a/guide/Trigger/roleaddremove.md +++ b/guide/Trigger/roleaddremove.md @@ -77,9 +77,9 @@ Role trigger will work with no input at all, but you can restrict the command to ### Role input To specify a role you can either use an ID or it's name. -But be aware, all role names are caSe seNsiTiVe, so a if a command doesn't trigger, check the capitalization! +But be aware, all role names are case sensitive, so a if a command doesn't trigger, check the capitalization! ### Multiple roles -You can make your command trigger on any of provided roles by putting role names/ids separated by "|". +You can make your command trigger on any provided roles by putting role names/ids separated by "|". -For example `Admin|Moderator`, will take effect either on Admin or Moderator role. \ No newline at end of file +For example `Admin|Moderator`, will take effect either on Admin or Moderator role. diff --git a/guide/Trigger/serverboost.md b/guide/Trigger/serverboost.md index 03d3918..bb0f0db 100644 --- a/guide/Trigger/serverboost.md +++ b/guide/Trigger/serverboost.md @@ -1,13 +1,13 @@ # Server Boost Trigger ## Basic Information -This trigger, will only trigger if someone boosted or removed the boost from your server +This trigger will only trigger if someone boosted or removed the boost from your server ## Syntax the trigger value should be `add/remove` -`add`: for trigger only if someone boosted -`remove`: for trigger only if someone removed the boost +`add`: to trigger only if someone boosted\ +`remove`: to trigger only if someone removed the boost if you leave it blank, it will trigger for both @@ -15,7 +15,7 @@ if you leave it blank, it will trigger for both ### Let's create the server boost trigger command ![](https://i.imgur.com/9AOu4J4.png) -Notice, that we left trigger value blank, because we want it to trigger for both cases +Notice that we left trigger value blank, because we want it to trigger for both cases we will know if user boosted or unboosted with `$isBoosting` ### Output (When boosting) @@ -25,4 +25,4 @@ we will know if user boosted or unboosted with `$isBoosting` ### That's it ## Some functions related to Library -[$isBoosting](../Text/isandhas/isBoosting.md): return true if user is boosting otherwise false \ No newline at end of file +[$isBoosting](../Text/isandhas/isBoosting.md): return true if user is boosting otherwise false diff --git a/guide/Trigger/slash.md b/guide/Trigger/slash.md index 20a7dc1..6cf77e4 100644 --- a/guide/Trigger/slash.md +++ b/guide/Trigger/slash.md @@ -1,20 +1,20 @@ # Slash Command # Introduction -triggers when a user uses a slash command. This needs to be a slash command from the bot! +triggers when a user uses a slash command. This needs to be a slash command from the bot. ## Creating a slash command -In this example we will create `/avatar` command, that show user avatar on request +In this example we will create an `/avatar` command, that shows the user's avatar ![](https://i.imgur.com/MtHPQWd.png) ### Steps -1. Go to dashboard, your server page, click on Slash Builder +1. Go to dashboard, your server page, click on Slash Command Builder ![](https://i.imgur.com/L2dnA5D.png) 2. Click `Create` ![](https://i.imgur.com/GlwHeER.png) -3. Fill the slash name and description, remember this name, we will use it later +3. Fill the slash name and description ![](https://i.imgur.com/LL52VH2.png) 4. To add user option, to the slash, select from the option menu @@ -29,10 +29,10 @@ In this example we will create `/avatar` command, that show user avatar on reque 7. Click `Deploy Command/Save` ![](https://i.imgur.com/PwJ8kLv.png) -8. Create a new custom command, select type to be `Slash Command` and `Trigger` to be `avatar` (the name from step 3) +8. Create a new custom command, select type to be `Slash Command` and select your slash command from the dropdown in `Trigger` ![](https://i.imgur.com/YF6EfSY.png) -9. Set the code to be (will be explained in next section) +9. Set the code to be executed when the slash command is used ::: details Code ``` @@ -44,7 +44,7 @@ In this example we will create `/avatar` command, that show user avatar on reque ``` ::: -10. go to your server and use the command as fellow: +10. go to your server and use the command as follows: ![](https://i.imgur.com/XZTeNVO.png) @@ -54,19 +54,19 @@ In this example we will create `/avatar` command, that show user avatar on reque ## Code Explanation ### Retrieving the option from user -When user use the command like in Step 10, we can retrieve the option through [$getOption](../Interaction/getOption.md) function: +When a user uses the command like in Step 10, we can retrieve the option through the [$getOption](../Interaction/getOption.md) function: ``` $getOption[option name] ``` In our example `option name` is `user` from step 6\ -then the user id will be stored in `user_id` using [$let](../Variables/let.md), this way we can recall it later in the code through `$user_id`: +then the user id will be stored in a temporary variable named`user_id` using [$let](../Variables/let.md), this way we can recall it later in the code through `$user_id`: ``` $let[user_id;$getOption[user]] ``` ### Sending Message Next, to send a message with [$interactionReply[message]](../Interaction/interactionReply.md)\ -but here we will send an embed with title and image, using {title}, {image} [Curl Message Format](../CodeReferences/ref.message_curl_format.md): +Here we will send an embed with a title and image using {title} and {image} [Curl Message Format](../CodeReferences/ref.message_curl_format.md): ``` $interactionReply[ {title:Embed Title} @@ -80,7 +80,7 @@ To get the username `Mido#1234` we will use [$userTag[user id]](../Member/userTa Avatar of $userTag[$user_id] ``` -2. In Image to retrieve the user image, we will use [$userAvatar[user id]](../Member/userAvatar.md): +2. In Image to retrieve the user avatar, we will use [$userAvatar[user id]](../Member/userAvatar.md): ``` $userAvatar[$user_id] ``` @@ -107,4 +107,4 @@ To send the message in private we have to set the 2nd input `ephemeral` to `yes` That's it, Save and test it out ### Output -![](https://i.imgur.com/SsFJHfv.png) \ No newline at end of file +![](https://i.imgur.com/SsFJHfv.png) diff --git a/guide/Trigger/time.md b/guide/Trigger/time.md index 7d0f8e3..d970dc1 100644 --- a/guide/Trigger/time.md +++ b/guide/Trigger/time.md @@ -1,16 +1,16 @@ # Timed or Interval ## Interval: Basic Information -This trigger type, will execute a code ones per x time. +This trigger type will execute a command once per x time. #### Example of an interval trigger: ![](https://cdn.discordapp.com/attachments/772051120368910371/880525770710220872/first-interval.gif) ## Timed Event: Syntax -Use this syntax to let the bot know, how long it should wait until execution! +Use this syntax to let the bot know how long it should wait until execution! -You can specify any time, in the following format: +You can specify any time in the following format: ``` 1s -> execute after 1 second @@ -21,9 +21,9 @@ You can specify any time, in the following format: ``` ## Interval: Syntax -Use this syntax to let the bot know, how long it should wait until the next command execution! +Use this syntax to let the bot know how long it should wait until the next command execution! -You can specify any time, in the following format: +You can specify any time in the following format: ``` 1s -> execute after 1 second @@ -35,9 +35,9 @@ You can specify any time, in the following format: ::: danger DO NOT FORGET: -Set a channel used, otherwise errors will not be send anywhere! This makes bug fixing really difficult! +Set a channel used, otherwise errors will not be sent anywhere! This makes bug fixing really difficult! ::: ## More Info -Do you want to know more, about the bot's syntax? You can check out [this](../Other/syntax.md) page to learn more! \ No newline at end of file +Do you want to know more about the bot's syntax? You can check out [this](../Other/syntax.md) page to learn more! diff --git a/guide/Trigger/voicecondecon.md b/guide/Trigger/voicecondecon.md index 7ac9872..cb806f7 100644 --- a/guide/Trigger/voicecondecon.md +++ b/guide/Trigger/voicecondecon.md @@ -1,7 +1,7 @@ # Voice Join/Leave ## Basic Information -This trigger type, will trigger when a user joins or leaves a voice channel. +This trigger type will trigger when a user joins or leaves a voice channel. #### Example of a voice join trigger: @@ -9,14 +9,14 @@ This trigger type, will trigger when a user joins or leaves a voice channel. ## Main Syntax -Use this syntax to let the bot trigger when a vc is joined/ leaved! +Use this syntax to let the bot trigger when a user joins/leaves a voice channel! -`join` -> If this is filled in in the trigger field, the command will trigger when a voice channel is joined! +`join` -> the command will trigger when a voice channel is joined -`leave` -> If this is filled in in the trigger field, the command will trigger when a member left a voice channel! +`leave` -> the command will trigger when a member left a voice channel -`join/leave=voice channel id` -> in this case, will only trigger when user join/leave this specific voice channel +`join/leave=voice channel id` -> will only trigger when user joins/leaves this specific voice channel ::: danger Special event! Because this is a special event type, you CANNOT use `$channelID` to return the channel that was joined! Use [$voiceChannelID](../Channel/voiceChannelID.md) instead @@ -24,9 +24,9 @@ Because this is a special event type, you CANNOT use `$channelID` to return the ::: danger DO NOT FORGET: -Set a channel used, otherwise errors will not be send anywhere! This makes bug fixing really difficult! +Set a channel used, otherwise errors will not be sent anywhere! This makes bug fixing really difficult! ::: ## More Info -Do you want to know more, about the bot's syntax? You can check out [this](../Other/syntax.md) page to learn more! +Do you want to know more about the bot's syntax? You can check out [this](../Other/syntax.md) page to learn more! diff --git a/guide/Trigger/word.md b/guide/Trigger/word.md index 5aaea95..1e6171d 100644 --- a/guide/Trigger/word.md +++ b/guide/Trigger/word.md @@ -2,7 +2,7 @@ Word commands, also known as message commands are executed when the bot receives a text message. ## Basic word command -Let's create a word command with a trigger `!ping`, this means the command will be triggered whenever someone sends a `!ping` message. +Let's create a word command with a trigger `!ping`, this means the command will be triggered whenever someone sends a message starting with `!ping`. In the code part we will type `pong!`, so the bot will respond with it. ![Word example](https://cdn.discordapp.com/attachments/1100128432395927765/1100813255418576966/pingcmd.png) @@ -17,9 +17,9 @@ In the code part we will type `pong!`, so the bot will respond with it. ## Using parameters -A crucial feature of word type are parameters. They are data provided when executing the command. +A crucial feature of the word type are parameters. They are data provided when executing the command. -Let's say we had a `?hug` command, which users can use to express their feelings towards other users. +Let's say we had a `?hug` command, which users can use to hug other users. In that case we would want users to select a user by mentioning him. #### Usage @@ -31,7 +31,7 @@ The mention will be the `parameter 1`, because users will mention their victim r #### Setup -Parameters can be retrived using the [$message](../Message/message.md) function, we will use it to get user mention: +Parameters can be retrived using the [$message](../Message/message.md) function, we will use it to get the user mention: ![?hug code](https://cdn.discordapp.com/attachments/1100128432395927765/1100816608198402049/hugcmd.png) @@ -146,6 +146,7 @@ Here is the expression which we are going to use: ```regex /<@!?\d{18,}>/ ``` +You need to add a forward slash before and after your expression, otherwise the bot will only reply when you literally send `<@!?\d{18,}>` in your message ![Ping detector](https://cdn.discordapp.com/attachments/957286111250624552/1100839560532983908/image.png) @@ -297,4 +298,4 @@ you can do so through `$message[2+]`, which means get 2nd word and what after it let's try it out: ![](https://i.imgur.com/KZBeAVT.png) -Yay! works well. --> \ No newline at end of file +Yay! works well. --> diff --git a/guide/Tutorials/1.ping.md b/guide/Tutorials/1.ping.md index ee817ab..763f1c5 100644 --- a/guide/Tutorials/1.ping.md +++ b/guide/Tutorials/1.ping.md @@ -1,5 +1,5 @@ # Ping command -Let's make a simple ping command, where you send a command `ping` and bot reply with `pong` +Let's make a simple ping command, where you send a command `ping` and the bot replies with `pong` # Steps ## #1 Creating Command @@ -7,20 +7,20 @@ Your first step, will be creating a new custom command, check this [page](../Gui ## #2 Trigger Settings In the trigger settings -1. Select Type to be `Word`, you can know more about this trigger [here](../Trigger/word.md) -2. Set Trigger to be `ping` +1. Select the Type to be `Word`, you can know more about this trigger [here](../Trigger/word.md) +2. Set the Trigger to be `ping` ![](https://i.imgur.com/o5UIcB5.png) -This means, it will run this command when user send `ping` +This means, it will run this command when a user sends `ping` ## #3 Response -To make him reply with `pong` when this command run, we simply write `pong` in the code section +To make the bot reply with `pong` when this command is run, we simply write `pong` in the code section ![](https://i.imgur.com/WtNpGdM.png) ## Test time Save the command and go to your server and send `ping` ![](https://i.imgur.com/smxmtfA.png) -Congratulations :tada: \ No newline at end of file +Congratulations :tada: diff --git a/guide/Tutorials/2.staff-app.md b/guide/Tutorials/2.staff-app.md index 5367727..30f78e0 100644 --- a/guide/Tutorials/2.staff-app.md +++ b/guide/Tutorials/2.staff-app.md @@ -7,7 +7,7 @@ Here's how it's going to look like: ## 1. Button sending Let's send a button users will use to open up the form. -The button will be `blurple`, have a label `Apply`, and an id `staff-app`. +The button will be `blurple`, have a label `Apply` and an id `staff-app`. ```php !!exec $button[Apply;blurple;staff-app] ``` @@ -112,7 +112,7 @@ We recommend you to continue reading about anything that seems unclear to you: | [$let](../Variables/let.md) | define a temporary variable | | [$get](../Variables/get.md) | retrive a temporary variable | | [$modalAnswer](../Interaction/modalAnswer.md) | get user's answer | -| [$channelSendMessage](../Message/channelSendMessage.md) | send a message elsewhere | +| [$channelSendMessage](../Message/channelSendMessage.md) | send a message in a different channel | | [$channelID](../Channel/channelID.md) | find a channel by it's name | | [$if](../Text/Condition/if.md) | conditional statement | | [Complete embed](../Text/Embed/example.md) | create an embed | @@ -121,4 +121,4 @@ We recommend you to continue reading about anything that seems unclear to you: ### 🎉 Congratulations! -You've made a complete staff application system! \ No newline at end of file +You've made a complete staff application system! diff --git a/guide/Tutorials/3.report.md b/guide/Tutorials/3.report.md index 79e2d83..d35bb40 100644 --- a/guide/Tutorials/3.report.md +++ b/guide/Tutorials/3.report.md @@ -26,7 +26,7 @@ $let[reason;$message[2+]] ``` ## 4. Send report -As we have all data stored and ready, we will procceed to sending the report. For that we will use: +As we have all data stored and ready, we will procceed to send the report. For that we will use: * [$channelID](../Channel/channelID) - to change channel name to ID * [$channelSendMessage](../Message/channelSendMessage.md) - to send a message to a different channel @@ -61,4 +61,4 @@ Meanwhile in #reports ### 🎉 Congrats! -You've passed the course with grade A! \ No newline at end of file +You've passed the course with grade A! diff --git a/guide/Tutorials/4.collect.md b/guide/Tutorials/4.collect.md index a74d55a..25c813a 100644 --- a/guide/Tutorials/4.collect.md +++ b/guide/Tutorials/4.collect.md @@ -17,7 +17,7 @@ Users will collect their reward by using the `!collect` command, so let's set th Now that we have the initial setup done, it's time to make the command actually work. ::: tip We will use: -* [$getUserVar](../Variables/getUserVar.md) - to load user's balance +* [$getUserVar](../Variables/getUserVar.md) - to load the user's balance * [$let](../Variables/let.md) - to temporarily store the balance * [$math](../Text/Math/math.md) - to calculate new balance * [$setUserVar](../Variables/setUserVar.md) - to set the new balance @@ -25,7 +25,7 @@ Now that we have the initial setup done, it's time to make the command actually ### Prize -The reward that users will receive is 100$ with [template economy](../Guide/4.template.md). Since the template economy uses the `money` user var to store a user's balance, we will contribute to that var. +The reward that users will receive is 100$ with the [template economy](../Guide/4.template.md). Since the template economy uses the `money` user var to store a user's balance, we will contribute to that var. ### Getting user var @@ -94,4 +94,4 @@ You may not always limit executions to one per user, you can use other vars like ::: ### 🎉 Congrats! -You've learned how to make a command that can be used only one time! \ No newline at end of file +You've learned how to make a command that can be used only one time! diff --git a/guide/Tutorials/5.confession.md b/guide/Tutorials/5.confession.md index 3815d01..e74d2be 100644 --- a/guide/Tutorials/5.confession.md +++ b/guide/Tutorials/5.confession.md @@ -3,20 +3,20 @@ In this guide, you will learn how to make a simple slash command called `/confes ![](https://i.imgur.com/kJwJ9Fi.png) ## 1. Create a command -The first step is to create a new command slash command: +The first step is to create a new slash command: * Head to your server in [dashboard](https://ccommandbot.com/dashboard) * Click `Slash Command Builder` * Construct the confess command (follow the next GIF) ![](https://i.imgur.com/1IUUCn9.gif) ## 2. Responding To Code -Next, Let's write the code that will respond when user run the slash command: +Next, Let's write the code that will respond when user runs the slash command: * Head to your server in [dashboard](https://ccommandbot.com/dashboard) * Click `Manage Your Commands` * Click `Create` -* In Command Settings, Select Trigger Type to be "Slash Command", then select `/confess` +* In Command Settings, select the Trigger Type to be "Slash Command", then select `/confess` * For Code: - * To respond to user, you can do so with `$interactionReply[message]` where message is the text you would like to display: + * To respond to the user, you can do so with `$interactionReply[message]` where message is the text you would like to display: > For example: $interactionReply[Hello World] * To receive user input of confession, we can use $getOption[option name], where `option name` is same option name we used while building the slash command which is `message` > For example: $getOption[message] @@ -36,8 +36,8 @@ That is all, let's test it out :star_struck: It works :happy:! but... what about making the respond into a beautiful embed? ## 4. Modify Code To Respond With Embed -To build an embed, we need to use [curl message](../CodeReferences/ref.message_curl_format.md). -Curl Message is a way for you to build an embed in place of `message` input for example to set up an embed with description and title we will use: +To build an embed, we need to use [curl message format](../CodeReferences/ref.message_curl_format.md). +Curl is a way for you to build an embed in the place of the `message` input, for example to set up an embed with description and title we will use: ```js {desc:My embed description} {title:My embed title} @@ -63,4 +63,4 @@ Let's test again! Congratulations, You made a functional slash command :tada:! -> Of course, this might be simple. but it's good start! \ No newline at end of file +> Of course this might be simple, but it's good start! diff --git a/guide/Useful/deleteTrigger.md b/guide/Useful/deleteTrigger.md index dd63532..51ffc74 100644 --- a/guide/Useful/deleteTrigger.md +++ b/guide/Useful/deleteTrigger.md @@ -1,6 +1,6 @@ # $deleteTrigger -delete a command with token, **empty token = delete current command** +Delete a command using its token, **empty token = delete current command** ## Usage diff --git a/guide/Useful/endForEach.md b/guide/Useful/endForEach.md index cdc7322..365016e 100644 --- a/guide/Useful/endForEach.md +++ b/guide/Useful/endForEach.md @@ -1,6 +1,6 @@ # $endForEach -its used as closer for $forEach +To close $foreach ## Usage diff --git a/guide/Useful/redirectErrors.md b/guide/Useful/redirectErrors.md index b5ed44a..cf5f28e 100644 --- a/guide/Useful/redirectErrors.md +++ b/guide/Useful/redirectErrors.md @@ -1,5 +1,5 @@ # $redirectErrors -To redirect any kind of errors to specific channel, by default errors will appear in execution channel +To redirect any kind of errors to a specific channel, by default errors will appear in the execution channel #### Usage: `$redirectErrors[Channel ID]` @@ -30,4 +30,4 @@ Check the [$modifyChannelPerms](../Channel/modifyChannelPerms) for the correct u ::: ##### Function difficulty -###### Tags: \ No newline at end of file +###### Tags: diff --git a/guide/Useful/return.md b/guide/Useful/return.md index c5b9931..271fbbc 100644 --- a/guide/Useful/return.md +++ b/guide/Useful/return.md @@ -1,12 +1,14 @@ # $return -Can only be used inside user-defined function created by $function\ +Stops a user defined function execution and returns the Return Value + +Can only be used inside user-defined functions created with `$function`\ It has no effect outside the user-defined function ## Usage ```bash -$return[Return Value] +$return[Return Value(optional)] ``` ### Example: @@ -14,4 +16,4 @@ $return[Return Value] $function[add;num1;num2] $return[$math[$num1+$num2]] $endFunction -``` \ No newline at end of file +``` diff --git a/guide/Useful/triggerExists.md b/guide/Useful/triggerExists.md index 4e39cb4..98b5171 100644 --- a/guide/Useful/triggerExists.md +++ b/guide/Useful/triggerExists.md @@ -1,6 +1,6 @@ # $triggerExists -Check if a trigger with token exists or not +Check if a trigger with the specified token exists ## Usage @@ -26,4 +26,4 @@ $triggerExists[Token] false - \ No newline at end of file + diff --git a/guide/Variables/deleteUserVar.md b/guide/Variables/deleteUserVar.md index a064edf..f46250a 100644 --- a/guide/Variables/deleteUserVar.md +++ b/guide/Variables/deleteUserVar.md @@ -1,5 +1,5 @@ # $deleteUserVar -Deletes a user variable, from the author of the command triggered or from the ID specified. +Deletes a user variable, from the author of the command or from the ID specified. #### Usage: `$deleteUserVar[variable;userID]`
diff --git a/guide/Variables/getMessageVar.md b/guide/Variables/getMessageVar.md index b917d32..c5eae42 100644 --- a/guide/Variables/getMessageVar.md +++ b/guide/Variables/getMessageVar.md @@ -1,5 +1,5 @@ # $getMessageVar -Gets an message variable value +Gets a message variable value #### Usage: `$getMessageVar[variable;messageID(optional)]`
diff --git a/guide/Variables/increaseChannelVar.md b/guide/Variables/increaseChannelVar.md index 2cb5dae..746e79c 100644 --- a/guide/Variables/increaseChannelVar.md +++ b/guide/Variables/increaseChannelVar.md @@ -1,6 +1,7 @@ # $increaseChannelVar -To increase channel variable with a certain amount +To increase channel variable with a certain amount.\ +If the variable doesn't exist it will be created and its value set to the answer of the value as if the original value of the var is 0. ## Usage @@ -23,4 +24,4 @@ $increaseChannelVar[messages;1] Before: 5
After: 10
- \ No newline at end of file + diff --git a/guide/Variables/increaseServerVar.md b/guide/Variables/increaseServerVar.md index 852765d..8b369c9 100644 --- a/guide/Variables/increaseServerVar.md +++ b/guide/Variables/increaseServerVar.md @@ -1,6 +1,7 @@ # $increaseServerVar -To increase server variable with a certain amount +To increase server variable with a certain amount.\ +If the variable doesn't exist it will be created and its value set to the answer of the value as if the original value of the var is 0. ## Usage @@ -23,4 +24,4 @@ $increaseServerVar[ticket numbers;1] Before: 5
After: 10
- \ No newline at end of file + diff --git a/guide/Variables/increaseUserVar.md b/guide/Variables/increaseUserVar.md index 19b94c6..e254475 100644 --- a/guide/Variables/increaseUserVar.md +++ b/guide/Variables/increaseUserVar.md @@ -1,6 +1,7 @@ # $increaseUserVar -To increase user variable with a certain amount +To increase user variable with a certain amount.\ +If the variable doesn't exist it will be created and its value set to the answer of the value as if the original value of the var is 0. ## Usage @@ -23,4 +24,4 @@ $increaseUserVar[money;1000] Before: 1000
After: 2000
- \ No newline at end of file + diff --git a/guide/Variables/let.md b/guide/Variables/let.md index 86b80e6..60495ae 100644 --- a/guide/Variables/let.md +++ b/guide/Variables/let.md @@ -1,9 +1,9 @@ # $let -define a variable, that you can access later through [$get](./get.md) -This functions is useful to temporary store variables, like for to save a result of a calculation +Define a variable, that you can access later through [$get](./get.md). +This function is useful to temporarily store variables, like to save the result of a calculation #### Usage: `$let[variable name;variable value;remain after execution (yes/no , default no) (optional)]` -The first value will only exist till cc ends its execution,the second will be still accessable till next bot restart (every 5d) +The first value will only exist until cc ends its execution,the second will still be accessable until next bot restart (every 5d) You can use $get[varname] or $varname to retrieve the value
diff --git a/guide/Variables/userLeaderboard.md b/guide/Variables/userLeaderboard.md index de6ba40..937fae7 100644 --- a/guide/Variables/userLeaderboard.md +++ b/guide/Variables/userLeaderboard.md @@ -17,11 +17,11 @@ Available Variables: | {discriminator} | returns the discriminator like 1234 | Order: -* `desc`: Will display all the top ranked member with the biggest numbers. -* `asc`: Will display all the bottom ranked member with the lowest numbers. +* `desc`: Will display all the members' ranks from largest to smallest. +* `asc`: Will display all the members' ranks from smallest to largest. #### Example: -To use this function your uservar must have nummeric values . +To use this function your uservar must have numeric values .
diff --git a/guide/Variables/viewServerVars.md b/guide/Variables/viewServerVars.md index 35da23a..84a7cce 100644 --- a/guide/Variables/viewServerVars.md +++ b/guide/Variables/viewServerVars.md @@ -1,6 +1,6 @@ # $viewServerVars -Get list of defined server variables, and optionally filter then using query regex +View a list of all the variables that are defined for the server, and search for specific variables using a regular expression query filter ## Usage @@ -26,4 +26,4 @@ $viewServerVars[Separator;Query Regex (optional)] level1_xp, level2_xp, level3_xp,level1_reward - \ No newline at end of file +
diff --git a/guide/Variables/viewUserVars.md b/guide/Variables/viewUserVars.md index 2b24ae5..b1a0912 100644 --- a/guide/Variables/viewUserVars.md +++ b/guide/Variables/viewUserVars.md @@ -1,6 +1,6 @@ # $viewUserVars -Get List Of Defined User Vars on user +View a list of all the variables that are defined for a specific user ## Usage @@ -16,4 +16,4 @@ $viewUserVars[User ID;Separator] xp, money, bonus - \ No newline at end of file +