Discord.net向命令运行者发送直接消息(PM)

时间:2017-07-09 09:19:05

标签: discord.net

所以我正在研究一个Discord机器人,我想要几乎每个机器人都使用的东西:当玩家键入命令(!help)时,它会向他发送cmds。有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

使用 Discord.Net 1.0 非常简单:

await Context.User.SendMessageAsync("Message");

你也可以嵌入这样的信息:

var EB = new EmbedBuilder();
EB.WithTitle("Secret Commands");
EB.WithDescription("!command \n" + "!anothercommand");

await Context.User.SendMessageAsync("", false, EB);