MAKING A DISCORD BOT IN C# - CREATING & SETTING UP THE BOT (#1)

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 พ.ย. 2024

ความคิดเห็น • 64

  • @KingMob4313
    @KingMob4313 8 หลายเดือนก่อน +5

    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.

  • @ManfredVonKarma-Omni
    @ManfredVonKarma-Omni 6 หลายเดือนก่อน +2

    I love that he tries to explain what he's gonna do bur VS always guesses what he gonna say.

  • @Sashkobg97
    @Sashkobg97 ปีที่แล้ว +7

    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

  • @jonathonsissom6655
    @jonathonsissom6655 9 หลายเดือนก่อน +1

    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

  • @ClowReed.
    @ClowReed. ปีที่แล้ว +4

    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!!

  • @slaquemerda
    @slaquemerda 4 หลายเดือนก่อน

    Best person who i've seen to teach this :>

  • @TvoyOtchimPupsik
    @TvoyOtchimPupsik 10 หลายเดือนก่อน +1

    Imagine this combo of C#, C++ and Lua :0

  • @guygurman2890
    @guygurman2890 หลายเดือนก่อน

    Great tutorial! Thank you

  • @a.9913
    @a.9913 หลายเดือนก่อน

    Thank you, based vegeta.

  • @vicjay1139
    @vicjay1139 ปีที่แล้ว +1

    Great video. NO joke! Nice Job SamJesus

  • @FragZ999
    @FragZ999 ปีที่แล้ว +2

    Love to see a new and updated version

  • @nate1211
    @nate1211 ปีที่แล้ว +3

    Thanks for the help!! You really explained everything very well

  • @98lp65
    @98lp65 ปีที่แล้ว +1

    Awesome video, tutor, very underrated sadly

  • @RACER1562
    @RACER1562 ปีที่แล้ว +1

    Thanks man! I belive discord bot is one of the best pet projects for me!

  • @Aquilesxd
    @Aquilesxd 10 หลายเดือนก่อน +1

    Thank you soo much! Loved the videos man!

  • @LazerDynastio
    @LazerDynastio 5 หลายเดือนก่อน

    Best teacher

    • @samjesus8
      @samjesus8  5 หลายเดือนก่อน

      much appreciated

  • @user-wq3hu2pq4e
    @user-wq3hu2pq4e ปีที่แล้ว +1

    thank you so much for this series mr samjesus

  • @nightmere33
    @nightmere33 8 หลายเดือนก่อน

    thanks bro , it was nice and clear

  • @NexonMotion
    @NexonMotion 11 หลายเดือนก่อน +1

    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?

    • @NexonMotion
      @NexonMotion 11 หลายเดือนก่อน

      nvm im just dumb I didnt notice i had the json.Reader.Token in caps in the second line oops nvm we good

    • @samjesus8
      @samjesus8  11 หลายเดือนก่อน

      @@NexonMotion glad you got it fixed, i recommend joining our server if you need any further help👍

  • @a.9913
    @a.9913 หลายเดือนก่อน

    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

  • @J_1709
    @J_1709 4 หลายเดือนก่อน

    What is this +- thing to insert a method??
    Edit: I just saw it's += my bad

  • @sefahamza5451
    @sefahamza5451 6 หลายเดือนก่อน +1

    9:34 discordclient does not appear

  • @bobthina7209
    @bobthina7209 9 หลายเดือนก่อน

    i loved it i works great❤

  • @loka5789
    @loka5789 10 หลายเดือนก่อน +1

    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

    • @samjesus8
      @samjesus8  10 หลายเดือนก่อน

      You need to edit the config.json that is in the bin/Debug folder, not the one in the project

  • @ThinkInGold
    @ThinkInGold ปีที่แล้ว +1

    Works perfectly. Thanks

  • @Rayleigh1423
    @Rayleigh1423 ปีที่แล้ว +1

    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.

    • @krowalski7906
      @krowalski7906 ปีที่แล้ว

      Do you have the config file with the exe file

    • @Rayleigh1423
      @Rayleigh1423 ปีที่แล้ว

      @@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.

  • @Jibreel294
    @Jibreel294 7 หลายเดือนก่อน

    I have problems with the debug folder when I open the folder is the folder empty

    • @samjesus8
      @samjesus8  7 หลายเดือนก่อน +1

      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

    • @Jibreel294
      @Jibreel294 7 หลายเดือนก่อน

      @@samjesus8
      I joined to your discord server where i can write to you?

  • @Nixohc
    @Nixohc ปีที่แล้ว +1

    Nice work

  • @charonvacheron1797
    @charonvacheron1797 ปีที่แล้ว +1

    thank you for this video(s).

  • @Ja-Sharp
    @Ja-Sharp ปีที่แล้ว +1

    Hi. thank you and thank you for this video

  • @tatybara
    @tatybara 6 หลายเดือนก่อน

    why are you using net framework instead of plain console app?

    • @samjesus8
      @samjesus8  6 หลายเดือนก่อน

      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

    • @tatybara
      @tatybara 6 หลายเดือนก่อน

      ​@@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.

    • @samjesus8
      @samjesus8  5 หลายเดือนก่อน

      @@tatybara you can run .net framework applications on linux as I've shown later on in the tutorial. Sorry for the late reply

  • @Blank-qk8qo
    @Blank-qk8qo 9 หลายเดือนก่อน

    i got this message "connection terminated (4014, 'Disallowed intent(s).')

    • @aqxat1crei
      @aqxat1crei 8 หลายเดือนก่อน

      sameee idk whats wrong

    • @aqxat1crei
      @aqxat1crei 8 หลายเดือนก่อน

      oh i figured it out. i need to enable privileged gateway intents in discord dev portal

    • @burntdorito8297
      @burntdorito8297 4 หลายเดือนก่อน

      Under "bot" in Discord Development settings turn on all intentions.

  • @disfordungeon
    @disfordungeon ปีที่แล้ว

    Where does the token go? Still in the config file or elsewhere?

    • @SetAngelGreen
      @SetAngelGreen ปีที่แล้ว

      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).

    • @samjesus8
      @samjesus8  ปีที่แล้ว

      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

  • @villocity5794
    @villocity5794 ปีที่แล้ว +1

    The bot wont go online?

    • @thfiee
      @thfiee ปีที่แล้ว +1

      getting the same issue but code not showing errors

    • @lucatamborrelli3625
      @lucatamborrelli3625 7 หลายเดือนก่อน

      same here

  • @ArdLight
    @ArdLight 7 หลายเดือนก่อน

    This guy stutters a lot :D

    • @MidnaTv
      @MidnaTv 6 หลายเดือนก่อน

      Doesn't matter, still a great tutorial by him. He put himself to test and managed to make a great resource. Chapeau.

    • @tatybara
      @tatybara 6 หลายเดือนก่อน

      Rude

  • @Batman14156
    @Batman14156 3 หลายเดือนก่อน

    Thank you