Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Feature: 加入更多事件 #14

Closed
5 of 9 tasks
bsdayo opened this issue Oct 15, 2022 · 1 comment
Closed
5 of 9 tasks

Feature: 加入更多事件 #14

bsdayo opened this issue Oct 15, 2022 · 1 comment
Assignees
Labels
area-core Flandre.Core 相关 feature 特性建议
Milestone

Comments

@bsdayo
Copy link
Member

bsdayo commented Oct 15, 2022

目前能接收的事件比较有限,只有以下 7 种:

  • AppReadyEvent
  • AppStartingEvent
  • AppStoppedEvent
  • BotFriendRequestedEvent
  • BotGuildInvitedEvent
  • BotGuildRequestedEvent
  • BotMessageReceivedEvent

计划添加以下事件:

  • BotGuildJoinedEvent - Bot 加入群组
  • BotGuildLeftEvent - Bot 退出群组
  • BotGuildMemberJoinedEvent - 群组成员增加
  • BotGuildMemberLeftEvent - 群组成员减少
  • CommandParsingEvent - 指令解析前
  • CommandParsedEvent - 指令解析后
  • CommandInvokingEvent - 指令调用前
  • CommandInvokedEvent - 指令调用后
  • LoggerLoggingEvent - 日志记录前

可以在对应的事件中添加相关方法(如 CancelInvocation)来阻断事件,这样就可以替代 #13 中的中间件概念。

已经使用 IsCancelled 属性替代,设置为 true 即可取消事件。

@bsdayo bsdayo added feature 特性建议 area-core Flandre.Core 相关 labels Oct 15, 2022
@bsdayo bsdayo self-assigned this Oct 15, 2022
@bsdayo bsdayo added this to the 0.5 milestone Oct 15, 2022
@bsdayo
Copy link
Member Author

bsdayo commented Nov 29, 2022

由于重构 (#20),日后计划

@bsdayo bsdayo closed this as completed Nov 29, 2022
@bsdayo bsdayo moved this to Todo in Flandre Feb 21, 2023
@bsdayo bsdayo added this to Flandre Feb 21, 2023
@bsdayo bsdayo moved this from Todo to Done in Flandre Feb 21, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
area-core Flandre.Core 相关 feature 特性建议
Projects
Status: Done
Development

No branches or pull requests

1 participant