Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/discord-bitflag/src/flags/attachment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { BitFlags } from "bitflag-js";

export const AttachmentFlags = Object.freeze({
IsClip: 1n << 0n,
IsThumbnail: 1n << 1n,
IsRemix: 1n << 2n,
IsSpoiler: 1n << 3n,
IsAnimated: 1n << 5n,
}) satisfies BitFlags;
3 changes: 3 additions & 0 deletions packages/discord-bitflag/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ export { BitField, type BitFlagResolvable, type BitFlags } from "bitflag-js";
export { ApplicationFlags } from "./flags/application.js";
export { ApplicationFlagsBitField } from "./wrappers/applications.js";

export { AttachmentFlags } from "./flags/attachment.js";
export { AttachmentFlagsBitField } from "./wrappers/attachments.js";

export { ChannelFlags } from "./flags/channel.js";
export { ChannelFlagsBitField } from "./wrappers/channels.js";

Expand Down
6 changes: 6 additions & 0 deletions packages/discord-bitflag/src/wrappers/attachments.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { BitField } from "bitflag-js";
import { AttachmentFlags } from "../flags/attachment.js";

export class AttachmentFlagsBitField extends BitField {
static ALL = BitField.resolve(Object.values(AttachmentFlags));
}