MCPcopy Create free account
hub / github.com/ScattrdBlade/bigFileUpload / getGuildIdForChannel

Function getGuildIdForChannel

index.tsx:41–49  ·  view source on GitHub ↗
(channelId: string | null | undefined)

Source from the content-addressed store, hash-verified

39};
40
41function getGuildIdForChannel(channelId: string | null | undefined): string | null {
42 if (!channelId) return null;
43 try {
44 const channel = ChannelStore.getChannel(channelId) as { getGuildId?: () => string | null; guild_id?: string | null; } | null;
45 return channel?.getGuildId?.() ?? channel?.guild_id ?? null;
46 } catch {
47 return null;
48 }
49}
50
51function shouldInterceptUploadFiles(files: readonly File[], guildId: string | null): boolean {
52 if (!settings.store.bypassDiscordUploadOnlyOverLimit) return true;

Callers 3

interceptUploadAddFilesFunction · 0.85
handlePasteFunction · 0.85
handleFileDropFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected