Skip to content

Commit

Permalink
Command
Browse files Browse the repository at this point in the history
  • Loading branch information
xdnw committed May 10, 2024
1 parent 8e440b9 commit 92f3a22
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ public CommandManager2 registerDefaults() {
getCommands().registerMethod(new ConflictCommands(), List.of("conflict", "sync"), "importCtowned", "ctowned");
getCommands().registerMethod(new ConflictCommands(), List.of("conflict", "sync"), "importWikiPage", "wiki_page");
getCommands().registerMethod(new ConflictCommands(), List.of("conflict", "sync"), "importWikiAll", "wiki_all");
getCommands().registerMethod(new ConflictCommands(), List.of("conflict", "sync"), "recalculateGraphData", "recalculate_graphs");
getCommands().registerMethod(new ConflictCommands(), List.of("conflict", "sync"), "recalculateTableData", "recalculate_tables");
getCommands().registerMethod(new ConflictCommands(), List.of("conflict", "sync"), "recalculateGraphs", "recalculate_graphs");
getCommands().registerMethod(new ConflictCommands(), List.of("conflict", "sync"), "recalculateTables", "recalculate_tables");
getCommands().registerMethod(new ConflictCommands(), List.of("conflict", "sync"), "importAllianceNames", "alliance_names");

getCommands().registerMethod(new ConflictCommands(), List.of("conflict", "alliance"), "removeCoalition", "remove");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2165,6 +2165,7 @@ public String templateSend(@Me GuildDB db, @Me Member selfMember, @Me DBNation m
@RolePermission(value = {Roles.ECON_STAFF, Roles.ECON, Roles.ECON_WITHDRAW_SELF}, any = true)
public String withdrawEscrowed(@Me OffshoreInstance offshore, @Me IMessageIO channel, @Me JSONObject command, @Me GuildDB db, @Me DBNation me, @Me User author, DBNation receiver, Map<ResourceType, Double> amount,
@Switch("f") boolean force) throws IOException {
if (author.getIdLong() != Settings.INSTANCE.ADMIN_USER_ID) return "Error";
// Require ECON_STAFF if receiver is not me
if (receiver.getId() != me.getId()) {
if (!Roles.ECON_STAFF.has(author, db.getGuild())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,7 @@ public TransferResult transferFromNationAccountWithRoleChecks(Supplier<Map<Long,
senderDB.setEscrowed(receiver.asNation(), balance, escrowDate);
}
// result = Map.entry(TransferStatus.SUCCESS, "Escrowed `" + PW.resourcesToString(amount) + "` for " + receiver.getName() + ". use " + CM.escrow.withdraw.cmd.toSlashMention() + " to withdraw.");
isInternalTransfer = true;
result = new TransferResult(TransferStatus.SUCCESS, receiver, amount, ingameNote)
.addMessage("Escrowed `" + ResourceType.resourcesToString(amount) + "` for " + receiver.getMarkdownUrl(),
"Use " + CM.escrow.withdraw.cmd.toSlashMention() + " to withdraw.");
Expand Down

0 comments on commit 92f3a22

Please sign in to comment.