Skip to content
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

Closed
wants to merge 0 commits into from
Closed

feat: Guild support #2250

wants to merge 0 commits into from

Conversation

Nekoer
Copy link
Contributor

@Nekoer Nekoer commented Sep 13, 2022

  • 缓存频道和子频道
  • 缓存频道成员
  • 频道图片上传
  • 发送消息(文本+图片)
  • 频道消息解析
  • 私聊消息解析
  • 发送私聊消息
  • 上传文件
  • 创建子频道
  • 删除子频道
  • 修改子频道
  • 加入频道通知
  • 退出频道
  • 消息贴表情更新
  • 撤回
  • 频道成员资料
  • 频道成员权限

@Nekoer Nekoer changed the title feat: Guild Notify feat: Guild support Sep 13, 2022
@NoMathExpectation
Copy link
Contributor

NoMathExpectation commented Sep 13, 2022

插个眼,写好了踢我

@Him188 Him188 added t:feature 类型: 新特性 x:protocol 属性: 协议相关 s:core 子系统: mirai-core labels Sep 14, 2022
@Nekoer
Copy link
Contributor Author

Nekoer commented Sep 14, 2022

@Him188 想讨论一下频道成员初始化是否储存,频道成员都是以千计算的

@Karlatemp
Copy link
Member

就当一个成员对象算占用 1KB, 一千个成员就是 1MB, 也可以接受吧

@Him188 Him188 linked an issue Sep 14, 2022 that may be closed by this pull request
@bin-tenkuu

This comment was marked as off-topic.

@Him188

This comment was marked as off-topic.

@keta1

This comment was marked as off-topic.

@Him188

This comment was marked as off-topic.

@Nekoer
Copy link
Contributor Author

Nekoer commented Sep 21, 2022

等一手Lz4解码,不然频道里桃源岛之类的官频无法解析

@Nekoer
Copy link
Contributor Author

Nekoer commented Sep 24, 2022

不是很清楚消息怎么显示到控制台

Copy link
Member

@Karlatemp Karlatemp left a 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)
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guild 涉及到的新 contact 比较多可以考虑创建一个新的包

mirai-core-api/src/commonMain/kotlin/contact/Channel.kt Outdated Show resolved Hide resolved
mirai-core-api/src/commonMain/kotlin/data/ChannelInfo.kt Outdated Show resolved Hide resolved
mirai-core-api/src/commonMain/kotlin/data/ChannelInfo.kt Outdated Show resolved Hide resolved
Comment on lines 306 to 336
/**
* 机器人在其他客户端发送频道私信消息同步到这个客户端的事件
*
* @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)
Copy link
Member

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/event/events/types.kt Outdated Show resolved Hide resolved
@NoMathExpectation
Copy link
Contributor

这个pr怎么关了

@Nekoer
Copy link
Contributor Author

Nekoer commented Oct 26, 2022

合并出错了()

@NoMathExpectation
Copy link
Contributor

又关了(

@Karlatemp
Copy link
Member

Karlatemp commented Dec 6, 2022

我建议你先把commits全部squash一下并避免用merge

@Nekoer
Copy link
Contributor Author

Nekoer commented Dec 7, 2022

淦哦

@Nekoer Nekoer reopened this Dec 7, 2022
@xem8k5
Copy link

xem8k5 commented Dec 11, 2022

火钳刘明

@NoMathExpectation
Copy link
Contributor

NoMathExpectation commented Sep 12, 2023

考个古,这个又关了,什么时候才能用上啊(
(啊我才发现作者把代码都删了,看来无望了)

@Nekoer
Copy link
Contributor Author

Nekoer commented Sep 17, 2023

考个古,这个又关了,什么时候才能用上啊( (啊我才发现作者把代码都删了,看来无望了)

代码没删,只是没时间写

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s:core 子系统: mirai-core t:feature 类型: 新特性 x:protocol 属性: 协议相关
Projects
None yet
Development

Successfully merging this pull request may close these issues.

支持 QQ 频道消息
7 participants