Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
0836066
feat: Implemented message interaction_metadata.
LittleEngineer Nov 12, 2025
1b1c841
Merge branch 'Botloader:master' into master
LittleEngineer Nov 12, 2025
4a1974d
fix: Implementation of message interaction_metadata.
LittleEngineer Nov 12, 2025
1e97158
chore: add support for Message.InteractionMetadata
LittleEngineer Nov 13, 2025
ef2bb82
fix: message interaction spelling mistake of targetuser property
LittleEngineer Nov 13, 2025
b3315cd
Merge branch 'master' into master
LittleEngineer Nov 13, 2025
d3f8b23
Merge branch 'Botloader:master' into master
LittleEngineer Apr 22, 2026
c167dd2
Updated to twilight 17.1, fixed user and message command validation.
LittleEngineer May 7, 2026
2441330
Added message snapshots (forwards), and the ability to set default co…
LittleEngineer May 24, 2026
d47e84f
Fix: Fixed message forwards to ensure same guild.
LittleEngineer May 24, 2026
a11710b
feat: added the ability to create a typing indicator
LittleEngineer May 24, 2026
4cb690e
Removed unnecessary build file, updated main .gitignore, and added .g…
LittleEngineer May 24, 2026
fe4e5d2
Fixed error in interaction processing of certain select menus and mov…
LittleEngineer Jun 12, 2026
6c95a1a
Slightly improvement to component related stuff.
LittleEngineer Jun 23, 2026
9a17c5c
Changed `undefined` to `null` within components and added accessors f…
LittleEngineer Jun 29, 2026
d1b0929
Added role icons, gave some attention to forums, and updated twilight…
LittleEngineer Jul 3, 2026
3d4a3b4
Merge remote-tracking branch 'upstream/master'
LittleEngineer Jul 3, 2026
f66b499
Resolving merge conflicts and updated cargo lock (to resolve conflicts)
LittleEngineer Jul 3, 2026
cbedcc7
Added pin and unpin methods to public threads.
LittleEngineer Jul 4, 2026
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
1,451 changes: 602 additions & 849 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ oauth2 = "4.4.2"
image = { version = "0.25.1", git = "https://github.com/image-rs/image.git", rev = "6e73a1780b659987acff81849b22a0257da47069" }
base64-simd = "0.8.0"

twilight-model = { version = "0.17.1", git = "https://github.com/LittleEngineer/twilight.git", rev = "6d1586d3b77f3c01471765e29ca29224829fed81" }
twilight-model = { version = "0.17.1", git = "https://github.com/jonastar/twilight.git", rev = "164dfea81de2823377c3425bf3f138d1363de4dd" }
twilight-http = { version = "0.17.1", features = [
"rustls-platform-verifier",
], git = "https://github.com/LittleEngineer/twilight.git", rev = "6d1586d3b77f3c01471765e29ca29224829fed81" }
twilight-gateway = { version = "0.17.1", git = "https://github.com/LittleEngineer/twilight.git", rev = "6d1586d3b77f3c01471765e29ca29224829fed81" }
twilight-cache-inmemory = { version = "0.17.1", git = "https://github.com/LittleEngineer/twilight.git", rev = "6d1586d3b77f3c01471765e29ca29224829fed81" }
], git = "https://github.com/jonastar/twilight.git", rev = "164dfea81de2823377c3425bf3f138d1363de4dd" }
twilight-gateway = { version = "0.17.1", git = "https://github.com/jonastar/twilight.git", rev = "164dfea81de2823377c3425bf3f138d1363de4dd" }
twilight-cache-inmemory = { version = "0.17.1", git = "https://github.com/jonastar/twilight.git", rev = "164dfea81de2823377c3425bf3f138d1363de4dd" }
twilight-util = { version = "0.17.0", features = [
"permission-calculator",
], git = "https://github.com/LittleEngineer/twilight.git", rev = "6d1586d3b77f3c01471765e29ca29224829fed81" }
twilight-validate = { version = "0.17.0", git = "https://github.com/LittleEngineer/twilight.git", rev = "6d1586d3b77f3c01471765e29ca29224829fed81" }
], git = "https://github.com/jonastar/twilight.git", rev = "164dfea81de2823377c3425bf3f138d1363de4dd" }
twilight-validate = { version = "0.17.0", git = "https://github.com/jonastar/twilight.git", rev = "164dfea81de2823377c3425bf3f138d1363de4dd" }

