How To Code A Discord Bot In Visual Studio For Mac

Posted on  by 

Active2 years ago

Getting Started: Visual Studio Community 2017 Intro to Object Oriented Programming Video Tutorials C# Fundamentals: Development for Absolute Beginners Useful MSDN Resources A Tour of the C# Language Get started with.NET in 10 minutes C# Guide C# Language Reference C# Programing Guide C# Coding Conventions.NET Framework Reference Source Code. My editor of choice is Visual Studio Code. Personally, I am a sucker for beautiful looking editors and environment. I admit if you go too deep into this, it becomes a distraction. Node.js tutorial in Visual Studio Code. Node.js is a platform for building fast and scalable server applications using JavaScript. Node.js is the runtime and npm is the Package Manager for Node.js modules. Visual Studio Code has support for the JavaScript and TypeScript languages out-of-the-box as well as Node.js debugging.

So I've been having trouble with my Discord bot on Visual Studio 2015, C#. I've just started out literally 5 minutes ago and I've come across a problem that I've looked at but just can't seem to find out the problem with. It's saying that

should be a Username and password, or a token

But when I put my token in it says it needs two arguments.

Here is my code:

I've also tried putting

But it's just not working. Sorry if I'm not giving enough information, or if mine just isn't good enough, but please. What am I doing wrong?

Dorad
1,4541 gold badge24 silver badges43 bronze badges
OmegaOmega

3 Answers

Depending on what .Net lib version you are using, in the one you are using, you have to specify the TokeType like so:

JimJim
2,5391 gold badge15 silver badges28 bronze badges

simple mistake. Having a Discord Bot myself, I ran into the same issue. The API is constantly getting updated, so what you've dont use to be right, here's how you can fix it:

Balázs
2,4942 gold badges11 silver badges32 bronze badges
Wally ModzWally Modz

The method you are using is no longer working.

In 1.0 you should be using like this:

Community
f3ck4rf3ck4r

Not the answer you're looking for? Browse other questions tagged c#discorddiscord.net or ask your own question.

How To Code A Discord Bot In Javascript

A Discord C#/.NET Bot

This Discord bot is a chat and voice coded in C#. This bot currently is still in development, further changes to come.

This bot is built to be run on any .NET Framework compatible machine. It is meant for single server usage due to the heavy amount of resources the voice part consumes.

To Install:

To install do the following:

  • Clone our repo
  • Create a file called BotToken.txt in the /src directory with your bot token to get connected.
    • The file should contain only the token, nothing else.
  • Compile with Visual Studio, and it should be ready to go!

Current Features:

Admin Functions:

!mute [user](This allows admins to mute users.)

!unmute [user](This allows admins to unmute users.)

!kick [user] [reason](This allows admins to kick users.)

!ban [user] [reason](This allows admins to ban users.)

!addrole [user](This allows admins to add specific roles to a user.)

!delrole [user](This allows admins to remove specific roles to a user.)

How To Code A Discord Bot In Visual Studio For Mac

Music Functions:

How To Code A Discord Bot In Visual Studio For Mac

!join(Joins the user's voice channel.)

!leave(Leaves the current voice channel.)

!play [url/index](Plays a song by url or local path.)

!pause(Pauses the current song, if playing.)

!resume(Pauses the current song, if paused.)

!stop(Stops the current song, if playing or paused.)

!volume [num](Changes the volume to [0.0, 1.0].)

!add [url/index](Adds a song by url or local path to the playlist.)

!skip(Skips the current song, if playing from the playlist.)

!playlist(Shows what's currently in the playlist.)

!autoplay [enable](Starts the autoplay service on the current playlist.)

!download(Download songs into our local folder.)

!songs(Shows what's currently in our local folder.)

!cleanupsongs(Cleans the local folder of duplicate files.)

How To Code A Discord Bot In Python

Chat Functions:

!botstatus [status](Allows admins to set the bot's current game to [status])

How To Code A Discord Bot In Visual Studio For Mac

!say [msg](The bot will respond in the same channel with the message said.)

Discord

!clear [num](Allows admins to clear [num] amount of messages from current channel)

Coments are closed