New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Guild support #2250
feat: Guild support #2250
Conversation
Nekoer
commented
Sep 13, 2022
•
edited by mzdluo123
edited by mzdluo123
- 缓存频道和子频道
- 缓存频道成员
- 频道图片上传
- 发送消息(文本+图片)
- 频道消息解析
- 私聊消息解析
- 发送私聊消息
- 上传文件
- 创建子频道
- 删除子频道
- 修改子频道
- 加入频道通知
- 退出频道
- 消息贴表情更新
- 撤回
- 频道成员资料
- 频道成员权限
插个眼,写好了踢我 |
@Him188 想讨论一下频道成员初始化是否储存,频道成员都是以千计算的 |
就当一个成员对象算占用 1KB, 一千个成员就是 1MB, 也可以接受吧 |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
等一手Lz4解码,不然频道里桃源岛之类的官频无法解析 |
不是很清楚消息怎么显示到控制台 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Api review
另外我觉得这 GuildDirect
应该叫 GuildPrivate
更好?
into(buildDir.resolve("resources")) | ||
} | ||
|
||
tasks.getByName("classes").dependsOn(copyResources) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请不要把本地测试代码推上来
* https://github.com/mamoe/mirai/blob/dev/LICENSE | ||
*/ | ||
|
||
package net.mamoe.mirai.contact |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
guild 涉及到的新 contact 比较多可以考虑创建一个新的包
/** | ||
* 机器人在其他客户端发送频道私信消息同步到这个客户端的事件 | ||
* | ||
* @see MessageSyncEvent | ||
*/ | ||
public class DirectMessageSyncEvent private constructor( | ||
private val _client: OtherClient?, | ||
public val guild: Guild, | ||
public override val message: MessageChain, | ||
public override val sender: GuildMember, | ||
public override val senderName: String, | ||
public override val time: Int, | ||
@Suppress("UNUSED_PARAMETER") _primaryConstructorMark: Any?, | ||
) : AbstractMessageEvent(), MessageSyncEvent { | ||
/** | ||
* @since 2.13 | ||
*/ | ||
public override val client: OtherClient | ||
get() = _client ?: error("client is not set. Please use the new constructor.") | ||
|
||
/** | ||
* @since 2.13 | ||
*/ | ||
public constructor( | ||
client: OtherClient, | ||
guild: Guild, | ||
message: MessageChain, | ||
sender: GuildMember, | ||
senderName: String, | ||
time: Int | ||
) : this(client, guild, message, sender, senderName, time, null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
mirai-core-api/src/commonMain/kotlin/message/data/MessageSource.kt
Outdated
Show resolved
Hide resolved
mirai-core-api/src/commonMain/kotlin/message/data/MessageSource.kt
Outdated
Show resolved
Hide resolved
mirai-core-api/src/commonMain/kotlin/message/data/MessageSource.kt
Outdated
Show resolved
Hide resolved
mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Msg.kt
Outdated
Show resolved
Hide resolved
mirai-core/src/commonMain/kotlin/network/protocol/packet/guild/send/MsgProxy.SendMsg.kt
Outdated
Show resolved
Hide resolved
mirai-core/src/commonMain/kotlin/network/protocol/packet/guild/send/MsgProxy.SendMsg.kt
Outdated
Show resolved
Hide resolved
mirai-core/src/commonMain/kotlin/network/protocol/packet/guild/send/MsgProxy.SendMsg.kt
Outdated
Show resolved
Hide resolved
这个pr怎么关了 |
合并出错了() |
又关了( |
我建议你先把commits全部squash一下并避免用merge |
淦哦 |
火钳刘明 |
考个古,这个又关了,什么时候才能用上啊( |
代码没删,只是没时间写 |