From fa6c44fe8b73be3a28de6ced725f501c449ddc8f Mon Sep 17 00:00:00 2001 From: Cristiano Pires Date: Sat, 11 Mar 2023 22:41:25 +0000 Subject: [PATCH] Rust commit branch link-> Fix problem with spaces on links. --- lib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.js b/lib.js index 71b8a98..c115bf0 100644 --- a/lib.js +++ b/lib.js @@ -708,7 +708,7 @@ class rustCommits .setAuthor({name:commit.Author, iconURL:commit.Avatar==''?"https://i.imgur.com/g6FSNhL.png":commit.Avatar,url:`https://commits.facepunch.com/${commit.Author.split(' ').join('')}`}) .setDescription(commit.Content) .addFields( - { name:`${commit.Repo}`, value:`[${commit.Repo}/${commit.Branch}](https://commits.facepunch.com/r/${commit.Repo}/${commit.Branch}/ 'Branch Link')`}, + { name:`${commit.Repo}`, value:`[${commit.Repo}/${commit.Branch}](https://commits.facepunch.com/r/${commit.Repo}/${commit.Branch.split(' ')? commit.Branch.split(' ').join('%20'):commit.Branch}/ 'Branch Link')`}, { name: 'ID', value: commit.ID.toString() }, ) .setTimestamp()