Total Complexity | 6 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from pathlib import Path |
||
2 | |||
3 | from . import script |
||
4 | |||
5 | FUNCTIONS = Path(__file__).parent / "slack.applescript" |
||
6 | |||
7 | |||
8 | def activate() -> bool: |
||
9 | return script.call(FUNCTIONS, "activate()") |
||
10 | |||
11 | |||
12 | def ready(workspace: str) -> bool: |
||
13 | return script.call(FUNCTIONS, f'ready("{workspace}")', show_error=False) |
||
14 | |||
15 | |||
16 | def signin(workspace: str) -> bool: |
||
17 | return script.call(FUNCTIONS, f'signin("{workspace}")') |
||
18 | |||
19 | |||
20 | def signout(workspace: str) -> bool: |
||
21 | return script.call(FUNCTIONS, f'signout("{workspace}")', show_error=False) |
||
22 | |||
23 | |||
24 | def mute(workspace: str, channel: str) -> bool: |
||
25 | return script.call(FUNCTIONS, f'mute("{workspace}", "{channel}")') |
||
26 | |||
27 | |||
28 | def unmute(workspace: str, channel: str) -> bool: |
||
29 | return script.call(FUNCTIONS, f'unmute("{workspace}", "{channel}")') |
||
30 |