title: Discord Bot [C#] does not execute the Command
body: <p>I started writing a Discord bot, but i already did manage to run into a problem. I pretty much just wrote what <a href="https://www.youtube.com/watch?v=oE6alzUzcw4&amp;t=2s" rel="nofollow noreferrer">he</a> wrote with some minor changes that shouldn't affect the program too much. I have 2 Classes, the Main class which just gets the token for the bot and then creates the bot with </p>
  
  <pre><code>MyBot bot = MyBot(token)
  </code></pre>
  
  <p>Here is the MyBot.cs:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using Discord;
  using Discord.Commands;
  
  namespace Coding_Bot
  {
      class MyBot
      {
          DiscordClient discord;
          String botToken;
  
          public MyBot(String tempToken)
          {
  
              botToken = tempToken;
              discord = new DiscordClient(x =&gt;
              {
                  x.LogLevel = LogSeverity.Info;
                  x.LogHandler = Log;
              });
              Console.WriteLine("[BOT] Connecting...");
              discord.ExecuteAndWait(async () =&gt;
              {
                  await discord.Connect(botToken, TokenType.Bot);
              });
  
  
              discord.UsingCommands(x =&gt;
              {
                  x.PrefixChar = '.';
                  x.AllowMentionPrefix = true;
              });
  
              var commands = discord.GetService&lt;CommandService&gt;();
  
              commands.CreateCommand("info").Do(async (e) =&gt;
              {
                  Console.WriteLine("!info executed");
                  await e.Channel.SendMessage("Coding Bot");
              });
          }
  
          private void Log(object sender, LogMessageEventArgs e)
          {
              Console.WriteLine("[BOT] " + e.Message);
          }
      }
  }
  </code></pre>
  
  <p>It does connect and the Bot does come online. This is the output in my console: </p>
  
  <pre><code>[BOT] Connecting...
  [BOT] Connected
  [BOT] GUILD_AVAILABLE: BotTestServer
  </code></pre>
  
  <p>When i now type .info in #general nothing happens. Nothing in the console and nothing in #general.
  I already looked at <a href="https://stackoverflow.com/questions/41747618/discord-bot-using-c-sharp-does-not-execute-the-command">this</a>, but it didn't solve my problem</p>
  
  <p>EDIT: I know i should use a CommandHandler class and not just put all my commands there. I will not do that in the future, but this was just for testing.</p>