owengombas / discord.ts

🤖 Create your discord bot by using TypeScript and decorators!
https://owencalvin.github.io/discord.ts/
325 stars 40 forks source link

bigint support #28

Closed Pho3niX90 closed 3 years ago

Pho3niX90 commented 4 years ago

Simple example:

@Command("find :search")
async execute(command: CommandMessage) {
    const search = command.args.search;
    console.log("test " + search);
}

find 76561198007433923 would yield test 76561198007433920

ramarivera commented 4 years ago

I found the same problem today, I ended up prefixing my arguments with another symbol, which is less than ideal

dbrxnds commented 4 years ago

I think this is mostly just an issue with the fact that every integer arg is automatically converted to an actual integer. Wouldn't this behavior be solved by always passing the arg on as a string and letting the consuming function decide what to do with it? In a way, related to issue #18

Pho3niX90 commented 4 years ago

@iDavidB it would definitely solve the issue at hand.

Pho3niX90 commented 3 years ago

fixed in https://github.com/OwenCalvin/discord.ts/pull/31