❔ C#, .Net and DSharp+ Bot, Issue.
When I use the line
It tells me and the method
I've looked up solutions, online and on YouTube but there's nothing that helps me with my issue, I'm starting to think that I'm just gonna have to give up.
34 Replies
uh
Well, you are throwing an exception
And VS tells you that such an exception occurred
So... everything seems perfectly fine to me
c# working as intended
I can't get my bot online because of this error, I've tried fixing it and it still doesn't work
I'm losing my mind
Don't throw an exception then?
"Why does it throw an error? I told it to throw an error but why does it do that?"
I'm just following tutorials from DapperDino
DapperDino does have nice tutorials
Mhm
place two
/
in front of the line
//throw new etc
then run your botCtrl+K,C
in VSWell, now I have another error inside a line of code.
it's just the OnClientReady part that has an error.
Even if the error was on screen, it'd be unreadable on this bloomy photo
Still a photo, but at least the error is here. Aight.
The method says it returns a
Task
And yet there's no return
inside
Do what you did to the method below, for exampleHad to do that quite a few times but now I have errors for {
Which says Invalid token "{" in class, record, struct or interface member declaration
I think the first brace might be a
[
instead of {
...?It's not
Would be an awful lot easier to tell with a proper screenshot, hint hint nudge nudge
Well, then, something else is wrong ¯\_(ツ)_/¯
Alas, nobody will be able to tell without seeing the cod
uh
You commented out method signatures and left some loose braces
Yeah, I second that
Learn the basic syntax first, then think of making a bot
That's the thing I have until Friday to complete this bot
How did you get yourself into a situation where you have a week to create a Discord bot while having issues with basic syntax at the same time?
It's Thursday for me
I have until tomorrow
Ah, well then
How did you get yourself into a situation where you have a day to create a Discord bot while having issues with basic syntax at the same time?
I do commissions
I had a month to get it done but I got sick
Well shouldn't have taken this one if you don't know C# well
commissions for something you don't know how to do?
I don't know anything about carpentry, I'm not gonna accept a commission to build someone a house
Alright, I will just quit on it and give up
Because I wanted to learn something I've been wanting to do for a year
Learning is good
Learning under the pressure of a commission you have to complete in a specified time... well that's no fun
I'm used to it
i admire your "get it done" attitude though. if you stick with programming with that attitude you will go far
I fixed the issue
And my bot is online, thank you all for the help.
Oh, I know that
Which is the reason why I have acquired the attitude
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.