This has no error handling and I don’t know how to make a new :command but it might hint you along to an answer.