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
c8d92c4b
Commit
c8d92c4b
authored
Sep 19, 2019
by
liujiahua123123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
miraiAPI
parent
deeb8fa3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
16 deletions
+22
-16
mirai-api/src/main/java/net/mamoe/mirai/MiraiAPI.java
mirai-api/src/main/java/net/mamoe/mirai/MiraiAPI.java
+4
-0
mirai-console/pom.xml
mirai-console/pom.xml
+6
-0
mirai-console/src/main/java/net/mamoe/mirai/MiraiConsole.java
...i-console/src/main/java/net/mamoe/mirai/MiraiConsole.java
+11
-0
mirai-core/src/main/java/net/mamoe/mirai/MiraiServer.java
mirai-core/src/main/java/net/mamoe/mirai/MiraiServer.java
+1
-16
No files found.
mirai-api/src/main/java/net/mamoe/mirai/MiraiAPI.java
View file @
c8d92c4b
...
...
@@ -56,4 +56,8 @@ public class MiraiAPI {
return
new
Bot
(
qq
);
}
public
static
void
addBot
(
long
qq
,
String
password
){
}
}
mirai-console/pom.xml
View file @
c8d92c4b
...
...
@@ -16,6 +16,12 @@
<dependencies>
<dependency>
<groupId>
net.mamoe
</groupId>
<artifactId>
mirai-api
</artifactId>
<version>
1.0
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
<build>
...
...
mirai-console/src/main/java/net/mamoe/mirai/MiraiConsole.java
View file @
c8d92c4b
package
net.mamoe.mirai
;
import
java.util.Scanner
;
public
class
MiraiConsole
{
public
static
void
main
(
String
[]
args
){
System
.
out
.
println
(
">>> starting Mirai"
);
MiraiAPI
.
startMirai
(
args
);
}
public
static
void
processCommand
(
String
command
){
}
}
mirai-core/src/main/java/net/mamoe/mirai/MiraiServer.java
View file @
c8d92c4b
...
...
@@ -154,23 +154,8 @@ public final class MiraiServer {
private
void
initQQConfig
(
File
qqConfig
)
{
this
.
qqs
=
new
MiraiConfig
(
qqConfig
);
MiraiConfigSection
<
Object
>
section
=
new
MiraiConfigSection
<>();
Scanner
scanner
=
new
Scanner
(
System
.
in
);
getLogger
().
info
(
"Input a "
+
LoggerTextFormat
.
RED
+
" QQ number "
+
LoggerTextFormat
.
GREEN
+
"for default botNetworkHandler"
);
getLogger
().
info
(
"输入用于默认机器人的QQ号"
);
long
qqNumber
=
scanner
.
nextLong
();
getLogger
().
info
(
"Input the password for that QQ account"
);
getLogger
().
info
(
"输入该QQ号的密码"
);
String
qqPassword
=
scanner
.
next
();
section
.
put
(
"password"
,
qqPassword
);
section
.
put
(
"owner"
,
"default"
);
this
.
qqs
.
put
(
String
.
valueOf
(
qqNumber
),
section
);
this
.
qqs
.
save
();
getLogger
().
info
(
"QQ account initialized; changing can be made in Config file: "
+
qqConfig
.
toString
());
getLogger
().
info
(
"QQ 账户管理初始化完毕"
);
}
private
void
onEnabled
()
{
...
...
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