MCPcopy Create free account
hub / github.com/Kloping/qqpd-bot-java / AtAll

Class AtAll

src/main/java/io/github/kloping/qqbot/entities/ex/AtAll.java:12–40  ·  view source on GitHub ↗

@author github.kloping

Source from the content-addressed store, hash-verified

10 * @author github.kloping
11 */
12public class AtAll implements SendAble {
13
14 private boolean old;
15
16 public AtAll() {
17 this(false);
18 }
19
20 public AtAll(boolean old) {
21 this.old = old;
22 }
23
24 @Override
25 public Result send(SenderAndCidMidGetter er) {
26 if (er.getEnvType() == EnvType.GUILD) {
27 MessagePacket packet = new MessagePacket();
28 if (old) packet.setContent("@everyone");
29 else packet.setContent("<qqbot-at-everyone/>");
30 return er.send(packet);
31 } else {
32 return er.send("@所有人");
33 }
34 }
35
36 @Override
37 public String toString() {
38 return "@atAll";
39 }
40}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected