MCPcopy Create free account

hub / github.com/Prejudice-Studio/Twilight / functions

Functions2,686 in github.com/Prejudice-Studio/Twilight

↓ 1 callersMethoddeleteUnlinkedEmbyUsers
(dryRun: boolean = false)
webui/src/lib/api.ts:1546
↓ 1 callersMethoddeleteUserBackground
()
webui/src/lib/api.ts:1948
↓ 1 callersMethoddeleteViolation
(id: number)
webui/src/lib/api.ts:2180
↓ 1 callersMethoddetachExpiredInviteChild
(uid: number)
webui/src/lib/api.ts:2396
↓ 1 callersFunctiondetectMediaID
(query string)
internal/api/media_service.go:81
↓ 1 callersMethoddeveloperJSAdminAPI
(vm *goja.Runtime, user *store.User, opts developerJSRunOptions, logs *[]string)
internal/api/telegram_js_commands.go:605
↓ 1 callersMethoddeveloperJSAnnouncementsAPI
developerJSAnnouncementsAPI exposes announcement read/create helpers.
internal/api/telegram_js_generators.go:53
↓ 1 callersFunctiondeveloperJSArraysAPI
(vm *goja.Runtime)
internal/api/telegram_js_commands.go:1689
↓ 1 callersFunctiondeveloperJSBindingNames
()
internal/api/developer_handlers.go:298
↓ 1 callersMethoddeveloperJSCallback
(token string)
internal/api/telegram_js_interactions.go:75
↓ 1 callersFunctiondeveloperJSCallbackActions
(input any)
internal/api/telegram_js_commands.go:1820
↓ 1 callersFunctiondeveloperJSConfigValue
(cfg *config.Config, key string)
internal/api/telegram_js_commands.go:2191
↓ 1 callersMethoddeveloperJSDBAPI
(vm *goja.Runtime, user *store.User, opts developerJSRunOptions, logs *[]string)
internal/api/telegram_js_commands.go:646
↓ 1 callersMethoddeveloperJSDBCount
(name string, user *store.User)
internal/api/telegram_js_commands.go:753
↓ 1 callersFunctiondeveloperJSDBSchema
()
internal/api/telegram_js_commands.go:704
↓ 1 callersFunctiondeveloperJSDocs
()
internal/api/developer_handlers.go:305
↓ 1 callersFunctiondeveloperJSEnvValue
(key string)
internal/api/telegram_js_commands.go:2237
↓ 1 callersMethoddeveloperJSExtendUserExpiry
developerJSExtendUserExpiry adds the given number of days on top of the user's current expiry (or now, whichever is later), then delegates the actual
internal/api/telegram_js_commands.go:1273
↓ 1 callersMethoddeveloperJSFetchAPI
(vm *goja.Runtime, opts developerJSRunOptions, logs *[]string)
internal/api/telegram_js_commands.go:1997
↓ 1 callersFunctiondeveloperJSFormatAPI
(vm *goja.Runtime)
internal/api/telegram_js_commands.go:1926
↓ 1 callersMethoddeveloperJSGetRegcode
developerJSGetRegcode returns a single masked registration code snapshot. Admin-only.
internal/api/telegram_js_generators.go:70
↓ 1 callersFunctiondeveloperJSGojaVersion
()
internal/api/developer_handlers.go:698
↓ 1 callersMethoddeveloperJSInline
(ctx context.Context, c telegramCommandCtx, opts developerJSRunOptions, text string, rawActions any, logs *[]s
internal/api/telegram_js_commands.go:1772
↓ 1 callersFunctiondeveloperJSInputAPI
(vm *goja.Runtime, args []string, commandName string, privateChat bool, preview bool)
internal/api/telegram_js_commands.go:385
↓ 1 callersMethoddeveloperJSInteractionsAPI
(vm *goja.Runtime, c telegramCommandCtx, opts developerJSRunOptions, logs *[]string)
internal/api/telegram_js_commands.go:1761
↓ 1 callersMethoddeveloperJSInvitesAPI
developerJSInvitesAPI exposes admin-only invite code generation helpers.
internal/api/telegram_js_generators.go:36
↓ 1 callersMethoddeveloperJSListMediaRequests
developerJSListMediaRequests returns media request snapshots. Admins see all requests; non-admin users only receive their own.
internal/api/telegram_js_commands.go:955
↓ 1 callersMethoddeveloperJSListPresets
developerJSListPresets returns developer JS preset metadata (no code bodies). Admin-only.
internal/api/telegram_js_commands.go:1011
↓ 1 callersMethoddeveloperJSListTickets
developerJSListTickets returns ticket snapshots. Admins see all tickets; non-admin users only receive their own.
internal/api/telegram_js_commands.go:990
↓ 1 callersFunctiondeveloperJSMediaRequestSnapshot
(m store.MediaRequest)
internal/api/telegram_js_commands.go:855
↓ 1 callersFunctiondeveloperJSPresetSnapshot
(p store.DeveloperJSPreset)
internal/api/telegram_js_commands.go:904
↓ 1 callersMethoddeveloperJSQuickAnnouncement
developerJSQuickAnnouncement adapts the positional post(title, content, level?) form to developerJSCreateAnnouncement.
internal/api/telegram_js_generators.go:439
↓ 1 callersMethoddeveloperJSQuickInvite
developerJSQuickInvite adapts the positional quick(days?) form to developerJSGenerateInviteCode.
internal/api/telegram_js_generators.go:429
↓ 1 callersMethoddeveloperJSQuickRegcode
developerJSQuickRegcode adapts the positional quick(days?, count?, type?) form to the options-object developerJSGenerateRegcode, so scripts can omit t
internal/api/telegram_js_generators.go:413
↓ 1 callersMethoddeveloperJSRegcodesAPI
developerJSRegcodesAPI exposes admin-only registration / renewal code generation helpers to the Telegram custom-command JS sandbox. Read helpers reuse
internal/api/telegram_js_generators.go:16
↓ 1 callersMethoddeveloperJSSystemAPI
(vm *goja.Runtime, user *store.User)
internal/api/telegram_js_commands.go:1520
↓ 1 callersFunctiondeveloperJSTemplate
(template string, data any)
internal/api/telegram_js_commands.go:2174
↓ 1 callersFunctiondeveloperJSTextAPI
(vm *goja.Runtime)
internal/api/telegram_js_commands.go:1635
↓ 1 callersFunctiondeveloperJSTicketSnapshot
(t store.Ticket)
internal/api/telegram_js_commands.go:888
↓ 1 callersFunctiondeveloperJSTimeAPI
(vm *goja.Runtime)
internal/api/telegram_js_commands.go:1896
↓ 1 callersMethoddeveloperJSUpdateCurrentUser
(vm *goja.Runtime, user *store.User, opts developerJSRunOptions, logs *[]string, patch any)
internal/api/telegram_js_commands.go:1450
↓ 1 callersMethoddeveloperJSUserExists
developerJSUserExists reports whether a user with the given UID exists. It reuses the getUser visibility rule: admins may probe any UID, normal users
internal/api/telegram_js_commands.go:1309
↓ 1 callersFunctiondeveloperJSUserMatches
(u store.User, query string)
internal/api/telegram_js_commands.go:1040
↓ 1 callersMethoddeveloperJSUsersAPI
(vm *goja.Runtime, user *store.User, opts developerJSRunOptions, logs *[]string)
internal/api/telegram_js_commands.go:482
↓ 1 callersFunctiondeveloperJSValidateFetchHost
(ctx context.Context, host string)
internal/api/telegram_js_commands.go:2085
↓ 1 callersMethoddeveloperJSWaitText
(ctx context.Context, c telegramCommandCtx, opts developerJSRunOptions, rawOptions any, logs *[]string)
internal/api/telegram_js_commands.go:1853
↓ 1 callersFunctiondeveloperJSWasExit
(err error)
internal/api/telegram_js_commands.go:323
↓ 1 callersFunctiondeviceHaystack
(u: EmbyAuditUser, d: EmbyAuditDevice)
webui/src/components/admin/emby-device-audit-panel.tsx:114
↓ 1 callersFunctiondeviceIDSet
(devices []Device)
internal/store/device_limit_test.go:89
↓ 1 callersFunctiondeviceMatchesCategory
( u: EmbyAuditUser, d: EmbyAuditDevice, category: CategoryKey, )
webui/src/components/admin/emby-device-audit-panel.tsx:142
↓ 1 callersMethoddrain
()
internal/api/runtime_logs.go:261
↓ 1 callersMethoddto
()
internal/api/telegram.go:385
↓ 1 callersFunctiondummyPasswordHash
dummyPasswordHash 返回一份用当前默认参数(PBKDF2-600k)生成的占位哈希, 用于用户名不存在时跑等代价校验。首次调用时惰性生成(~150ms 一次性成本), 之后复用。生成失败(crypto/rand 故障,极罕见)时返回空串——此时 VerifyPassword 会快速返
internal/api/password_verify.go:49
↓ 1 callersFunctionemailCodeProcessSecret
()
internal/api/email_verify_service.go:48
↓ 1 callersMethodemailCodeSecret
emailCodeSecret 优先用配置里的 BotInternalSecret 派生(跨重启稳定),缺省回退到 进程级随机密钥。加前缀做域分隔,避免和其它复用 BotInternalSecret 的场景撞用途。
internal/api/email_verify_service.go:61
↓ 1 callersFunctionemailVerifyResultToResponse
(rec store.EmailVerification, result store.EmailVerificationResult)
internal/api/email_verify_service.go:245
↓ 1 callersFunctionembyAdminRestrictionAllowed
(method, requestPath string)
internal/api/emby.go:210
↓ 1 callersFunctionembyAuditLocalUser
embyAuditLocalUser 把本地账号映射成审查视图需要的完整信息:网页账号、Emby 账号 与 Telegram 绑定都在这里一次性带出,方便管理员在一处核对一个人的全部身份。
internal/api/emby_device_audit.go:165
↓ 1 callersMethodembyCreateUser
(ctx context.Context, username, password string)
internal/api/emby.go:251
↓ 1 callersMethodembyDeleteUser
embyDeleteUser 从 Emby 删除指定用户。仅用于调度任务清理未绑定 Web 的孤立 Emby 账号。
internal/api/emby.go:352
↓ 1 callersMethodembyDisableUserForUnbind
(ctx context.Context, userID string)
internal/api/emby.go:396
↓ 1 callersFunctionembyErrorIsRetryable
embyErrorIsRetryable 区分"重试可能成功"vs"重试只会复读相同错误"。 5xx 与连接级错误归前者;4xx / ctx-canceled / DNS 解析失败归后者。
internal/api/emby.go:67
↓ 1 callersMethodembyFindByProviderID
(ctx context.Context, provider, id, mediaType string)
internal/api/emby_inventory.go:43
↓ 1 callersMethodembyFindByTitle
(ctx context.Context, title, originalTitle, mediaType string, year int)
internal/api/emby_inventory.go:162
↓ 1 callersMethodembyHealthFast
embyHealthFast 是 embyHealth 的 1.5 秒超时版本,专用于"系统首页摘要" 这类不能阻塞用户响应的场景。
internal/api/emby.go:172
↓ 1 callersFunctionembyMatchingFilter
()
webui/src/app/(main)/admin/users/page.tsx:400
↓ 1 callersFunctionembyRemoteDisabled
(user map[string]any)
internal/api/scheduler_runner.go:728
↓ 1 callersMethodembySeriesSeasons
(ctx context.Context, seriesID string)
internal/api/emby_inventory.go:70
↓ 1 callersFunctionembyTitleMatches
(title string, item map[string]any)
internal/api/emby_inventory.go:240
↓ 1 callersMethodenableRejoinedTelegramUsers
重新校验并启用已经回到 Telegram 群聊的禁用用户。
webui/src/lib/api.ts:1628
↓ 1 callersFunctionendpointDocumented
endpointDocumented 用最宽松的"包含"语义:任意 docs/*.md 出现归一化后的 "METHOD PATH" 字符串就算通过——不强求章节编排,只确保有人提过它。 也接受常见格式变体: GET /api/v1/x/{id} `GET` `/api/v1/x/{id}`
scripts/check_docs_drift.go:302
↓ 1 callersMethodensureBangumiCollection
(ctx context.Context, subjectID string, headers map[string]string)
internal/api/bangumi_sync_service.go:148
↓ 1 callersFunctionensureBucket
(key: string)
webui/src/app/(main)/admin/config/page.tsx:912
↓ 1 callersFunctionepisodeSuffix
(ep int)
internal/api/bangumi_sync_service.go:104
↓ 1 callersFunctionescapeCssUrlValue
(value: string)
webui/src/lib/safe-url.ts:35
↓ 1 callersMethodevictEmbyAdminCacheLocked
evictEmbyAdminCacheLocked 必须持有 embyAdminMu 调用: 1. 先扫一遍淘汰过期项(>5min) 2. 若仍 ≥ max,丢掉 checked 最早的一项(防 OOM 兜底)
internal/api/emby.go:127
↓ 1 callersFunctionexecuteMigration
()
webui/src/app/(main)/admin/database/page.tsx:301
↓ 1 callersFunctionexpiryFromDays
(days int, base time.Time)
internal/api/business.go:175
↓ 1 callersFunctionextractProtectedAdminConfig
(content string)
internal/api/config_admin.go:681
↓ 1 callersFunctionextractUploadReference
(raw string)
internal/api/admin_jobs.go:343
↓ 1 callersMethodfail
(code string, failure bindCodeFailure)
internal/api/bind_status_hub.go:169
↓ 1 callersMethodfailure
(code string, now int64)
internal/api/bind_status_hub.go:205
↓ 1 callersFunctionfetchStatus
(signal: AbortSignal)
webui/src/hooks/use-bind-code-status.ts:81
↓ 1 callersFunctionfilepathJoin
(parts ...string)
internal/api/system_update.go:376
↓ 1 callersMethodfilteredBatchRegcodeCodes
filteredBatchRegcodeCodes 按与 handleListRegcodes 完全一致的筛选口径 (type / status / source / search)解析“选中全部匹配”要删除的注册码集合, 并扣除前端 exclude_codes 中明确排除的码。filter 口径必
internal/api/regcode_handlers.go:449
↓ 1 callersMethodfilteredBatchUserUIDs
(payload map[string]any, limit int)
internal/api/batch_user_handlers.go:427
↓ 1 callersMethodfilteredUsers
(payload map[string]any)
internal/api/admin_extra.go:999
↓ 1 callersFunctionfindBareSetting
(settings map[string]any, key string)
internal/config/config.go:1130
↓ 1 callersFunctionfindRepoRoot
()
scripts/check_docs_drift.go:207
↓ 1 callersFunctionfirstNonZeroInt64
(values ...int64)
internal/api/telegram_inline.go:962
↓ 1 callersMethodforceUnbindUser
(uid: number, scope: "telegram" | "emby" | "both" = "both")
webui/src/lib/api.ts:845
↓ 1 callersMethodforgotPasswordByEmby
(data: { emby_username: string; emby_password: string })
webui/src/lib/api.ts:2163
↓ 1 callersFunctionformatCommandReplyMap
(value map[string]any)
internal/api/config_admin.go:1368
↓ 1 callersFunctionformatDate
(date: string | null | undefined)
webui/src/app/(main)/score/page.tsx:27
↓ 1 callersFunctionformatDate
(timestamp: number | null)
webui/src/app/(main)/settings/apikey/page.tsx:196
↓ 1 callersFunctionformatDuration
(seconds: number)
webui/src/app/(main)/admin/bangumi/page.tsx:23
↓ 1 callersFunctionformatExpires
(unix: number | null | undefined, locale: string, neverExpires: string)
webui/src/app/(main)/invite/page.tsx:39
↓ 1 callersFunctionformatNumber
(num: number)
webui/src/lib/utils.ts:84
↓ 1 callersFunctionformatRelative
(ts: number, locale: string)
webui/src/app/(main)/score/page.tsx:32
↓ 1 callersFunctionformatRelativeTime
(date: string | Date | number)
webui/src/lib/utils.ts:92
← previousnext →1,201–1,300 of 2,686, ranked by callers