some1chan
some1chan
Explore posts from servers
DTDrizzle Team
Created by some1chan on 9/23/2023 in #help
Unwanted db.execute() behavior; trying to pass in an array instead of a record or its singular
When trying to pass an array (ex. number[], bigint[], string[]) that contains only one element into sql``​, it will be transformed into their non-list type (ex. number, bigint, string respectively). When I put two elements in, it then turns into a Postgres record, which is not what I want. What I expect is that the array stays an array.
51 replies
SIASapphire - Imagine a framework
Created by some1chan on 9/12/2023 in #sapphire-support
Why in line 79 for src/preconditions/ClientPermissions.ts is there `PermissionsBitField | null`?
Hello, I'm doing some (potentially bad, please warn me) things to be able to check permissions whenever I need it in my bot. I figured to have sane code, I'd copy off of Sapphire's precondition code for myself to use, specifically ClientPermissions. As far as I know, if I want localization and sane control over the message text when there's a permission error, and the permission check can be done anyway, I'm guessing this is how I do it. While looking through the code, I noticed the explicit type cast PermissionsBitField | null. I also noticed this could be avoided, assuming the types weren't lying to me from channel.permissionFor(me). Upon checking the commit for more info, it said it fixed permission checking for old applications. I can't find any more info besides that, and the pull request attached to it. Would anyone from the dev team be able to shine any light on it? (i'd ping favna judging by the commit author but that seems impolite) Commit in question: https://github.com/sapphiredev/framework/commit/725a7d3a8e8f92860aaf946aecfc988abc8d9553
32 replies
SIASapphire - Imagine a framework
Created by some1chan on 8/24/2023 in #sapphire-support
Did the latest @sapphire/[email protected] update break things?
Super preliminary stuff because I haven't bothered to debug it thoroughly; It seems like the plugin doesn't import in my logs after running pnpm update. The typings for the i18n entry in SapphireClient also disappeared. Reverting to 5.0.4 seems to fix the issue. Has anyone else encountered this?
34 replies