chmod
chmod
Explore posts from servers
TTCTheo's Typesafe Cult
Created by chmod on 7/15/2023 in #questions
help why bar any but not foo
14 replies
TTCTheo's Typesafe Cult
Created by chmod on 7/9/2023 in #questions
impossible to force (property) as (method)?
{
(method) open(a: boolean): string
(property) close: (a: boolean) => string
}
{
(method) open(a: boolean): string
(property) close: (a: boolean) => string
}
how to cast close to look like
(method) close(a: boolean): string
(method) close(a: boolean): string
in typescript's eyes? literally just to make intelisense nicer https://cdn.discordapp.com/attachments/1127442108404469811/1127442108526116894/Screenshot_2023-07-08_at_10.32.16_PM.png
1 replies
SIASapphire - Imagine a framework
Created by chmod on 6/21/2023 in #sapphire-support
Converted to es6 module, commands not loading
INFO - Logging in
INFO - logged in
INFO - ApplicationCommandRegistries: Initializing...
INFO - ApplicationCommandRegistries: Took 0ms to initialize.
INFO - Logging in
INFO - logged in
INFO - ApplicationCommandRegistries: Initializing...
INFO - ApplicationCommandRegistries: Took 0ms to initialize.
then it's frozen. type: "module" swcrc:
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
},
"target": "es2020",
"paths": {
"#lib/*": ["./lib/*"]
},
"baseUrl": "./src"
},
"sourceMaps": true,

"module": {
"type": "es6"
}
}
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
},
"target": "es2020",
"paths": {
"#lib/*": ["./lib/*"]
},
"baseUrl": "./src"
},
"sourceMaps": true,

"module": {
"type": "es6"
}
}
tsconfig
{
"extends": "@sapphire/ts-config",
"compilerOptions": {
"module": "node16",
"moduleResolution": "node16",
"importsNotUsedAsValues": "preserve",
"ignoreDeprecations": "5.0",
"rootDir": "src",
"outDir": "dist",
"baseUrl": "src",
"tsBuildInfoFile": "dist/.tsbuildinfo",
"lib": ["ES2022"],
"paths": {
"#lib/*": ["./lib/*"]
},
"strict": true,
// "types": ["vitest/importMeta"],

"resolveJsonModule": true,
"esModuleInterop": true,
"noUnusedLocals": false,
"preserveSymlinks": true,
"noUnusedParameters": false,
"typeRoots": ["./types", "./node_modules/@types"]
},
"include": ["src"],
"exclude": ["node_modules", "types", "dist", "reference"]
}
{
"extends": "@sapphire/ts-config",
"compilerOptions": {
"module": "node16",
"moduleResolution": "node16",
"importsNotUsedAsValues": "preserve",
"ignoreDeprecations": "5.0",
"rootDir": "src",
"outDir": "dist",
"baseUrl": "src",
"tsBuildInfoFile": "dist/.tsbuildinfo",
"lib": ["ES2022"],
"paths": {
"#lib/*": ["./lib/*"]
},
"strict": true,
// "types": ["vitest/importMeta"],

"resolveJsonModule": true,
"esModuleInterop": true,
"noUnusedLocals": false,
"preserveSymlinks": true,
"noUnusedParameters": false,
"typeRoots": ["./types", "./node_modules/@types"]
},
"include": ["src"],
"exclude": ["node_modules", "types", "dist", "reference"]
}
5 replies
DIAdiscord.js - Imagine an app
Created by chmod on 5/10/2023 in #djs-questions
get member role cache crash
7 replies
TTCTheo's Typesafe Cult
Created by chmod on 3/17/2023 in #questions
uint256 in mysql
what's the most sane way to store an amount like this in a db? Decimal(38,18), a bigint of wei like Decimal(38,0), a hex string like binary(20), varchar (lol), something else?
2 replies
SIASapphire - Imagine a framework
Created by chmod on 2/6/2023 in #sapphire-support
turn off dev mode?
5 replies
TTCTheo's Typesafe Cult
Created by chmod on 1/30/2023 in #questions
i require assistance from the typesafe cult (solved)
type the keys on a const object while preserving their assigned values.
const FileNamesMap: {[key: string]: string[]} = {
'Activity': [
'Following',
'Likes',
],
'Comments': ['Comments'],
'Direct Messages': ['Direct Messages'],
'Profile': ['Profile Info'],
'Videos': ['Videos'],
} as const
const FileNamesMap: {[key: string]: string[]} = {
'Activity': [
'Following',
'Likes',
],
'Comments': ['Comments'],
'Direct Messages': ['Direct Messages'],
'Profile': ['Profile Info'],
'Videos': ['Videos'],
} as const
So like this, but I don't want to give the values a type of string[]. I want the key Activity to literally correspond to the value 'Following', 'Likes'] as const Is this even possible? cause:
The type 'readonly ["Following", "Likes"]' is 'readonly' and cannot be assigned to the mutable type 'string[]'.
The type 'readonly ["Following", "Likes"]' is 'readonly' and cannot be assigned to the mutable type 'string[]'.
5 replies
TTCTheo's Typesafe Cult
Created by chmod on 12/10/2022 in #questions
has Theo done a video on why T3 uses react and not svelte or vue?
Is there potential to see a T3 for sveltekit?
11 replies
SIASapphire - Imagine a framework
Created by chmod on 12/6/2022 in #sapphire-support
compile into single file
Bundling the bot into a single file fails because sapphire loads commands/listeners files when run, not via import. Is there a simple setting in the bot to statically import all the commands?
48 replies
TTCTheo's Typesafe Cult
Created by chmod on 12/3/2022 in #questions
T3 is severless, yet uses prisma— how...?
Still confused about how database connections work from short-lived workers. Is https://prisma.io/docs/data-platform/data-proxy the only way? Say you have a t3 fullstack vercel app and a railway DB. You don't just plug the DB url into prisma client, do you?
43 replies
DIAdiscord.js - Imagine an app
Created by chmod on 11/19/2022 in #djs-questions
can subcommands have subcommands?
For emulating a "flag" command option, instead of relying on the boolean option.
6 replies
DIAdiscord.js - Imagine an app
Created by chmod on 8/1/2022 in #djs-questions
why not always use fetch?
1. where can we see the detailed behavior of what object we can always expect to be cached, and which object must be fetched? 2. what if memory runs out? may guilds/channels always expected to be cached be scarified and make .cache unreliable?
3 replies
DIAdiscord.js - Imagine an app
Created by chmod on 7/18/2022 in #djs-questions
Convert an array or map to a discord collection?
how to use new Collection()?
4 replies