Skip to content

Commit

Permalink
Change Duration of mute into unsigned
Browse files Browse the repository at this point in the history
  • Loading branch information
Linwenxuan04 committed Aug 15, 2023
1 parent 6f88d29 commit a8f72b1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Lagrange.Core/Common/Interface/Api/GroupExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace Lagrange.Core.Common.Interface.Api;

public static class GroupExt
{
public static Task<bool> MuteGroupMember(this BotContext bot, uint groupUin, uint targetUin, int duration)
public static Task<bool> MuteGroupMember(this BotContext bot, uint groupUin, uint targetUin, uint duration)
=> bot.ContextCollection.Business.OperationLogic.MuteGroupMember(groupUin, targetUin, duration);

public static Task<bool> MuteGroupGlobal(this BotContext bot, uint groupUin, bool isMute)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public async Task<MessageResult> SendMessage(MessageChain chain)
return ((SendMessageEvent)events[0]).MsgResult;
}

public async Task<bool> MuteGroupMember(uint groupUin, uint targetUin, int duration)
public async Task<bool> MuteGroupMember(uint groupUin, uint targetUin, uint duration)
{
string? uid = await Collection.Business.CachingLogic.ResolveUid(groupUin, targetUin);
if (uid == null) return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ internal class GroupMuteMemberEvent : ProtocolEvent
{
public uint GroupUin { get; set; }

public int Duration { get; set; }
public uint Duration { get; set; }

public string Uid { get; set; } = "";

private GroupMuteMemberEvent(uint groupUin, int duration, string uid) : base(0)
private GroupMuteMemberEvent(uint groupUin, uint duration, string uid) : base(0)
{
GroupUin = groupUin;
Duration = duration;
Expand All @@ -17,7 +17,7 @@ private GroupMuteMemberEvent(uint groupUin, int duration, string uid) : base(0)

private GroupMuteMemberEvent(int resultCode) : base(resultCode) { }

public static GroupMuteMemberEvent Create(uint groupUin, int duration, string uid) => new(groupUin, duration, uid);
public static GroupMuteMemberEvent Create(uint groupUin, uint duration, string uid) => new(groupUin, duration, uid);

public static GroupMuteMemberEvent Result(int resultCode) => new(resultCode);
}

0 comments on commit a8f72b1

Please sign in to comment.