If you want to join multiple arguments together, you can use splice
and join
To begin, we need to define it as a new variable equal to args
messageable = args
Next, use splice to make a new array out of the index. If you want to make it so it is everything after the <id>
, remove ,5
, so .splice(2)
messageable = args.splice(2,5)
Finally, join it into a string using join
, adding a space in-between the arguments
messageable = args.splice(2,5).join(" ")
With this, messageable
should look like "message who sended"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…