hapless.dev
Explore posts from servers✅ controller endpoint gets 404 when hit
thank you so much!!! now it worked! however, i only added
when i tried to use
app.UseEndpoints()
the lsp would complain saying
There is no argument given that corresponds to the required parameter 'configure' of 'EndpointRoutingApplicationBuilderExtensions.UseEndpoints(IApplicationBuilder, Action<IEndpointRouteBuilder>)
im using .net 8.0, i was curious on the message and when would i need to use it or any sort of example where id encounter that, what does that error mean and why did it work without it?23 replies
✅ controller endpoint gets 404 when hit
you mean like initialized? sorry im new to .net and c# in general, i think
builder.Services.AddControllers()
should parse any controller that inherits from BaseController
, or am i mistaken?
this is how my program.cs
looks like
23 replies
DIAdiscord.js - Imagine an app
•Created by hapless.dev on 6/21/2023 in #djs-voice
how to set and track audio player states?
i just wanted to bother with a last question, is there any way to clean up or refactor the code so its more concise and DRY?
21 replies
DIAdiscord.js - Imagine an app
•Created by hapless.dev on 6/21/2023 in #djs-voice
how to set and track audio player states?
21 replies
DIAdiscord.js - Imagine an app
•Created by hapless.dev on 6/21/2023 in #djs-voice
how to set and track audio player states?
i did it! although its not the most clean code and im sure its reduntand af, but couldnt figure out how to track the state without creating a loop that emptied the queue when changing state or plain out making a queue underflow, thanks for all the patience and sorry if i came out as lazy or frustratingly dumb, i was really tired since it was late here, thanks once again for the guidance this was my implementation
21 replies
DIAdiscord.js - Imagine an app
•Created by hapless.dev on 6/21/2023 in #djs-voice
how to set and track audio player states?
do you have an example snippet that i can check? when i access
AudioPlayer.stateChange
the property doesnt exist, and .on
of course is available since is the class that creates the player
but im farily lost and confused by now, im so sorry for all the hassle 😭21 replies
DIAdiscord.js - Imagine an app
•Created by hapless.dev on 6/21/2023 in #djs-voice
how to set and track audio player states?
and whats the syntax of the
stateChange
? is with the player.on
or is there another way?21 replies
DIAdiscord.js - Imagine an app
•Created by hapless.dev on 6/21/2023 in #djs-voice
how to set and track audio player states?
i mean like, continue the queue
21 replies
DIAdiscord.js - Imagine an app
•Created by hapless.dev on 6/21/2023 in #djs-voice
how to set and track audio player states?
how can i do that? ive seen implementations with
player.on('stateChange'
but couldnt understand how to then swap the already played resource with one that is pending in the queue21 replies
DIAdiscord.js - Imagine an app
•Created by hapless.dev on 6/21/2023 in #djs-voice
how to set and track audio player states?
thank you for noticing it!
21 replies
DIAdiscord.js - Imagine an app
•Created by hapless.dev on 6/21/2023 in #djs-voice
how to set and track audio player states?
oh, i have to remove it, came from the first blogs i was following that are by now fairly deprecated, my bad
21 replies
DIAdiscord.js - Imagine an app
•Created by hapless.dev on 6/21/2023 in #djs-voice
how to set and track audio player states?
i figured out that, but now i have the same issue, how can i track the state between resources?
this generates an "infinite" loop where the bot constantly sends follow ups to the original command request but also does the job of keep playing until the queue is empty, how can i either:
a. keep track constantly of the state of the player and change it accordingly, or
b. send only and only one interaction even on a loop?
c all of the above? haha
21 replies
DIAdiscord.js - Imagine an app
•Created by hapless.dev on 6/21/2023 in #djs-voice
how to set and track audio player states?
how can i make if statements with player.status if
AudioPlayerStatus
has no overlap and cant call AudioPlayerState
enums since are types and not values?21 replies
DIAdiscord.js - Imagine an app
•Created by hapless.dev on 6/21/2023 in #djs-voice
how to set and track audio player states?
Node 18.16.0
21 replies
DIAdiscord.js - Imagine an app
•Created by hapless.dev on 6/18/2023 in #djs-voice
bot joins to voice channel, doesn't play any sound, times out and disconnects
10 months is old? haha wow, i thought it was kinda recent, this api and its ecosystem go fast af gotta admit
11 replies