嘿,我正在尝试创建一个使用c#的机器人,但当我输入DiscordClient时出现错误。 这是我的Program.cs文件DiscordClient not recognized
using System;
namespace firstbot
{
class MainClass
{
public static void Main(string[] args)
{
MyBot bot = new MyBot();
}
}
}
这里是MyBot.cs文件
using System;
using Discord;
using Discord.Commands;
namespace firstbot
{
public class MyBot
{
DiscordClient discord; //error comes here
public MyBot()
{
}
}
}
的错误是: 命名空间DiscordClient的类型不能被发现。我不确定什么是错的,需要一些帮助。 在此先感谢
Install-Package DiscordSharp +添加使用。 – NtFreX