# twilight-model = { version = "0.16.0", path = "../forklight/twilight-model" }
# twilight-http = { version = "0.16.0", path = "../forklight/twilight-http" }
Expand Down
105 changes: 105 additions & 0 deletions components/runtime-models/src/discord/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,108 @@ impl From<PermissionOverwriteType>
}
}
}

#[derive(Clone, Copy, Debug, Serialize, Deserialize, TS)]
#[ts(export)]
#[ts(export_to = "bindings/discord/ForumLayout.ts")]
pub enum ForumLayout {
GalleryView,
ListView,
NotSet,
}

impl From<twilight_model::channel::forum::ForumLayout> for ForumLayout {
fn from(v: twilight_model::channel::forum::ForumLayout) -> Self {
match v {
twilight_model::channel::forum::ForumLayout::GalleryView => Self::GalleryView,
twilight_model::channel::forum::ForumLayout::ListView => Self::ListView,
twilight_model::channel::forum::ForumLayout::NotSet => Self::NotSet,
_ => todo!(),
}
}
}

impl From<ForumLayout> for twilight_model::channel::forum::ForumLayout {
fn from(v: ForumLayout) -> Self {
match v {
ForumLayout::GalleryView => Self::GalleryView,
ForumLayout::ListView => Self::ListView,
ForumLayout::NotSet => Self::NotSet,
}
}
}

#[derive(Clone, Copy, Debug, Serialize, Deserialize, TS)]
#[ts(export)]
#[ts(export_to = "bindings/discord/ForumSortOrder.ts")]
pub enum ForumSortOrder {
CreationDate,
LatestActivity,
}

impl From<twilight_model::channel::forum::ForumSortOrder> for ForumSortOrder {
fn from(v: twilight_model::channel::forum::ForumSortOrder) -> Self {
match v {
twilight_model::channel::forum::ForumSortOrder::CreationDate => Self::CreationDate,
twilight_model::channel::forum::ForumSortOrder::LatestActivity => Self::LatestActivity,
_ => todo!(),
}
}
}

impl From<ForumSortOrder> for twilight_model::channel::forum::ForumSortOrder {
fn from(v: ForumSortOrder) -> Self {
match v {
ForumSortOrder::CreationDate => Self::CreationDate,
ForumSortOrder::LatestActivity => Self::LatestActivity,
}
}
}

#[derive(Clone, Copy, Debug, Serialize, Deserialize, TS)]
#[ts(export)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "bindings/discord/ChannelFlags.ts")]
pub struct ChannelFlags {
#[serde(default, skip_serializing_if = "Option::is_none")]
#[ts(optional)]
pub pinned: Option<bool>, // 1 << 0 this thread is pinned to the top of its parent GUILD_FORUM or GUILD_MEDIA channel
#[serde(default, skip_serializing_if = "Option::is_none")]
#[ts(optional)]
pub require_tag: Option<bool>, // 1 << 4 whether a tag is required to be specified when creating a thread in a GUILD_FORUM or a GUILD_MEDIA channel. Tags are specified in the applied_tags field.
#[serde(default, skip_serializing_if = "Option::is_none")]
#[ts(optional)]
pub hide_media_download_options: Option<bool>, // 1 << 15 when set hides the embedded media download options. Available only for media channels
}

impl From<twilight_model::channel::ChannelFlags> for ChannelFlags {
fn from(v: twilight_model::channel::ChannelFlags) -> Self {
use twilight_model::channel::ChannelFlags as TwilightChannelFlags;

Self {
pinned: Some(v.contains(TwilightChannelFlags::PINNED)),
require_tag: Some(v.contains(TwilightChannelFlags::REQUIRE_TAG)),
hide_media_download_options: Some(v.contains(TwilightChannelFlags::HIDE_MEDIA_DOWNLOAD_OPTIONS)),
}
}
}

impl From<ChannelFlags> for twilight_model::channel::ChannelFlags {
fn from(v: ChannelFlags) -> Self {
let mut out = Self::empty();

if matches!(v.pinned, Some(true)) {
out |= Self::PINNED;
}

if matches!(v.require_tag, Some(true)) {
out |= Self::REQUIRE_TAG;
}

if matches!(v.hide_media_download_options, Some(true)) {
out |= Self::HIDE_MEDIA_DOWNLOAD_OPTIONS;
}

out
}
}
Loading