@author github.kloping
| 10 | * @author github.kloping |
| 11 | */ |
| 12 | public 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected