Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathtest_inputSendMessage.java
More file actions
Latest commit
31 lines (29 loc) · 1002 Bytes
/
Copy pathtest_inputSendMessage.java
File metadata and controls
31 lines (29 loc) · 1002 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
importio.github.kloping.qqbot.Starter;
importio.github.kloping.qqbot.entities.qqpd.Channel;
importio.github.kloping.qqbot.entities.qqpd.Guild;
importjava.util.Scanner;
/**
* @author github.kloping
*/
publicclasstest_inputSendMessage {
publicstaticvoidmain(String[] args) throwsException {
Starterstarter = test_main.factory();
starter.run();
Guild[] guilds = starter.getBot().guilds().toArray(newGuild[0]);
Channel[] channels = starter.getBot().guildBase.getChannels(guilds[0].getId());
Channelchannel = null;
for (Channelchannel1 : channels) {
if (channel1.getName().equals("游戏大厅")) {
channel = channel1;
}
}
Thread.sleep(5000);
Stringline = null;
Scannersc = newScanner(System.in);
while (true) {
line = sc.nextLine();
if (line == null || line.isEmpty()) continue;
channel.send(line);
}
}
}