MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / sh

Function sh

sub/sub.ts:18–25  ·  view source on GitHub ↗
(cmd: string)

Source from the content-addressed store, hash-verified

16
17// 执行命令
18function sh(cmd: string): Promise<string> {
19 return new Promise((resolve, reject) => {
20 exec(cmd, { shell: "/bin/bash" }, (err, stdout, stderr) => {
21 if (err) reject(stderr || err.message);
22 else resolve(stdout);
23 });
24 });
25}
26
27// 检查是否在收藏夹
28async function isSavedMessages(msg: Api.Message): Promise<boolean> {

Callers 4

checkDockerIntegrityFunction · 0.85
getSubStoreVersionFunction · 0.85
getRemoteVersionFunction · 0.85
SubStorePluginClass · 0.85

Calls 1

execFunction · 0.85

Tested by

no test coverage detected