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
6e33ddf2
Commit
6e33ddf2
authored
Jan 18, 2020
by
jiahua.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plugin supporting
parent
d67a8585
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
30 deletions
+47
-30
mirai-console/build.gradle
mirai-console/build.gradle
+1
-0
mirai-console/src/main/kotlin/MiraiConsole.kt
mirai-console/src/main/kotlin/MiraiConsole.kt
+46
-0
mirai-console/src/main/kotlin/net/mamoe/mirai/MiraiConsole.java
...console/src/main/kotlin/net/mamoe/mirai/MiraiConsole.java
+0
-20
mirai-console/src/main/kotlin/net/mamoe/mirai/MiraiMain.java
mirai-console/src/main/kotlin/net/mamoe/mirai/MiraiMain.java
+0
-10
No files found.
mirai-console/build.gradle
View file @
6e33ddf2
...
@@ -3,6 +3,7 @@ apply plugin: "java"
...
@@ -3,6 +3,7 @@ apply plugin: "java"
dependencies
{
dependencies
{
api
project
(
':mirai-core'
)
api
project
(
':mirai-core'
)
api
project
(
':mirai-core-timpc'
)
runtimeOnly
files
(
'../mirai-core/build/classes/kotlin/jvm/main'
)
runtimeOnly
files
(
'../mirai-core/build/classes/kotlin/jvm/main'
)
// classpath is not set correctly by IDE
// classpath is not set correctly by IDE
}
}
mirai-console/src/main/kotlin/MiraiConsole.kt
0 → 100644
View file @
6e33ddf2
import
kotlinx.coroutines.GlobalScope
import
kotlinx.coroutines.launch
import
net.mamoe.mirai.Bot
import
kotlin.concurrent.thread
fun
main
()
{
println
(
"loading Mirai in console environments"
)
println
(
"正在控制台环境中启动Mirai "
)
println
()
println
(
"Mirai-console is still in testing stage, some feature is not available"
)
println
(
"Mirai-console 还处于测试阶段, 部分功能不可用"
)
println
()
println
(
"Mirai-console now running on "
+
System
.
getProperty
(
"user.dir"
))
println
(
"Mirai-console 正在 "
+
System
.
getProperty
(
"user.dir"
)
+
" 运行"
)
println
()
println
(
"\"login qqnumber qqpassword \" to login a bot"
)
println
(
"\"login qq号 qq密码 \" 来登陆一个BOT"
)
thread
{
loop
@
while
(
true
)
{
var
command
=
readLine
()
if
(
command
!=
null
)
{
var
commandArgs
=
command
.
split
(
" "
)
when
(
commandArgs
[
0
])
{
"login"
->
{
if
(
commandArgs
.
size
<
3
)
{
println
(
"\"login qqnumber qqpassword \" to login a bot"
)
println
(
"\"login qq号 qq密码 \" 来登陆一个BOT"
)
continue
@
loop
}
val
qqNumber
=
commandArgs
[
1
].
toLong
()
val
qqPassword
=
commandArgs
[
2
]
println
(
"login..."
)
GlobalScope
.
launch
{
Bot
(
qqNumber
,
qqPassword
)
}
}
}
}
}
}
}
mirai-console/src/main/kotlin/net/mamoe/mirai/MiraiConsole.java
deleted
100644 → 0
View file @
d67a8585
package
net.mamoe.mirai
;
public
class
MiraiConsole
{
public
static
void
main
(
String
[]
args
){
System
.
out
.
println
(
">>> starting Mirai"
);
// MiraiAPI.startMirai(args);
}
public
static
void
processCommand
(
String
command
){
}
public
void
log
(
Object
o
){
System
.
out
.
println
(
o
);
}
}
mirai-console/src/main/kotlin/net/mamoe/mirai/MiraiMain.java
deleted
100644 → 0
View file @
d67a8585
package
net.mamoe.mirai
;
/**
* @author NaturalHG
*/
public
final
class
MiraiMain
{
public
static
void
main
(
String
[]
args
)
{
}
}
\ No newline at end of file
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