chillihero
chillihero
Explore posts from servers
SIASapphire - Imagine a framework
Created by chillihero on 2/18/2025 in #discordjs-support
discord js node modules type error
No description
6 replies
SIASapphire - Imagine a framework
Created by chillihero on 2/17/2025 in #sapphire-support
Which type to use for context in scheduled task plugin error listener?
Currently updating my bot code to the new version of djs and sapphire. i struggle to find the correct type that has this piece.nameproperty, any idea? I checked skyra but their implementation looks more complicated than what I want to achieve.
import type { Events, TaskErrorPayload } from '#lib/types';
import { Listener } from '@sapphire/framework';

export class ScheduledTaskErrorListener extends Listener<**Events.TaskError**> {
public run(error: Error, context: **TaskErrorPayload**) {
this.container.logger.fatal(`[TASK] ${context.piece.name}\n${error.stack || error.message}`);
}
}
import type { Events, TaskErrorPayload } from '#lib/types';
import { Listener } from '@sapphire/framework';

export class ScheduledTaskErrorListener extends Listener<**Events.TaskError**> {
public run(error: Error, context: **TaskErrorPayload**) {
this.container.logger.fatal(`[TASK] ${context.piece.name}\n${error.stack || error.message}`);
}
}
7 replies
SIASapphire - Imagine a framework
Created by chillihero on 2/13/2025 in #sapphire-support
Questions to new API Implementation
So I am currently rewriting my api endpoints in sapphire. I came acros some questions: 1. How can I define that main route "/"? how should I name that file? get.ts ? 2. Following REST I want to create get, post, put etc routes for a specific slug e.g. birthday. Do I need to create 4 separate files for this with each a different filename? this does not really look like an effective way? 3. Is there a possibility to create folders to put these 4 files in? or do they all have to be located in the routes folder? 4. In what extend can @ApplyOption still be used? 5. Its not clear to me how to recieve the body when using post
6 replies
SIASapphire - Imagine a framework
Created by chillihero on 2/13/2025 in #sapphire-support
How would I add the prisma client as property to the Augment.d.ts?
No description
17 replies
SIASapphire - Imagine a framework
Created by chillihero on 1/21/2025 in #sapphire-support
API Plugin Documentation is not up to date anymore
Hi :) I just read in #@sapphire/plugin-api Methods Error that the plugin was reworked, could I request that the new usage is documented/adjusted in the guide? I am very confused on old vs new usage
12 replies
SIASapphire - Imagine a framework
Created by chillihero on 5/13/2024 in #sapphire-support
i18n only translate command description
public override async registerApplicationCommands(registry: ApplicationCommandRegistry) {
registry.registerChatInputCommand((builder) =>
applyLocalizedBuilder(builder, 'commands/mycommand:name', 'commands/mycommand:description').setDMPermission(true)
);
}
public override async registerApplicationCommands(registry: ApplicationCommandRegistry) {
registry.registerChatInputCommand((builder) =>
applyLocalizedBuilder(builder, 'commands/mycommand:name', 'commands/mycommand:description').setDMPermission(true)
);
}
How would I hardcode the command name but localise the description? Just using applyLocalizedBuilder(builder, 'mycommand', 'commands/mycommand:description')? or setting the name afterwards with .setName('mycommand')
5 replies
TTCTheo's Typesafe Cult
Created by chillihero on 3/8/2024 in #questions
Good (cheap) alternatives to Planescale
No description
9 replies
RRefine
Created by other-emerald on 3/4/2024 in #ask-any-question
Where is the mantine option when using the CLI or refine.new?
When trying to create a new NextJS Project either with the CLI or the website, mantine is not provided as an option. Why & How can I use it anyways?
6 replies
TTCTheo's Typesafe Cult
Created by chillihero on 2/13/2024 in #questions
Resources on reusable Heading Components with Shadcn / TailwindCss
I want to create Components with default Styles for headings, lists etc. These should be adjustable with additional tailwind classes tho, and have the possibility to use a style of a h3 for a h1 element for example. Im sure others faced this issue too before me. Any ideas / resources that could help me accomplish that?
2 replies
TTCTheo's Typesafe Cult
Created by chillihero on 2/9/2024 in #questions
Why is my React Project terminating without any Response when using it with Bash or Powershell?
No description
3 replies
TTCTheo's Typesafe Cult
Created by chillihero on 2/2/2024 in #questions
Difference between profile, user and account type authjs
No description
4 replies
KKinde
Created by chillihero on 2/1/2024 in #💻┃support
Limitations of Discord Auth Integration
Hey :) I am working on a bot dashboard currently and was trying out kinde as a possible auth provider. Setup was incredible easy, but I soon realised, that Kinde has big limitations when it comes to the discord auth provider. I was wondering if its possible to 1. Customize the Permissions that kinde requests of the user 2. save the generated data (like discord user id, guilds etc) to the kinde data available. If this is not a possibility, Id strongly advocate to add this as a feature.
11 replies
SIASapphire - Imagine a framework
Created by chillihero on 1/9/2024 in #sapphire-support
How to use "and" & "or" with preconditions?
The Guide does not have any examples of this, so Im wondering how I can achive this. Having one of multiple preconditions needing to match Having multiple preconditions needing to match
14 replies
SIASapphire - Imagine a framework
Created by chillihero on 7/15/2023 in #sapphire-support
How to check if a number (the permission integer) has the manage server permission?
I need to check this, without using discordjs, only the sapphire/bitfield package I didnt understand the readme good enough, thats why im asking here.
8 replies
SIASapphire - Imagine a framework
Created by chillihero on 7/15/2023 in #discordjs-support
Cant resolve zlib-sync
No description
53 replies
SIASapphire - Imagine a framework
Created by chillihero on 7/13/2023 in #sapphire-support
Issue when running mutiple bot instances on the same redis db with the scheduler plugin
5 replies
SIASapphire - Imagine a framework
Created by chillihero on 7/10/2023 in #discordjs-support
"Failed to find guild, or unknown type for channel" even when not using channel.add()
No description
10 replies
SIASapphire - Imagine a framework
Created by chillihero on 6/30/2023 in #sapphire-support
When do I need the runIn Option?
Do I also need it when creating only slash commands?
5 replies
SIASapphire - Imagine a framework
Created by chillihero on 5/26/2023 in #sapphire-support
Property 'run' in type 'ScheduledTaskErrorEvent' is not assignable to the same property in base type
#16 [builder 5/5] RUN npx tsc
#16 9.480 src/listeners/tasks/scheduledTaskError.ts:10:9 - error TS2416: Property 'run' in type 'ScheduledTaskErrorEvent' is not assignable to the same property in base type 'Listener<"scheduledTaskError", ListenerOptions>'.
#16 9.480 Type '(error: Error, task: string, _duration: number, _payload: any) => void' is not assignable to type '(error: unknown, task: string, payload: unknown) => unknown'.
#16 9.480
#16 9.480 10 public run(error: Error, task: string, _duration: number, _payload: any) {
#16 9.480 ~~~
#16 9.480
#16 9.482
#16 9.482 Found 1 error in src/listeners/tasks/scheduledTaskError.ts:10
#16 9.482
#16 ERROR: process "/bin/sh -c npx tsc" did not complete successfully: exit code: 2
#16 [builder 5/5] RUN npx tsc
#16 9.480 src/listeners/tasks/scheduledTaskError.ts:10:9 - error TS2416: Property 'run' in type 'ScheduledTaskErrorEvent' is not assignable to the same property in base type 'Listener<"scheduledTaskError", ListenerOptions>'.
#16 9.480 Type '(error: Error, task: string, _duration: number, _payload: any) => void' is not assignable to type '(error: unknown, task: string, payload: unknown) => unknown'.
#16 9.480
#16 9.480 10 public run(error: Error, task: string, _duration: number, _payload: any) {
#16 9.480 ~~~
#16 9.480
#16 9.482
#16 9.482 Found 1 error in src/listeners/tasks/scheduledTaskError.ts:10
#16 9.482
#16 ERROR: process "/bin/sh -c npx tsc" did not complete successfully: exit code: 2
The Logs I get from this error. Any idea how I can solve this? The code:
export class ScheduledTaskErrorEvent extends Listener<typeof ScheduledTaskEvents.ScheduledTaskError> {
public run(error: Error, task: string, _duration: number, _payload: any) {
if (envIsDefined('SENTRY_DSN')) {
Sentry.withScope((scope) => {
scope.setLevel('error');
scope.setTags({ task });
scope.setFingerprint([error.name]);
scope.setTransactionName('ScheduledTaskErrorEvent');
Sentry.captureException(error);
});
}

return logErrorToContainer({ error, loggerSeverityLevel: 'error' });
}
}
export class ScheduledTaskErrorEvent extends Listener<typeof ScheduledTaskEvents.ScheduledTaskError> {
public run(error: Error, task: string, _duration: number, _payload: any) {
if (envIsDefined('SENTRY_DSN')) {
Sentry.withScope((scope) => {
scope.setLevel('error');
scope.setTags({ task });
scope.setFingerprint([error.name]);
scope.setTransactionName('ScheduledTaskErrorEvent');
Sentry.captureException(error);
});
}

return logErrorToContainer({ error, loggerSeverityLevel: 'error' });
}
}
5 replies
SIASapphire - Imagine a framework
Created by chillihero on 4/6/2023 in #sapphire-support
Whats the difference between the different imports?
12 replies