i am creating a steam command where the args are either the id or the profile link what i want to do is get the last word(我正在创建一个Steam命令,其中args是ID或配置文件链接,我想要做的就是得到最后一个单词)
exhttps://steamcommunity.com/id/ethicalhackeryt/
here i want to get ethicalhackeryt
or if user inputs that directly the continue(前https://steamcommunity.com/id/ethicalhackeryt/
在这里,我想获得ethicalhackeryt
或者如果用户直接输入继续)
like .steam https://steamcommunity.com/id/ethicalhackeryt/
or .steam ethicalhackeryt
(例如.steam https://steamcommunity.com/id/ethicalhackeryt/
或.steam ethicalhackeryt
)
save args[0] as ethicalhackeryt
(将args [0]保存为ethicalhackeryt
)
run: async (client, message, args) => {
if(args[0] == `http://steamcommunity.com/id/`) args[0].slice(29); //needed help in this line
const token = steamapi
if(!args[0]) return message.channel.send("Please provide an account name!");
const url ....... rest of code
}
ask by ethyt translate from so