Kay
Check if class instance is instance of provided type
I have a function that dynamically loads a folder with ts files, initiates the classes in them and saves them. The function takes in a type for its return type like this
load<T extends BaseInteraction>
. But when i use DynamicClass instanceof T
it says 'T' only refers to a type, but is being used as a value here.
. is there a way to compare the class to the provided class?3 replies
Deno deploy running my code multiple times
Im hosting a small discord bot on deno deploy but for some reason its firing the events multiple times and everytime i save the project to shut it down and start it again it doubles. so in this case when i delete a message it first send one message telling me its deleted. then when i patched a bug it became 2 messages and now its 4. is there a way to fix this?
4 replies
Bundle ts code to ts using deno emit
When bundling code using https://deno.land/x/emit@0.38.2 it bundles into javascript but i want it to be typescript. is it possible to do this?
2 replies
Get image from automated download
I have this page which displays a render using threejs and renders it into a png and downloads it. i need that image to use it in a canvas from deno-canvas but when i download it using this package it returns this:
code where i download it:|
32 replies
Get image data from automated download
I have this page which displays a render using threejs and renders it into a png and downloads it. i need that image to use it in a canvas from deno-canvas but when i download it using this package it returns this
'C:\Users\titul\AppData\Local\Temp\deno_dwldf3d5cf300f407d23/E:\Arcunis\recipeImageMaker\stone.png'
code where i download it:|
2 replies
Deno.serve get full path instead of only params and url
I need to get params from an url like this
http://localhost:8000/auth#token_type=Bearer&access_token=CENCORED&expires_in=604800&scope=identify
but the params arnt after a ? but after a # so how do i get that using deno.serve?5 replies
Compiled program cannot write to file
I made a program that can download the latest version of papermc or velocity. and it does download it but it also should update the config file to set the latest build value to the build number of the downloaded jar. and just by running
deno run -A ./Main.ts
that does work but after compiling it it doesn't. it still downloads the jar3 replies
Log Deno.command process output
i need to execute a command wich will keep running until stopped and log the output.
i found this but it dosnt work
this says:
Argument of type 'ReadableStream<Uint8Array>' is not assignable to parameter of type 'Reader'. Property 'read' is missing in type 'ReadableStream<Uint8Array>' but required in type 'Reader'
and i know that process.stdout has a getReader
but that dosnt seem to work either5 replies