cordscript 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cordscript/__init__.py +6 -0
- cordscript/client.py +590 -0
- cordscript/core/__init__.py +9 -0
- cordscript/core/context.py +33 -0
- cordscript/core/runtime.py +55 -0
- cordscript/core/variables.py +16 -0
- cordscript/exceptions/__init__.py +3 -0
- cordscript/exceptions/errors.py +9 -0
- cordscript/functions/__init__.py +45 -0
- cordscript/functions/database/__init__.py +4 -0
- cordscript/functions/database/database.py +846 -0
- cordscript/functions/database/store.py +69 -0
- cordscript/functions/discord/__init__.py +15 -0
- cordscript/functions/discord/components.py +134 -0
- cordscript/functions/discord/componentsv2.py +92 -0
- cordscript/functions/discord/embed.py +63 -0
- cordscript/functions/discord/interaction.py +48 -0
- cordscript/functions/discord/logic.py +87 -0
- cordscript/functions/discord/message.py +51 -0
- cordscript/functions/discord/moderation.py +179 -0
- cordscript/functions/discord/status.py +56 -0
- cordscript/functions/users/__init__.py +3 -0
- cordscript/functions/users/user.py +103 -0
- cordscript/functions/utility/__init__.py +14 -0
- cordscript/functions/utility/cooldown.py +35 -0
- cordscript/functions/utility/http.py +73 -0
- cordscript/functions/utility/json.py +201 -0
- cordscript/functions/utility/math.py +102 -0
- cordscript/functions/utility/random.py +27 -0
- cordscript/functions/utility/strings.py +201 -0
- cordscript/functions/utility/time.py +41 -0
- cordscript/parser.py +190 -0
- cordscript/setup.py +38 -0
- cordscript-1.0.0.dist-info/METADATA +17 -0
- cordscript-1.0.0.dist-info/RECORD +37 -0
- cordscript-1.0.0.dist-info/WHEEL +5 -0
- cordscript-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class VariableStore:
|
|
5
|
+
def __init__(self):
|
|
6
|
+
self._vars: dict[str, str] = {}
|
|
7
|
+
self._split_cache: list[str] = []
|
|
8
|
+
|
|
9
|
+
def get(self, name: str) -> str:
|
|
10
|
+
return self._vars.get(name, "")
|
|
11
|
+
|
|
12
|
+
def set(self, name: str, value: str):
|
|
13
|
+
self._vars[name] = value
|
|
14
|
+
|
|
15
|
+
def all(self) -> dict[str, str]:
|
|
16
|
+
return self._vars
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
from .discord import (
|
|
2
|
+
handle_message,
|
|
3
|
+
handle_interaction,
|
|
4
|
+
handle_embed,
|
|
5
|
+
handle_components,
|
|
6
|
+
handle_componentsv2,
|
|
7
|
+
handle_logic,
|
|
8
|
+
handle_moderation,
|
|
9
|
+
handle_status,
|
|
10
|
+
_flush_select,
|
|
11
|
+
_flush_row,
|
|
12
|
+
)
|
|
13
|
+
from .users import handle_user
|
|
14
|
+
from .database import handle_database
|
|
15
|
+
from .utility import (
|
|
16
|
+
handle_math,
|
|
17
|
+
handle_time,
|
|
18
|
+
handle_random,
|
|
19
|
+
handle_http,
|
|
20
|
+
handle_cooldown,
|
|
21
|
+
handle_json,
|
|
22
|
+
handle_strings,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
__all__ = [
|
|
26
|
+
"handle_message",
|
|
27
|
+
"handle_interaction",
|
|
28
|
+
"handle_embed",
|
|
29
|
+
"handle_components",
|
|
30
|
+
"handle_componentsv2",
|
|
31
|
+
"handle_logic",
|
|
32
|
+
"handle_moderation",
|
|
33
|
+
"handle_status",
|
|
34
|
+
"_flush_select",
|
|
35
|
+
"_flush_row",
|
|
36
|
+
"handle_user",
|
|
37
|
+
"handle_database",
|
|
38
|
+
"handle_math",
|
|
39
|
+
"handle_time",
|
|
40
|
+
"handle_random",
|
|
41
|
+
"handle_http",
|
|
42
|
+
"handle_cooldown",
|
|
43
|
+
"handle_json",
|
|
44
|
+
"handle_strings",
|
|
45
|
+
]
|