Fixed element blocks to allow spaces and stuff
This commit is contained in:
parent
c5a47f0550
commit
6be2b7bcaa
@ -12,7 +12,8 @@ module.exports = {
|
||||
execute: function({elements}, elem){
|
||||
return elements
|
||||
.split(",")
|
||||
.map((element)=>(require("./util/elements.js").indexOf(element.toLowerCase()) + 1))
|
||||
.map((element)=>(element.toLowerCase().replace(/[^a-z]/g, "")))
|
||||
.map((element)=>(require("./util/elements.js").indexOf(element) + 1))
|
||||
.filter((num)=>(num > 0))
|
||||
.join(",");
|
||||
},
|
||||
|
@ -12,6 +12,7 @@ module.exports = {
|
||||
execute: function({numbers}, elem){
|
||||
return numbers
|
||||
.split(",")
|
||||
.map((num)=>(num.replace(/[^0-9]/g, "")))
|
||||
.map((num)=>(parseInt(num)))
|
||||
.filter((num)=>(!isNaN(num)))
|
||||
.map((num)=>(require("./util/elements.js")[num-1]))
|
||||
|
Loading…
x
Reference in New Issue
Block a user