MCPcopy Create free account
hub / github.com/Botloader/botloader / from

Method from

components/runtime-models/src/internal/member.rs:68–89  ·  view source on GitHub ↗
(v: twilight_model::guild::Member)

Source from the content-addressed store, hash-verified

66
67impl From<twilight_model::guild::Member> for Member {
68 fn from(v: twilight_model::guild::Member) -> Self {
69 Self {
70 deaf: v.deaf,
71 joined_at: NotBigU64(
72 v.joined_at
73 .unwrap_or(Timestamp::from_micros(0).unwrap())
74 .as_micros() as u64
75 / 1000,
76 ),
77 mute: v.mute,
78 nick: v.nick,
79 pending: v.pending,
80 premium_since: v
81 .premium_since
82 .map(|v| NotBigU64(v.as_micros() as u64 / 1000)),
83 roles: v.roles.iter().map(ToString::to_string).collect(),
84 communication_disabled_until: v
85 .communication_disabled_until
86 .map(|ts| NotBigU64(ts.as_micros() as u64 / 1000)),
87 user: v.user.into(),
88 }
89 }
90}
91
92impl Member {

Callers

nothing calls this directly

Calls 1

NotBigU64Class · 0.85

Tested by

no test coverage detected