|
2 | 2 | using Lagrange.Core.Common.Entity; |
3 | 3 | using Lagrange.Core.Message; |
4 | 4 | using Lagrange.Milky.Configuration; |
5 | | -using Lagrange.Milky.Entity; |
6 | 5 | using Lagrange.Milky.Extension; |
7 | 6 | using Lagrange.Milky.Utility; |
8 | 7 | using Microsoft.Extensions.Hosting; |
@@ -32,7 +31,6 @@ public Task StartAsync(CancellationToken token) |
32 | 31 | _bot.EventInvoker.RegisterEvent<LgrEvents.BotGroupNudgeEvent>(HandleGroupNudgeEvent); |
33 | 32 | _bot.EventInvoker.RegisterEvent<LgrEvents.BotGroupMemberDecreaseEvent>(HandleGroupMemberDecreaseEvent); |
34 | 33 | _bot.EventInvoker.RegisterEvent<LgrEvents.BotFriendRequestEvent>(HandleFriendRequestEvent); |
35 | | - _bot.EventInvoker.RegisterEvent<LgrEvents.BotGroupInviteSelfEvent>(HandleGroupInvitationEvent); |
36 | 34 |
|
37 | 35 | return Task.CompletedTask; |
38 | 36 | } |
@@ -176,31 +174,6 @@ private void HandleFriendRequestEvent(BotContext bot, LgrEvents.BotFriendRequest |
176 | 174 | _logger.LogHandleEventException(nameof(LgrEvents.BotFriendRequestEvent), e); |
177 | 175 | } |
178 | 176 | } |
179 | | - |
180 | | - private void HandleGroupInvitationEvent(BotContext bot, LgrEvents.BotGroupInviteSelfEvent @event) |
181 | | - { |
182 | | - try |
183 | | - { |
184 | | - _logger.LogGroupInvitationEvent( |
185 | | - @event.InvitationSeq, |
186 | | - @event.InitiatorUin, |
187 | | - @event.GroupUin |
188 | | - ); |
189 | | - var result = _convert.GroupInvitationEvent(@event); |
190 | | - byte[] bytes = JsonUtility.SerializeToUtf8Bytes(result.GetType(), result); |
191 | | - using (_lock.UsingReadLock()) |
192 | | - { |
193 | | - foreach (var handler in _handlers) |
194 | | - { |
195 | | - handler(bytes); |
196 | | - } |
197 | | - } |
198 | | - } |
199 | | - catch (Exception e) |
200 | | - { |
201 | | - _logger.LogHandleEventException(nameof(LgrEvents.BotGroupInviteSelfEvent), e); |
202 | | - } |
203 | | - } |
204 | 177 |
|
205 | 178 | public Task StopAsync(CancellationToken token) |
206 | 179 | { |
|
0 commit comments