Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
xdnw committed Jun 2, 2024
1 parent b4dc6b6 commit 9bdeb01
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,11 @@ dependencies {
implementation 'gg.acai:chatgpt-java:1.0.2'
implementation platform("ai.djl:bom:0.22.1")
implementation "ai.djl:api:0.22.1"
runtimeOnly "ai.djl.pytorch:pytorch-engine:0.22.1"
runtimeOnly "ai.djl.pytorch:pytorch-model-zoo:0.22.1"
implementation "ai.djl.huggingface:tokenizers:0.22.1"
// runtimeOnly 'ai.djl.pytorch:pytorch-native-cu118:2.0.0:win-x86_64'
runtimeOnly 'ai.djl.pytorch:pytorch-jni:2.0.0-0.22.1'
runtimeOnly "ai.djl.pytorch:pytorch-engine:0.28.0"
runtimeOnly "ai.djl.pytorch:pytorch-model-zoo:0.28.0"
implementation "ai.djl.huggingface:tokenizers:0.28.0"
runtimeOnly 'ai.djl.pytorch:pytorch-native-cu121:2.2.2:win-x86_64'
runtimeOnly 'ai.djl.pytorch:pytorch-jni:2.2.2-0.28.0'
// implementation 'net.sourceforge.tess4j:tess4j:4.5.1'
implementation 'org.bytedeco:javacv:1.5.6'
implementation 'cn.easyproject:easyocr:3.0.4-RELEASE'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3626,7 +3626,7 @@ public static String deposits(@Me Guild guild, @Me GuildDB db, @Me IMessageIO ch

} else if (nationOrAllianceOrGuild.isNation()) {
DBNation nation = nationOrAllianceOrGuild.asNation();
if (nation != me && !Roles.INTERNAL_AFFAIRS.has(author, guild) && !Roles.INTERNAL_AFFAIRS_STAFF.has(author, guild) && !Roles.ECON.has(author, guild)) return "You do not have permission to check other nation's deposits";
if (nation != me && !Roles.INTERNAL_AFFAIRS.has(author, guild) && !Roles.INTERNAL_AFFAIRS_STAFF.has(author, guild) && !Roles.ECON.has(author, guild) && !Roles.ECON_STAFF.has(author, guild)) return "You do not have permission to check other nation's deposits";
// txList
accountDeposits = nation.getDeposits(db, offshoreIds, !includeBaseTaxes, !ignoreInternalOffsets, 0L, timeCutoff, includeIgnored, includeExpired, f -> true, true);
if (!hideEscrowed) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.apache.commons.lang3.StringUtils;

import java.io.IOException;
import java.util.List;

public class PlayerSettingCommands {

Expand Down Expand Up @@ -127,8 +128,15 @@ public String optOut(@Me User user, DiscordDB db, @Default("true") boolean optOu
public String auditAlertOptOut(@Me Member member, @Me DBNation me, @Me Guild guild, @Me GuildDB db) {
Role role = Roles.AUDIT_ALERT_OPT_OUT.toRole(guild);
if (role == null) {
role = RateLimitUtil.complete(guild.createRole().setName(Roles.AUDIT_ALERT_OPT_OUT.name()));
db.addRole(Roles.AUDIT_ALERT_OPT_OUT, role, 0);
// find role by name
List<Role> roles = db.getGuild().getRolesByName(Roles.AUDIT_ALERT_OPT_OUT.name(), true);
if (!roles.isEmpty()) {
role = roles.get(0);
db.addRole(Roles.AUDIT_ALERT_OPT_OUT, role, 0);
} else {
role = RateLimitUtil.complete(guild.createRole().setName(Roles.AUDIT_ALERT_OPT_OUT.name()));
db.addRole(Roles.AUDIT_ALERT_OPT_OUT, role, 0);
}
}
RateLimitUtil.queue(guild.addRoleToMember(member, role));
return "Opted out of audit alerts";
Expand Down

0 comments on commit 9bdeb01

Please sign in to comment.