Skip to content
This repository has been archived by the owner on Aug 28, 2020. It is now read-only.

SettingsGateway Type Role with Sqlite Provider returning the wrong id #1133

Open
2 tasks
xavierdemoor opened this issue Aug 10, 2020 · 4 comments
Open
2 tasks

Comments

@xavierdemoor
Copy link

Describe the issue

Using Sqlite provider from Klasa-pieces AND Role SettingsGateway Type returns the wrong id.

Code or steps to reproduce

Client.defaultGuildSchema
    .add('mention', 'Role', { default: null, configurable: true });
this.client.guilds.cache.map(guild => {
    console.log('mention', guild.settings.mention);
}

Expected and actual behavior

Expected role ID returned: 720303249328046163
Actual role ID returned: 720303249328046200 (typeof number)

Further details

  • @klasa/core version:
  • node.js version: 12.5.0
  • Klasa version: 0.5.0
  • I have modified core files.
  • I have tested the issue on latest master. Commit hash:
@jonahsnider
Copy link

Floating point precision loss

@xavierdemoor
Copy link
Author

Floating point precision loss

This comes from Klasa or my sqlite conf ?

@jonahsnider
Copy link

Likely your configuration. Are you storing the role IDs as a number instead of a string (since no bigints are available)?

@xavierdemoor
Copy link
Author

xavierdemoor commented Aug 10, 2020

Likely your configuration. Are you storing the role IDs as a number instead of a string (since no bigints are available)?

I'm using Type Role (https://klasa.js.org/#/docs/klasa/v0.5.0/Advanced%20SettingsGateway/SettingsGatewayKeyTypes).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants