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

Function isPermissionError

bs/bs.ts:413–423  ·  view source on GitHub ↗
(message: string)

Source from the content-addressed store, hash-verified

411}
412
413function isPermissionError(message: string): boolean {
414 const codes = [
415 "CHAT_WRITE_FORBIDDEN",
416 "USER_BANNED_IN_CHANNEL",
417 "CHAT_ADMIN_REQUIRED",
418 "CHANNEL_PRIVATE",
419 "CHAT_SEND_GIFS_DISABLED",
420 "PEER_FLOOD",
421 ];
422 return codes.some((code) => message.includes(code));
423}
424
425function extractForwardedMessages(result: Api.TypeUpdates): Api.Message[] {
426 const forwarded: Api.Message[] = [];

Callers 1

forwardToTargetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected