Skip to content

Commit a2163c2

Browse files
committed
expand the query types
1 parent 6c4af7a commit a2163c2

File tree

3 files changed

+126
-21
lines changed

3 files changed

+126
-21
lines changed

src/timedtopper/query/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ title: Query
33
---
44

55
<script setup>
6-
import QueryTypes from './query_types.md';
6+
import QueryTypes from "/topper/query/query_types.md";
7+
import TimedQueryTypes from './query_types.md';
78
</script>
89

910
# Query
1011

1112
The query system is the same as the one used in Topper, with the addition that the `<holder>` is the name of the Holder
12-
speficied in the configuration file of TimedTopper.
13+
specified in the configuration file of TimedTopper.
1314

1415
Refer to the [Topper Query](/topper/query/) page for more information.
1516

1617
## Types
1718

1819
<QueryTypes />
20+
<TimedQueryTypes />

src/timedtopper/query/query_types.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,30 @@ defineProps({
1212
</script>
1313

1414

15-
| Type | Argument | Description | Example | Explanation |
16-
|---------------|------------|----------------------------------------------------|--------------------------------------------------------------------------|----------------------------------------------------------------------------------------|
17-
| `remain_time` | | The remaining time in millis until the next reset. | `{{ globalPrefix }}money;remain_time{{ globalSuffix }}` | Retrieve the remaining time in millis until the next reset of the Holder named `money` |
18-
| `remain_time` | `<format>` | The remaining time until the next reset. | `{{ globalPrefix }}money;remain_time;HH:mm:ss{{ globalSuffix }}` | Retrieve the remaining time until the next reset of the Holder named `money` |
19-
| `end_time` | | The time of the next reset in epoch millis. | `{{ globalPrefix }}money;end_time{{ globalSuffix }}` | Retrieve the time of the next reset in epoch millis of the Holder named `money` |
20-
| `end_time` | `<format>` | The time of the next reset. | `{{ globalPrefix }}money;end_time;yyyy-MM-dd HH:mm:ss{{ globalSuffix }}` | Retrieve the time of the next reset of the Holder named `money` |
15+
- `remain_time`
16+
- **Format**:
17+
- `{{ globalPrefix }}<holder>;remain_time{{ globalSuffix }}`
18+
- `{{ globalPrefix }}<holder>;remain_time;<format>{{ globalSuffix }}`
19+
- **Description:** The remaining time until the next reset.
20+
- **Argument:**
21+
- `<holder>`: The name of the Holder
22+
- `<format>`: A time format pattern (e.g., `HH:mm:ss` for hours:minutes:seconds)
23+
- **Example:**
24+
- `{{ globalPrefix }}money;remain_time{{ globalSuffix }}`
25+
- Retrieve the remaining time in millis until the next reset of the Holder named `money`
26+
- `{{ globalPrefix }}money;remain_time;HH:mm:ss{{ globalSuffix }}`
27+
- Retrieve the remaining time until the next reset of the Holder named `money`
28+
29+
- `end_time`
30+
- **Format**:
31+
- `{{ globalPrefix }}<holder>;end_time{{ globalSuffix }}`
32+
- `{{ globalPrefix }}<holder>;end_time;<format>{{ globalSuffix }}`
33+
- **Description:** The time of the next reset.
34+
- **Argument:**
35+
- `<holder>`: The name of the Holder
36+
- `<format>`: A date-time format pattern (e.g., `yyyy-MM-dd HH:mm:ss` for year-month-day hours:minutes:seconds)
37+
- **Example:**
38+
- `{{ globalPrefix }}money;end_time{{ globalSuffix }}`
39+
- Retrieve the time of the next reset in epoch millis of the Holder named `money`
40+
- `{{ globalPrefix }}money;end_time;yyyy-MM-dd HH:mm:ss{{ globalSuffix }}`
41+
- Retrieve the time of the next reset of the Holder named `money`

src/topper/query/query_types.md

Lines changed: 95 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,98 @@ defineProps({
1919
})
2020
</script>
2121

22-
| Type | Argument | Description | Example | Explanation |
23-
|-----------------|-----------------------|--------------------------------------------------------------|---------------------------------------------------------------|--------------------------------------------------------------------------------------------------|
24-
| `top_name` | `<position>` | The name of the player at the specified position. | `{{ globalPrefix }}money;top_name;1{{ globalSuffix }}` | Retrieve the name of the player at the first position in the Top Holder named `money` |
25-
| `top_key` | `<position>` | The UUID of the player at the specified position. | `{{ globalPrefix }}money;top_key;1{{ globalSuffix }}` | Retrieve the UUID of the player at the first position in the Top Holder named `money` |
26-
| `top_value` | `<position>` | The value of the player at the specified position. | `{{ globalPrefix }}money;top_value;1{{ globalSuffix }}` | Retrieve the value of the player at the first position in the Top Holder named `money` |
27-
| `top_value` | `<position>;<format>` | The formatted value of the player at the specified position. | `{{ globalPrefix }}money;top_value;1;#,###{{ globalSuffix }}` | Retrieve the formatted value of the player at the first position in the Top Holder named `money` |
28-
| `top_value_raw` | `<position>` | The raw value of the player at the specified position. | `{{ globalPrefix }}money;top_value_raw;1{{ globalSuffix }}` | Retrieve the raw value of the player at the first position in the Top Holder named `money` |
29-
| `top_rank` | | The rank of the player. | `{{ globalPrefix }}money;top_rank{{ globalSuffix }}` | Retrieve the rank of the player in the Top Holder named `money` |
30-
| `top_rank` | `<format>` | The formatted rank of the player. | `{{ globalPrefix }}money;top_rank;#,###{{ globalSuffix }}` | Retrieve the formatted rank of the player in the Top Holder named `money` |
31-
| `top_size` | | The amount of entries in the Top Holder. | `{{ globalPrefix }}money;top_size{{ globalSuffix }}` | Retrieve the amount of entries in the Top Holder named `money` |
32-
| `value` | | The value of the player. | `{{ playerPrefix }}money;value{{ playerSuffix }}` | Retrieve the value of the player in the Top Holder named `money` |
33-
| `value` | `<format>` | The formatted value of the player. | `{{ playerPrefix }}money;value;#,###{{ playerSuffix }}` | Retrieve the formatted value of the player in the Top Holder named `money` |
34-
| `value_raw` | | The raw value of the player. | `{{ playerPrefix }}money;value_raw{{ playerSuffix }}` | Retrieve the raw value of the player in the Top Holder named `money` |
22+
- `top_name`
23+
- **Format**:
24+
- `{{ globalPrefix }}<holder>;top_name;<position>{{ globalSuffix }}`
25+
- **Description:** The name of the player at the specified position.
26+
- **Argument:**
27+
- `<holder>`: The name of the Holder
28+
- `<position>`: The position of the player in the Holder
29+
- **Example:**
30+
- `{{ globalPrefix }}money;top_name;1{{ globalSuffix }}`
31+
- Retrieve the name of the player at the first position in the Top Holder named `money`
32+
33+
- `top_key`
34+
- **Format**:
35+
- `{{ globalPrefix }}<holder>;top_key;<position>{{ globalSuffix }}`
36+
- **Description:** The UUID of the player at the specified position.
37+
- **Argument:**
38+
- `<holder>`: The name of the Holder
39+
- `<position>`: The position of the player in the Holder
40+
- **Example:**
41+
- `{{ globalPrefix }}money;top_key;1{{ globalSuffix }}`
42+
- Retrieve the UUID of the player at the first position in the Top Holder named `money`
43+
44+
- `top_value`
45+
- **Format**:
46+
- `{{ globalPrefix }}<holder>;top_value;<position>{{ globalSuffix }}`
47+
- `{{ globalPrefix }}<holder>;top_value;<position>;<format>{{ globalSuffix }}`
48+
- **Description:** The value of the player at the specified position.
49+
- **Argument:**
50+
- `<holder>`: The name of the Holder
51+
- `<position>`: The position of the player in the Holder
52+
- `<format>`: A number format pattern, see [Value Display](/topper/extra/value_display/) for more details on how to apply a format
53+
- **Example:**
54+
- `{{ globalPrefix }}money;top_value;1{{ globalSuffix }}`
55+
- Retrieve the value of the player at the first position in the Top Holder named `money`
56+
- `{{ globalPrefix }}money;top_value;1;#,###{{ globalSuffix }}`
57+
- Retrieve the formatted value of the player at the first position in the Top Holder named `money`, in the format of `#,###`
58+
59+
- `top_value_raw`
60+
- **Format**:
61+
- `{{ globalPrefix }}<holder>;top_value_raw;<position>{{ globalSuffix }}`
62+
- **Description:** The raw value of the player at the specified position.
63+
- **Argument:**
64+
- `<holder>`: The name of the Holder
65+
- `<position>`: The position of the player in the Holder
66+
- **Example:**
67+
- `{{ globalPrefix }}money;top_value_raw;1{{ globalSuffix }}`
68+
- Retrieve the raw value of the player at the first position in the Top Holder named `money`
69+
70+
- `top_rank`
71+
- **Format**:
72+
- `{{ globalPrefix }}<holder>;top_rank{{ globalSuffix }}`
73+
- `{{ globalPrefix }}<holder>;top_rank;<format>{{ globalSuffix }}`
74+
- **Description:** The rank of the player.
75+
- **Argument:**
76+
- `<holder>`: The name of the Holder
77+
- `<format>`: A number format pattern (e.g., `#,###` for thousands separator)
78+
- **Example:**
79+
- `{{ globalPrefix }}money;top_rank{{ globalSuffix }}`
80+
- Retrieve the rank of the player in the Top Holder named `money`
81+
- `{{ globalPrefix }}money;top_rank;#,###{{ globalSuffix }}`
82+
- Retrieve the formatted rank of the player in the Top Holder named `money`
83+
84+
- `top_size`
85+
- **Format**:
86+
- `{{ globalPrefix }}<holder>;top_size{{ globalSuffix }}`
87+
- **Description:** The amount of entries in the Top Holder.
88+
- **Argument:**
89+
- `<holder>`: The name of the Holder
90+
- **Example:**
91+
- `{{ globalPrefix }}money;top_size{{ globalSuffix }}`
92+
- Retrieve the amount of entries in the Top Holder named `money`
93+
94+
- `value`
95+
- **Format**:
96+
- `{{ playerPrefix }}<holder>;value{{ playerSuffix }}`
97+
- `{{ playerPrefix }}<holder>;value;<format>{{ playerSuffix }}`
98+
- **Description:** The value of the player.
99+
- **Argument:**
100+
- `<holder>`: The name of the Holder
101+
- `<format>`: A number format pattern, see [Value Display](/topper/extra/value_display/) for more details on how to apply a format
102+
- **Example:**
103+
- `{{ playerPrefix }}money;value{{ playerSuffix }}`
104+
- Retrieve the raw value of the player in the Top Holder named `money`
105+
- `{{ playerPrefix }}money;value;#,###{{ playerSuffix }}`
106+
- Retrieve the formatted value of the player in the Top Holder named `money`
107+
108+
- `value_raw`
109+
- **Format**:
110+
- `{{ playerPrefix }}<holder>;value_raw{{ playerSuffix }}`
111+
- **Description:** The raw value of the player.
112+
- **Argument:**
113+
- `<holder>`: The name of the Holder
114+
- **Example:**
115+
- `{{ playerPrefix }}money;value_raw{{ playerSuffix }}`
116+
- Retrieve the raw value of the player in the Top Holder named `money`

0 commit comments

Comments
 (0)