MCPcopy Create free account
hub / github.com/Streamerbot/client / fetch

Function fetch

packages/vue/src/composables/useGlobalVariable.ts:47–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45
46 client?.on('Misc.GlobalVariableUpdated', ({ data }) => {
47 if ('name' in data && 'newValue' in data && 'lastWrite' in data && data.name === name) {
48 value.value = data.newValue as T;
49 lastWrite.value = data.lastWrite as string;
50 }
51 });
52 },
53 { immediate: true },
54 );
55
56 async function fetch() {
57 const response = await client?.value?.getGlobal<T>(name, _options?.value.persisted !== false);
58 if (response?.status === 'ok' && response.variable) {

Callers 2

useGlobalVariableFunction · 0.85
fetchAvatarFunction · 0.85

Calls 1

warnMethod · 0.80

Tested by

no test coverage detected