Skip to content

Commit

Permalink
拓展群成员API
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdoeswhat committed Mar 18, 2022
1 parent 9b93f28 commit 594471e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>me.albert</groupId>
<artifactId>AmazingBot</artifactId>
<packaging>jar</packaging>
<version>4.0.5</version>
<version>4.0.6</version>
<name>AmazingBot</name>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: AmazingBot
version: 4.0.5
version: 4.0.6
author: Albert
main: me.albert.amazingbot.AmazingBot
api-version: 1.13
Expand Down
20 changes: 20 additions & 0 deletions src/me/albert/amazingbot/objects/contact/Member.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,26 @@ public boolean kick(boolean rejectAddRequest) {
return Bot.getApi().groupKick(group_id, user_id, rejectAddRequest);
}

public boolean setCard(String card) {
return Bot.getApi().setGroupCard(group_id, user_id, card);
}

public boolean setSpecialTitle(String title) {
return Bot.getApi().setGroupSpecialTitle(group_id, user_id, title);
}

public boolean setAdmin(boolean enable) {
return Bot.getApi().setGroupAdmin(group_id, user_id, enable);
}

public boolean isAdmin() {
return role.equals("admin");
}

public boolean isOwner() {
return role.equals("owner");
}

public String getName() {
return card.trim().isEmpty() ? nickname : card;
}
Expand Down

0 comments on commit 594471e

Please sign in to comment.