You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
668 B
C#

using Lagrange.Core.Common.Interface.Api;
using Lagrange.Core.Message;
namespace RoBot.Start.Message
{
public static class RoBotMessage
{
/// <summary>
/// 发送消息
/// </summary>
/// <param name="bot">bo</param>
/// <param name="groupId">群组</param>
/// <param name="message">消息</param>
/// <returns></returns>
public static async Task SendMsg(this Lagrange.Core.BotContext bot, uint groupId, string message)
{
var groupMessageChain = MessageBuilder.Group(groupId).Text(message);
await bot.SendMessage(groupMessageChain.Build());
}
}
}