aoijs / aoi.js

aoi.js - The most advanced string-based package to create a Discord Bot fast and powerful.
https://aoi.js.org
Apache License 2.0
332 stars 132 forks source link

Bug: $getObjectProperty is not read if the key is a number #564

Closed MuhammedEp closed 5 months ago

MuhammedEp commented 5 months ago

Bug Type

Function

Bugged Function

modüle.exports={
name:"test",
code:`
$getObjectProperty[json;$authorID]
$createObject[json;$readFile[example.json]]
`
}

//  JSON FİLE
{
"858951074164244490":"Example-text",
"Test":"Hi"
}

Version of aoi.js

v6.5.6

Version of Node.js

v16.11.0 (Lowest)

Excepted Output

As the author of the command, I want to output "example-text" (without quotes) with authorid

Relevant log output

$getObjectProperty[json;$authorID]
returns "undefined"

Code of Conduct

Faf4a commented 5 months ago

Thank you for reporting this bug, I can indeed confirm it!

Faf4a commented 5 months ago

Fixed in 598a24f