Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Warning] Parsing integers through package #14

@Kaisarion

Description

@Kaisarion

Just leaving this here, there seems to be an issue from your package where parsing integers through from decimal to hexadecimal returns the error below:

TypeError: str.split is not a function
    at parseToDigitsArray (/Users/bea/Desktop/cs/Amour4/node_modules/hex2dec/index.js:55:20)
    at convertBase (/Users/bea/Desktop/cs/Amour4/node_modules/hex2dec/index.js:66:16)
    at Object.decToHex (/Users/bea/Desktop/cs/Amour4/node_modules/hex2dec/index.js:91:13)
    at Object.execute (/Users/bea/Desktop/cs/Amour4/src/commands/rolecolor.js:80:33)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.execute (/Users/bea/Desktop/cs/Amour4/src/events/interactionCreate.js:11:17)

Suggested fix is to support integers, because obviously APIs such as Discord returns one, but a simple toString() addition to my integer in my code did the trick.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions