Skip to content

ResourceContext

Defined in: packages/structures/src/base.ts:35

What a structure uses to act on Discord (send, edit, fetch, compute permissions). Client supplies it; tests can supply their own.

optional addMemberRole(guildId, userId, roleId, reason?): Promise<void>

Defined in: packages/structures/src/base.ts:116

string

string

string

string

Promise<void>


optional addReaction(channelId, messageId, emoji): Promise<void>

Defined in: packages/structures/src/base.ts:59

string

string

string

Promise<void>


optional banMember(guildId, userId, options?): Promise<void>

Defined in: packages/structures/src/base.ts:105

string

string

number

string

Promise<void>


optional cachedChannel(channelId): Channel | undefined

Defined in: packages/structures/src/base.ts:92

The cached channel, when the client has a complete one (not a partial placeholder).

string

Channel | undefined


optional collectInteractions(options): Collector<string, Interaction<InteractionData>>

Defined in: packages/structures/src/base.ts:129

Collects the client’s interactions (a Collector over interactionCreate). Used by message and interaction collectors.

CollectorOptions<Interaction<InteractionData>>

Collector<string, Interaction<InteractionData>>


crosspostMessage(channelId, messageId): Promise<Message>

Defined in: packages/structures/src/base.ts:50

string

string

Promise<Message>


optional deleteChannel(channelId, reason?): Promise<void>

Defined in: packages/structures/src/base.ts:58

string

string

Promise<void>


deleteMessage(channelId, messageId, reason?): Promise<void>

Defined in: packages/structures/src/base.ts:45

string

string

string

Promise<void>


optional editChannel(channelId, options): Promise<Channel>

Defined in: packages/structures/src/base.ts:54

string

Record<string, unknown>

Promise<Channel>


optional editMember(guildId, userId, options, reason?): Promise<GuildMember>

Defined in: packages/structures/src/base.ts:110

string

string

Record<string, unknown>

string

Promise<GuildMember>


editMessage(channelId, messageId, options): Promise<Message>

Defined in: packages/structures/src/base.ts:40

string

string

MessageEditOptions

Promise<Message>


optional editPermissionOverwrite(channelId, targetId, changes, options?): Promise<void>

Defined in: packages/structures/src/base.ts:137

string

string

PermissionOverwriteChanges

string

0 | 1

Promise<void>


optional kickMember(guildId, userId, reason?): Promise<void>

Defined in: packages/structures/src/base.ts:100

string

string

string

Promise<void>


optional memberPermissions(guildId, memberId, roleIds, channelId?, timedOutUntil?): PermissionSet | null

Defined in: packages/structures/src/base.ts:93

string

string

readonly string[]

string

Date | null

PermissionSet | null


optional pinMessage(channelId, messageId, reason?): Promise<void>

Defined in: packages/structures/src/base.ts:76

string

string

string

Promise<void>


optional removeAllReactions(channelId, messageId): Promise<void>

Defined in: packages/structures/src/base.ts:75

string

string

Promise<void>


optional removeMemberRole(guildId, userId, roleId, reason?): Promise<void>

Defined in: packages/structures/src/base.ts:122

string

string

string

string

Promise<void>


optional removeOwnReaction(channelId, messageId, emoji): Promise<void>

Defined in: packages/structures/src/base.ts:64

string

string

string

Promise<void>


optional removeReaction(channelId, messageId, emoji, userId): Promise<void>

Defined in: packages/structures/src/base.ts:69

string

string

string

string

Promise<void>


sendMessage(channelId, options): Promise<Message>

Defined in: packages/structures/src/base.ts:36

string

MessageCreateOptions

Promise<Message>


optional unpinMessage(channelId, messageId, reason?): Promise<void>

Defined in: packages/structures/src/base.ts:81

string

string

string

Promise<void>