Fix outdated launcher check

This commit is contained in:
TheKodeToad 2024-05-01 01:43:39 +01:00 committed by Sefa Eyeoglu
parent e4ef3d0c66
commit e949ff445e
2 changed files with 22 additions and 7 deletions

View file

@ -8,3 +8,11 @@ pub fn embed_author_from_user(user: &User) -> CreateEmbedAuthor {
.unwrap_or_else(|| user.default_avatar_url()),
)
}
pub fn semver_split(version: &str) -> Vec<u32> {
version
.split('.')
.map(|s| s.parse().ok())
.flatten()
.collect::<Vec<u32>>()
}