Regarding containers

Hello! With regards to the example repos with setup.ts, is every property in the container already available like the Client at startup?
Solution:
Which one exactly are you talking about? There are 3 examples that have a setup.ts and each has some unique content, and none use container. At any rate, the idea of setup.ts is that it is called before you can new SapphireClient, which happens automatically through line 1 at https://github.com/sapphiredev/examples/blob/main/examples/with-typescript-starter/src/index.ts, by calling just import './lib/setup.ts' instead of something like import { x } from './lib/setup.ts' that file i...
Jump to solution
3 Replies
Solution
Favna
Favna•17mo ago
Which one exactly are you talking about? There are 3 examples that have a setup.ts and each has some unique content, and none use container. At any rate, the idea of setup.ts is that it is called before you can new SapphireClient, which happens automatically through line 1 at https://github.com/sapphiredev/examples/blob/main/examples/with-typescript-starter/src/index.ts, by calling just import './lib/setup.ts' instead of something like import { x } from './lib/setup.ts' that file is executed at import.
Dolliwyx
DolliwyxOP•17mo ago
Ah I see so it was called before the Client, it's all good now, thank you for the clarification!!
MRDGH2821
MRDGH2821•17mo ago
And since you are using containers, you can just pass the token as env variable in container build config 🤔
Want results from more Discord servers?
Add your server