kin.ts
kin.ts
Explore posts from servers
DDeno
Created by kin.ts on 4/11/2024 in #help
" Property 'openKv' doesn't exist on 'typeof Deno'. "
No description
2 replies
DIdiscord.js - Imagine ❄
Created by kin.ts on 3/3/2024 in #djs-questions
Warning: Not implemented: ClientRequest.options.createConnection
No description
2 replies
DDeno
Created by kin.ts on 2/24/2024 in #help
follow up action after respond to the request
Currently, i have this for my http interaction discord bot
// ping.js
execute(api: API, interaction: APIPingInteraction): Response {
something(api, interaction);
return Response.json({ type: InteractionResponseType.ChannelMessageWithSource, data: { content: "pong" } });
}

async function something(api: API, interaction: APIInteraction): Promise<void> {
await api.interactions.editReply(interaction.application_id, interaction.token, { content: `${Date.now() - generateTimestamp(interaction)}ms` });
}
// ping.js
execute(api: API, interaction: APIPingInteraction): Response {
something(api, interaction);
return Response.json({ type: InteractionResponseType.ChannelMessageWithSource, data: { content: "pong" } });
}

async function something(api: API, interaction: APIInteraction): Promise<void> {
await api.interactions.editReply(interaction.application_id, interaction.token, { content: `${Date.now() - generateTimestamp(interaction)}ms` });
}
is there a way call interactions.editReply in the execute function without creating another function like this? previously i used Deno.serveHttp() to respond to the request, but because its will be deprecated, i moved to Deno.serve
11 replies
DDeno
Created by kin.ts on 10/7/2023 in #help
Cannot find module
I tried importing '../api/index.js' but got the error 'module not found', I knew this error would appear, I'm not sure how to import this module (I forked the module from discord.js), so, is there a way to import the ts file as a js file?
5 replies
DDeno
Created by kin.ts on 9/30/2023 in #help
interaction_endpoint_url: couldn't be verified
No description
2 replies
DDeno
Created by kin.ts on 9/7/2023 in #help
Cannot read file "src/deno.json": not implemented on js
Hey @Deno AI Helper ! I'm having a bit of trouble, I'm trying to use deno.land/x/import to use non statycalize analyze dynamic import, but I get errors when trying to load events for my Client class
Error: Build failed with 2 errors:
error: Cannot read file "src/deno.json": not implemented on js
error: Cannot read file "src/deno.json": not implemented on js
at failureErrorWithLog (https://deno.land/x/[email protected]/wasm.js:1625:15)
at https://deno.land/x/[email protected]/wasm.js:1034:25
at runOnEndCallbacks (https://deno.land/x/[email protected]/wasm.js:1460:45)
at buildResponseToResult (https://deno.land/x/[email protected]/wasm.js:1032:7)
at https://deno.land/x/[email protected]/wasm.js:1061:16
at responseCallbacks.<computed> (https://deno.land/x/[email protected]/wasm.js:679:9)
at handleIncomingPacket (
https://deno.land/x/[email protected]/wasm.js:738:9)
at readFromStdout (https://deno.land/x/[email protected]/wasm.js:655:7)
at Object.worker.onmessage (https://deno.land/x/[email protected]/wasm.js:1801:38)
at https://deno.land/x/[email protected]/wasm.js:1786:1084
Error: Build failed with 2 errors:
error: Cannot read file "src/deno.json": not implemented on js
error: Cannot read file "src/deno.json": not implemented on js
at failureErrorWithLog (https://deno.land/x/[email protected]/wasm.js:1625:15)
at https://deno.land/x/[email protected]/wasm.js:1034:25
at runOnEndCallbacks (https://deno.land/x/[email protected]/wasm.js:1460:45)
at buildResponseToResult (https://deno.land/x/[email protected]/wasm.js:1032:7)
at https://deno.land/x/[email protected]/wasm.js:1061:16
at responseCallbacks.<computed> (https://deno.land/x/[email protected]/wasm.js:679:9)
at handleIncomingPacket (
https://deno.land/x/[email protected]/wasm.js:738:9)
at readFromStdout (https://deno.land/x/[email protected]/wasm.js:655:7)
at Object.worker.onmessage (https://deno.land/x/[email protected]/wasm.js:1801:38)
at https://deno.land/x/[email protected]/wasm.js:1786:1084
here is the link to my code https://github.com/k1iin/akane-v2/blob/3bb1da3c3e76ea83f2e7b7e94bdbd83a523071c0/main.ts
4 replies
DDeno
Created by kin.ts on 10/7/2022 in #help
help me
4 replies