Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
e9c44573
Commit
e9c44573
authored
Apr 16, 2020
by
Him188
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
870ed59d
1063dd06
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
33 deletions
+18
-33
CHANGELOG.md
CHANGELOG.md
+2
-2
README.md
README.md
+14
-29
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt
+2
-2
No files found.
CHANGELOG.md
View file @
e9c44573
...
...
@@ -5,7 +5,7 @@
## `0.37.3` 2020/4/15
新增:
-
在群名
片修改事件(
`MemberCard
ChangeEvent`
)中支持获取操作人
-
在群名
修改事件(
`GroupName
ChangeEvent`
)中支持获取操作人
-
修复 #229, 引入
`ServiceMessage`
作为
`JsonMessage`
,
`XmlMessage`
的父类并处理所有类型富文本消息解析
-
将所有
`RichMessage`
标注
`MiraiExperimentalAPI`
以警告将来改动
...
...
@@ -50,7 +50,7 @@
-
修复退群事件重复广播的问题 (#221)
## `0.36.1` 2020/4/10
-
修复
`bot
As
Permission`
-
修复
`botPermission`
-
删除一些无用的调试输出
## `0.36.0` 2020/4/10
...
...
README.md
View file @
e9c44573
...
...
@@ -23,11 +23,11 @@ Mirai 是一个在全平台下运行,提供 QQ Android 和 TIM PC 协议支持
**[English](README-eng.md)**
多平台
**QQ Android**
和
**TIM PC**
协议支持库与高效率的机器人框架.
纯 Kotlin 实现协议和支持框架
,模块
<b>
全部免费开源
</b>
。
mirai 既可以作为项目中的 QQ 协议支持库, 也可以作为单独的应用程序与插件承载 QQ 机器人服务。
**QQ Android**
协议支持库与高效率的机器人框架
纯 Kotlin 实现协议和支持框架
mirai 既可以作为项目中的 QQ 协议支持库, 也可以作为单独的应用程序与插件承载 QQ 机器人服务。
##
#
**一切开发旨在学习,请勿用于非法用途**
## **一切开发旨在学习,请勿用于非法用途**
加入
[
![Gitter
](
https://badges.gitter.im/mamoe/mirai.svg
)
](https://gitter.im/mamoe/mirai?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge), 或加入 QQ 群: 655057127
...
...
@@ -61,12 +61,19 @@ mirai 既可以作为项目中的 QQ 协议支持库, 也可以作为单独的
| 完整好友列表 |
| 处理新好友申请 |
#### 不会支持的协议:
-
点赞
-
收付款
-
主动添加好友
-
主动加入群
-
主动邀请好友加群
**一切开发旨在学习,请勿用于非法用途**
## 开始
Mirai 目前为快速流转(Moving fast)状态, 增量版本之间可能不具有兼容性,任何功能都可能在没有警告的情况下添加、删除或者更改。
**Mirai 源码完全开放, 您可以参考 Mirai 的协议实现来开发其他框架, 但需注明来源并遵守开源协议要求 (AGPLv3)**
。
### 开发者
**了解 mirai 架构**
:
[
Wiki
](
https://github.com/mamoe/mirai/wiki/Home
)
...
...
@@ -94,9 +101,7 @@ Demos: [mirai-demos](https://github.com/mamoe/mirai-demos)
-
[
mirai-console
](
https://github.com/mamoe/mirai-console
)
支持插件
**本模块正在完善**
### 我是其他平台的使用者
#### 酷 Q 平台用户:
### 其他平台的使用者
-
酷Q的插件可以在 mirai 中加载, 详见
[
Mirai-Native
](
https://github.com/iTXTech/mirai-native
)
-
使用
`酷Q HTTP API`
的插件将可以在 mirai 中加载,
`Mirai-CQ-Adapter`
正在进行中
...
...
@@ -115,26 +120,6 @@ Demos: [mirai-demos](https://github.com/mamoe/mirai-demos)
您的
`star`
是对我们最大的鼓励(点击项目右上角)
### 贡献者
感谢以下全体开发者对 mirai 的贡献(排名不分先后)
[
<img width="60px" height="60px" src="https://avatars2.githubusercontent.com/u/12100985?s=60&v=4" />
](
https://github.com/Him188
)
[
<img width="60px" height="60px" src="https://avatars0.githubusercontent.com/u/24618776?s=60&v=4" />
](
https://github.com/liujiahua123123
)
[
<img width="60px" height="60px" src="https://avatars2.githubusercontent.com/u/28707253?s=60&v=4" />
](
https://github.com/ryoii
)
[
<img width="60px" height="60px" src="https://avatars1.githubusercontent.com/u/11070535?s=60&v=4" />
](
https://github.com/jasonczc
)
[
<img width="60px" height="60px" src="https://avatars2.githubusercontent.com/u/13656668?s=60&v=4" />
](
https://github.com/PeratX
)
[
<img width="60px" height="60px" src="https://avatars1.githubusercontent.com/u/23146087?s=60&v=4" />
](
https://github.com/mzdluo123
)
[
<img width="60px" height="60px" src="https://avatars2.githubusercontent.com/u/18532671?s=60&v=4" />
](
https://github.com/uebian
)
[
<img width="60px" height="60px" src="https://avatars1.githubusercontent.com/u/4546175?s=60&v=4" />
](
https://github.com/kenvix
)
[
<img width="60px" height="60px" src="https://avatars2.githubusercontent.com/u/10308687?s=60&v=4" />
](
https://github.com/Freedom0925
)
[
<img width="60px" height="60px" src="https://avatars3.githubusercontent.com/u/16398479?s=60&v=4" />
](
https://github.com/ice1000
)
[
<img width="60px" height="60px" src="https://avatars0.githubusercontent.com/u/20042607?s=60&v=4" />
](
https://github.com/PragmaTwice
)
[
<img width="60px" height="60px" src="https://avatars0.githubusercontent.com/u/25280943?s=60&v=4" />
](
https://github.com/HoshinoTented
)
[
<img width="60px" height="60px" src="https://avatars3.githubusercontent.com/u/40517459?s=60&v=4" />
](
https://github.com/Cyenoch
)
[
<img width="60px" height="60px" src="https://avatars1.githubusercontent.com/u/31543961?s=60&v=4" />
](
https://github.com/Chenwe-i-lin
)
[
<img width="60px" height="60px" src="https://avatars1.githubusercontent.com/u/13938334?s=60&v=4" />
](
https://github.com/lengthmin
)
## 鸣谢
特别感谢
[
JetBrains
](
https://www.jetbrains.com/?from=mirai
)
为开源项目提供免费的
[
IntelliJ IDEA
](
https://www.jetbrains.com/idea/?from=mirai
)
等 IDE 的授权
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt
View file @
e9c44573
...
...
@@ -115,7 +115,7 @@ abstract class Bot : CoroutineScope, LowLevelBotAPIAccessor, BotJavaFriendlyAPI(
* 获取一个好友对象.
* @throws [NoSuchElementException] 当不存在这个好友时抛出
*/
fun
getFriend
(
id
:
Long
):
QQ
=
friends
.
firstOrNull
{
it
.
id
==
id
}
?:
throw
NoSuchElementException
(
"
group
$id"
)
fun
getFriend
(
id
:
Long
):
QQ
=
friends
.
firstOrNull
{
it
.
id
==
id
}
?:
throw
NoSuchElementException
(
"
friend
$id"
)
/**
* 机器人加入的群列表. 与服务器同步更新
...
...
@@ -343,4 +343,4 @@ inline fun Bot.containsGroup(id: Long): Boolean = this.groups.contains(id)
inline
fun
Bot
.
getFriendOrNull
(
id
:
Long
):
QQ
?
=
this
.
friends
.
getOrNull
(
id
)
@JvmSynthetic
inline
fun
Bot
.
getGroupOrNull
(
id
:
Long
):
Group
?
=
this
.
groups
.
getOrNull
(
id
)
\ No newline at end of file
inline
fun
Bot
.
getGroupOrNull
(
id
:
Long
):
Group
?
=
this
.
groups
.
getOrNull
(
id
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment