This repository has been archived by the owner on Aug 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from Jie2GG/Test
同步官方SDK接口及事件
- Loading branch information
Showing
17 changed files
with
573 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Native.Csharp.Sdk.Cqp.EventArgs | ||
{ | ||
/// <summary> | ||
/// 表示群禁言事件参数的类 | ||
/// </summary> | ||
public class CqGroupBanEventArgs : CqEventArgsBase | ||
{ | ||
/// <summary> | ||
/// 表示当前事件的类型 | ||
/// </summary> | ||
public override int Type { get { return 104; } } | ||
|
||
/// <summary> | ||
/// 获取当前事件触发时间 | ||
/// </summary> | ||
public DateTime SendTime { get; private set; } | ||
|
||
/// <summary> | ||
/// 获取当前消息的来源群组号 | ||
/// </summary> | ||
public long FromGroup { get; private set; } | ||
|
||
/// <summary> | ||
/// 操作者QQ | ||
/// </summary> | ||
public long FromQQ { get; private set; } | ||
|
||
/// <summary> | ||
/// 获取当前事件触发时的目标QQ | ||
/// </summary> | ||
public long BeingOperateQQ { get; private set; } | ||
|
||
/// <summary> | ||
/// 禁言时长 | ||
/// </summary> | ||
public TimeSpan Duration { get; private set; } | ||
|
||
/// <summary> | ||
/// 获取或设置一个值, 指示当前是否处理过此事件. 若此值为 True 将停止处理后续事件 | ||
/// </summary> | ||
public bool Handler { get; set; } | ||
|
||
/// <summary> | ||
/// 初始化 <see cref="CqGroupBanEventArgs"/> 类的新实例 | ||
/// </summary> | ||
/// <param name="id"></param> | ||
/// <param name="name"></param> | ||
/// <param name="sendTime"></param> | ||
/// <param name="fromGroup"></param> | ||
/// <param name="fromQQ"></param> | ||
/// <param name="beingOperateQQ"></param> | ||
/// <param name="duration"></param> | ||
public CqGroupBanEventArgs (int id, string name, DateTime sendTime, long fromGroup, long fromQQ, long beingOperateQQ, TimeSpan duration) | ||
{ | ||
this.Id = id; | ||
this.Name = name; | ||
this.SendTime = sendTime; | ||
this.FromGroup = fromGroup; | ||
this.FromQQ = fromQQ; | ||
this.BeingOperateQQ = beingOperateQQ; | ||
this.Duration = duration; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Native.Csharp.Sdk.Cqp.EventArgs; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Native.Csharp.Sdk.Cqp.Interface | ||
{ | ||
/// <summary> | ||
/// Type=104 群解除禁言事件接口 | ||
/// </summary> | ||
public interface IReceiveRemoveGroupBan | ||
{ | ||
/// <summary> | ||
/// 当在派生类中重写时, 处理收到的群解除禁言 | ||
/// </summary> | ||
/// <param name="sender">事件的触发对象</param> | ||
/// <param name="e">事件的附加参数</param> | ||
void ReceiveRemoveGroupBan (object sender, CqGroupBanEventArgs e); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Native.Csharp.Sdk.Cqp.EventArgs; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Native.Csharp.Sdk.Cqp.Interface | ||
{ | ||
/// <summary> | ||
/// Type=104 群禁言事件接口 | ||
/// </summary> | ||
public interface IReceiveSetGroupBan | ||
{ | ||
/// <summary> | ||
/// 当在派生类中重写时, 处理收到的群禁言 | ||
/// </summary> | ||
/// <param name="sender">事件的触发对象</param> | ||
/// <param name="e">事件的附加参数</param> | ||
void ReceiveSetGroupBan (object sender, CqGroupBanEventArgs e); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Native.Csharp.Sdk.Cqp.Model | ||
{ | ||
/// <summary> | ||
/// 描述 QQ 好友信息的类 | ||
/// </summary> | ||
public class FriendInfo | ||
{ | ||
/// <summary> | ||
/// QQ帐号 | ||
/// </summary> | ||
public long Id { get; set; } | ||
|
||
/// <summary> | ||
/// QQ昵称 | ||
/// </summary> | ||
public string Nick { get; set; } | ||
|
||
/// <summary> | ||
/// 备注信息 | ||
/// </summary> | ||
public string Note { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.