18:55 - "Why are we doing this? This seems very weird, why don't I just set it to include on every build?" [TEN SECONDS LATER] OOOOOH! And showing what EXACTLY you mean at 19:19 is so huge, thank you.
I was waiting for this kind of tutorial for making a discord bot with C#. The other tutorials are already outdated and doesnt work. Thank you so much for this, ill watch all the series
For your config file a better way to handle getting it into your output directory would be to go to the files properties and set the build action to none and copy to output directory to always or if newer. I would recommend if newer most of the time
This works, thankyou man! I'm creating a server & making a Discord bot of my own was the way to go. I just got the bot to come online & am about to watch part 2!!
So im getting into coding and when I tried starting it, it wouldnt run so i looked and on this code var discordConfig = new DiscordConfiguration() { Intents = DiscordIntents.All, Token = jsonReader.Token, TokenType = TokenType.Bot, AutoReconnect = true }; it kept giving me this message and idk what to do System.ArgumentNullException: 'Token cannot be null, empty, or all whitespace. Parameter name: value' and im just lost as to how I can fix it because i have the token in the file, i coped and pasted it into the bin, and I mean i rewatched the video 3 times and redid it all to make sure but it still pops up so I really dont know what to do about this any help?
You know what I don't get? Why is visual studio so much better than vscode for C#? They are both made by microsoft; let me just use all the visual studio stuff on vscode Q_Q
I get this error: "Authentication failed. Check your token and try again." I just resetted my bot token and copied it. But it didn't work. So i'm confused should i copy the ( config.json ) to the exe file and edit it there (talking about >>> /bin/debug), or edit the one that in file config/config.json
@@krowalski7906 Yes, apparently I had 2 different discord bots, and im only allowed one or something. so I used the same bot and it worked. Thanks for replying though.
You need to build your solution first, go to the Build tab at the top, then press Build Solution and then your bin/Debug folder should have an output where u can then put in the config.json file. If you are having further issues, please join our discord server
what do you mean by "plain console app", this makes no sense as C# is the programming language for .NET Framework and .NET Core which is a more up-to-date version. I use .NET Framework in the tutorial as just a basic example but using .NET Core is a good idea for the latest features
@@samjesus8 i meant console app with .net core. you know, the one without parentheses after the name? instead of console app (.net framework). i was just wondering if there was a reason it had be to .net framework because i dont want to run this on windows.
First in %project_name% /config/config.json (contains the word "token"). Second in %project_name% / bin/Debug/config.json (contains 28 characters the real token).
Still in the config.json file yes. But only the one in your bin/Debug folder since that is where the streamreader will go If you plan to upload your code to a github repository you don't want your token in the project. The gitignore will ignore the bin folders and will only push the main project. So this means if you have your token exposed in the config.json of your solution, discord will detect your token going public and auto reset it So if you only change the JSON file in the bin folder, it'll still function while still being able to push code to the repository I admit there are better ways to store the token but json is quick, easy and secure
18:55 - "Why are we doing this? This seems very weird, why don't I just set it to include on every build?"
[TEN SECONDS LATER] OOOOOH!
And showing what EXACTLY you mean at 19:19 is so huge, thank you.
I love that he tries to explain what he's gonna do bur VS always guesses what he gonna say.
I was waiting for this kind of tutorial for making a discord bot with C#. The other tutorials are already outdated and doesnt work. Thank you so much for this, ill watch all the series
For your config file a better way to handle getting it into your output directory would be to go to the files properties and set the build action to none and copy to output directory to always or if newer. I would recommend if newer most of the time
This works, thankyou man! I'm creating a server & making a Discord bot of my own was the way to go. I just got the bot to come online & am about to watch part 2!!
Best person who i've seen to teach this :>
Imagine this combo of C#, C++ and Lua :0
Great tutorial! Thank you
Thank you, based vegeta.
Great video. NO joke! Nice Job SamJesus
Love to see a new and updated version
Thanks for the help!! You really explained everything very well
Awesome video, tutor, very underrated sadly
Thanks man! I belive discord bot is one of the best pet projects for me!
Thank you soo much! Loved the videos man!
Best teacher
much appreciated
thank you so much for this series mr samjesus
thanks bro , it was nice and clear
So im getting into coding and when I tried starting it, it wouldnt run so i looked and on this code
var discordConfig = new DiscordConfiguration()
{
Intents = DiscordIntents.All,
Token = jsonReader.Token,
TokenType = TokenType.Bot,
AutoReconnect = true
};
it kept giving me this message and idk what to do
System.ArgumentNullException: 'Token cannot be null, empty, or all whitespace.
Parameter name: value'
and im just lost as to how I can fix it because i have the token in the file, i coped and pasted it into the bin, and I mean i rewatched the video 3 times and redid it all to make sure but it still pops up so I really dont know what to do about this any help?
nvm im just dumb I didnt notice i had the json.Reader.Token in caps in the second line oops nvm we good
@@NexonMotion glad you got it fixed, i recommend joining our server if you need any further help👍
You know what I don't get? Why is visual studio so much better than vscode for C#? They are both made by microsoft; let me just use all the visual studio stuff on vscode Q_Q
What is this +- thing to insert a method??
Edit: I just saw it's += my bad
9:34 discordclient does not appear
i loved it i works great❤
I get this error: "Authentication failed. Check your token and try again." I just resetted my bot token and copied it. But it didn't work.
So i'm confused should i copy the ( config.json ) to the exe file and edit it there (talking about >>> /bin/debug), or edit the one that in file config/config.json
You need to edit the config.json that is in the bin/Debug folder, not the one in the project
Works perfectly. Thanks
I get this error: "Authentication failed. Check your token and try again." I just resetted my bot token and copied it. But it didn't work.
Do you have the config file with the exe file
@@krowalski7906 Yes, apparently I had 2 different discord bots, and im only allowed one or something. so I used the same bot and it worked.
Thanks for replying though.
I have problems with the debug folder when I open the folder is the folder empty
You need to build your solution first, go to the Build tab at the top, then press Build Solution and then your bin/Debug folder should have an output where u can then put in the config.json file. If you are having further issues, please join our discord server
@@samjesus8
I joined to your discord server where i can write to you?
Nice work
thank you for this video(s).
Hi. thank you and thank you for this video
why are you using net framework instead of plain console app?
what do you mean by "plain console app", this makes no sense as C# is the programming language for .NET Framework and .NET Core which is a more up-to-date version. I use .NET Framework in the tutorial as just a basic example but using .NET Core is a good idea for the latest features
@@samjesus8 i meant console app with .net core. you know, the one without parentheses after the name? instead of console app (.net framework). i was just wondering if there was a reason it had be to .net framework because i dont want to run this on windows.
@@tatybara you can run .net framework applications on linux as I've shown later on in the tutorial. Sorry for the late reply
i got this message "connection terminated (4014, 'Disallowed intent(s).')
sameee idk whats wrong
oh i figured it out. i need to enable privileged gateway intents in discord dev portal
Under "bot" in Discord Development settings turn on all intentions.
Where does the token go? Still in the config file or elsewhere?
First in %project_name% /config/config.json (contains the word "token").
Second in %project_name% / bin/Debug/config.json (contains 28 characters the real token).
Still in the config.json file yes. But only the one in your bin/Debug folder since that is where the streamreader will go
If you plan to upload your code to a github repository you don't want your token in the project. The gitignore will ignore the bin folders and will only push the main project. So this means if you have your token exposed in the config.json of your solution, discord will detect your token going public and auto reset it
So if you only change the JSON file in the bin folder, it'll still function while still being able to push code to the repository
I admit there are better ways to store the token but json is quick, easy and secure
The bot wont go online?
getting the same issue but code not showing errors
same here
This guy stutters a lot :D
Doesn't matter, still a great tutorial by him. He put himself to test and managed to make a great resource. Chapeau.
Rude
Thank you