CodingWithJamal
CodingWithJamal
Explore posts from servers
TtRPC
Created by CodingWithJamal on 10/26/2023 in #❓-help
Disable trpc route cahce?
but im using
export const trpc = experimental_createTRPCNextAppDirServer<AppRouter>({
config() {
return {
transformer: superjson,
links: [
loggerLink({
enabled: () => process.env.NODE_ENV === "development",
}),
experimental_nextHttpLink({
batch: true,
url: getUrl(),
headers() {
return {
cookie: cookies().toString(),
"x-trpc-source": "rsc-http",
};
},
}),
],
};
},
});
export const trpc = experimental_createTRPCNextAppDirServer<AppRouter>({
config() {
return {
transformer: superjson,
links: [
loggerLink({
enabled: () => process.env.NODE_ENV === "development",
}),
experimental_nextHttpLink({
batch: true,
url: getUrl(),
headers() {
return {
cookie: cookies().toString(),
"x-trpc-source": "rsc-http",
};
},
}),
],
};
},
});
The Nextjs server trpc so it only has the query method on it
9 replies
TtRPC
Created by CodingWithJamal on 10/26/2023 in #❓-help
Disable trpc route cahce?
However when i go to http://localhost:3000/api/trpc/getClient and test i get the fresh data on every request?
9 replies
SIASapphire - Imagine a framework
Created by CodingWithJamal on 2/17/2023 in #sapphire-support
How to delete interaction buttons?
ah i see
8 replies
SIASapphire - Imagine a framework
Created by CodingWithJamal on 2/17/2023 in #sapphire-support
How to delete interaction buttons?
the button is created on my help command and when clicked I want it to delete the interaction but it does not know which interaction message to delete. How can i find it?
8 replies
SIASapphire - Imagine a framework
Created by CodingWithJamal on 2/17/2023 in #sapphire-support
How to delete interaction buttons?
the button component:
.addComponents(
new ButtonBuilder()
.setCustomId(ButtonCustomId.HELP_COMMAND_DELETE)
.setLabel('Delete')
.setStyle(ButtonStyle.Danger),
)
.addComponents(
new ButtonBuilder()
.setCustomId(ButtonCustomId.HELP_COMMAND_DELETE)
.setLabel('Delete')
.setStyle(ButtonStyle.Danger),
)
8 replies
SIASapphire - Imagine a framework
Created by CodingWithJamal on 2/17/2023 in #sapphire-support
How to delete interaction buttons?
export class ButtonHandler extends InteractionHandler {
public constructor(ctx: PieceContext, options: InteractionHandler.Options) {
super(ctx, {
...options,
interactionHandlerType: InteractionHandlerTypes.Button
});
}

public override parse(interaction: ButtonInteraction) {
if (interaction.customId === ButtonCustomId.HELP_COMMAND_DELETE) return this.some();

return this.none();
}

public async run(interaction: ButtonInteraction) {
if (interaction.customId === ButtonCustomId.HELP_COMMAND_DELETE) {
await interaction.deleteReply(interaction.message.id);
}
}
}
export class ButtonHandler extends InteractionHandler {
public constructor(ctx: PieceContext, options: InteractionHandler.Options) {
super(ctx, {
...options,
interactionHandlerType: InteractionHandlerTypes.Button
});
}

public override parse(interaction: ButtonInteraction) {
if (interaction.customId === ButtonCustomId.HELP_COMMAND_DELETE) return this.some();

return this.none();
}

public async run(interaction: ButtonInteraction) {
if (interaction.customId === ButtonCustomId.HELP_COMMAND_DELETE) {
await interaction.deleteReply(interaction.message.id);
}
}
}
8 replies
SIASapphire - Imagine a framework
Created by CodingWithJamal on 2/17/2023 in #sapphire-support
How to delete interaction buttons?
Im trying to use the button handler and im running into some problems
8 replies
SIASapphire - Imagine a framework
Created by CodingWithJamal on 1/21/2023 in #sapphire-support
Formatting Dates
okay thanks
6 replies