You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ Variables, functions and procedures of `TTimmy`
75
75
-**Type**: Boolean variable
76
76
-**Visibility**: Private
77
77
-**Availability**: v1.0.0 to v1.2.0
78
-
-**Description**: `TTimmy.Enabled` tells other functions of `TTimmy` whether if the bot instance is ready to work. If `TTimmy.Enabled` is false, all major functions of `TTimmy` won't perform their operations and will exit right away, usually with the return code 102. The value of this boolean variable can be set by using [`TTimmy.Enable`](#procedure-enable) or [`TTimmy.Disable`](#procedure-disable).
78
+
-**Description**: `TTimmy.Enabled` tells other functions of `TTimmy` whether if the bot instance is ready to work. If `TTimmy.Enabled` is false, all major functions of `TTimmy` won't perform their operations and will exit right away, usually with the return code 102. The value of this boolean variable can be set by using [`TTimmy.Enable()`](#procedure-enable) or [`TTimmy.Disable()`](#procedure-disable).
79
79
80
80
### procedure `Enable()`
81
81
-**Source**: Line 154 ([reference](http://github.com/42tm/timmy/blob/v1.2.0/timmy.pas#L154))
@@ -95,13 +95,13 @@ Variables, functions and procedures of `TTimmy`
95
95
-**Type**: Dynamic array of `TStrArray`
96
96
-**Visibility**: Private
97
97
-**Availability**: v1.0.0 to v1.2.0 (In v1.0.0, it's `QKeywordsList`)
98
-
-**Description**: This is an array of arrays. Each array in this array holds strings, which are keywords for a question. Keywords help the bot (or more specifically, `TTimmy.Answer()`) to understand the end-user's messages and have replies for the messages.
98
+
-**Description**: This is an array of arrays. Each array in this array holds strings, which are keywords for a question. Keywords help the bot (or more specifically, [`TTimmy.Answer()`](#function-answertmessage-string)) to understand the end-user's messages and have replies for the messages.
99
99
100
100
### `ReplyList`
101
101
-**Type**: Dynamic array of `TStrArray`
102
102
-**Visibility**: Private
103
103
-**Availability**: v1.0.0 to v1.2.0
104
-
-**Description**: Just like `TTimmy.MKeywordsList`, `TTimmy.ReplyList` is an array of arrays. Each array in `TTimmy.ReplyList` holds strings, which are possible replies for a question. If an array in `TTimmy.ReplyList` has more than two strings, the bot will pick one, randomly. Arrays in `TTimmy.ReplyList` are correspond to arrays in `TTimmy.MKeywordsList`if we are speaking in terms of position. For example, the replies at offset 2 of `TTimmy.ReplyList` are replies for the message with the keywords at offset 2 of `TTimmy.MKeywordsList`.
104
+
-**Description**: Just like `TTimmy.MKeywordsList`, `TTimmy.ReplyList` is an array of arrays. Each array in `TTimmy.ReplyList` holds strings, which are possible replies for a question. If an array in `TTimmy.ReplyList` has more than two strings, the bot will pick one, randomly. Arrays in `TTimmy.ReplyList` are correspond to arrays in `TTimmy.MKeywordsList` in terms of position. For example, the replies at offset 2 of `TTimmy.ReplyList` are replies for the message with the keywords at offset 2 of `TTimmy.MKeywordsList`.
105
105
106
106
### `NOfEntries`
107
107
-**Type**: Integer
@@ -141,7 +141,7 @@ Variables, functions and procedures of `TTimmy`
141
141
-`Replies`\[`TStrArray`\]: Possible replies to the message that contains the keywords clue in `MKeywords`
142
142
-**Return**: Integer
143
143
- 102: The instance is not enabled (or initialized)
144
-
- 202: Duplication check is enabled (`TTimmy.DupesCheck` = true) and a match of `MKeywords` is presented in `TTimmy.MKeywordsList`
144
+
- 202: Duplication check is enabled ([`TTimmy.DupesCheck`](#dupescheck) = true) and a match of `MKeywords` is presented in `TTimmy.MKeywordsList`
145
145
- 200: The operation is successful
146
146
-**Visibility**: Public
147
147
-**Availability**: v1.0.0 to v1.2.0
@@ -179,20 +179,20 @@ Variables, functions and procedures of `TTimmy`
179
179
-**Type**: Boolean
180
180
-**Visibility**: Public
181
181
-**Availability**: v1.0.0 to v1.2.0
182
-
-**Description**: `TTimmy.DupesCheck` specifies whether `TTimmy.Add()` should check for duplicate before adding new data or not. If the new data matches any of those already persisted in `TTimmy.ReplyList`, `TTimmy.Add()` stops its operation and return 202, indicating that the operation is not successful.
182
+
-**Description**: `TTimmy.DupesCheck` specifies whether `TTimmy.Add()` should check for duplicate before adding new data or not. If the new data matches any of those already persisted in `TTimmy.ReplyList`, `TTimmy.Add()` stops its operation and returns 202, indicating that the operation is not successful.
183
183
184
184
### function `Remove(MKeywords: TStrArray)`
185
185
-**Source**:
186
186
- v1.0.0: Line 211 ([reference](http://github.com/42tm/timmy/blob/v1.0.0/src/timmy.pas#L211))
187
187
- v1.1.0: Line 213 ([reference](http://github.com/42tm/timmy/blob/v1.1.0/timmy.pas#L213))
188
188
- v1.2.0: Line 216 ([reference](http://github.com/42tm/timmy/blob/v1.2.0/timmy.pas#L216))
189
-
-**Parameters**: `MKeywords` (`QKeywords` in v1.0.0) \[`TStrArray`\]: Keywords clue to delete from the bot's metadata (or more specifically, `TTimmy.MKeywordsList`).
189
+
-**Parameters**: `MKeywords` (`QKeywords` in v1.0.0) \[`TStrArray`\]: Keywords clue to delete from the bot's metadata.
190
190
-**Return**: Integer
191
191
- 102: The instance is not enabled (or initialized)
192
192
- 308: The operation is successful
193
193
-**Visibility**: Public
194
194
-**Availability**: v1.0.0 to v1.2.0
195
-
-**Description**: `TTimmy.Remove()` removes data from the bot's metadata, and as of version 1.2.0, there are 4 overloaded `TTimmy.Remove()`. This one takes a `TStrArray`, find matching arrays (arrays with the same elements in the same order) in `TTimmy.MKeywordsList`, and delete those matching arrays.
195
+
-**Description**: `TTimmy.Remove()` removes data from the bot's metadata, and as of version 1.2.0, there are 4 overloaded `TTimmy.Remove()`. This one takes a `TStrArray`, find matching arrays (arrays with the same elements in the same order) in `TTimmy.MKeywordsList`, and delete those matching arrays. It also deletes the array(s) in `ReplyList` that is/are bond to those matching array(s) of keywords.
196
196
197
197
### function `Remove(KeywordsStr: String)`
198
198
-**Source**:
@@ -267,7 +267,7 @@ Other functions provided by the unit & `TStrArray`
267
267
-**Availability**: v1.0.0 to v1.2.0
268
268
-**Description**: `StrSplit()` splits the string `S` using `delimiter` as delimiter, and returns a `TStrArray` holding the delimited strings.
269
269
270
-
### function CompareStrArrays(ArrayA, ArrayB: TStrArray)
270
+
### function `CompareStrArrays(ArrayA, ArrayB: TStrArray)`
271
271
-**Source**:
272
272
- v1.0.0: Line 130 ([reference](http://github.com/42tm/timmy/blob/v1.0.0/src/timmy.pas#L130))
273
273
- v1.1.0: Line 132 ([reference](http://github.com/42tm/timmy/blob/v1.1.0/timmy.pas#L132))
0 commit comments