Skip to content

Commit

Permalink
Disable bankbotinfo embed (#127)
Browse files Browse the repository at this point in the history
* disable bankbotinfo embed

* Removed bankbotinfo
  • Loading branch information
schuyberg authored Jul 19, 2024
1 parent f65e120 commit c716860
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
34 changes: 0 additions & 34 deletions src/features/raid-bots/update-bots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,40 +94,6 @@ const hidePassword = (password: string) => {
return "\\*".repeat(10);
};

export const updateBankBotInfo = (options: Options) =>
readyActionExecutor(async () => {
try {
checkGoogleCredentials();
} catch (err) {
console.warn(
"Update bank bots feature is disabled because google credentials were not found."
);
return;
}
const bankerAccounts = await accounts.getAccountsForRole(bankerRoleId);
const sorted = sortBy(
bankerAccounts,
(b) => b.purpose,
(b) => b.characters
);
await bankBotInstructions.createOrUpdateInstructions(
{
embeds: [
new EmbedBuilder({
title: "Bank Bot Credentials",
description:
"The guild bank is collectively stored across the following characters. Do not share with non-bankers.",
fields: sorted.map((b) => ({
name: `${b.purpose} - ${b.characters}`,
value: `${b.accountName} / ${hidePassword(b.password)}`,
})),
}),
],
},
true
);
}, options);

const guardBotInstructions = new InstructionsReadyAction(
Name.GuardBotInstructions,
guardOfficeChannelId
Expand Down
2 changes: 0 additions & 2 deletions src/listeners/ready-listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { updateReinforcementInfo } from "../features/raider-enlistment/update-re
import { updateApplicationInfo as updateApplicationInfo } from "../features/applications/update-applications";
import { updateRaidSchedule } from "../features/raid-schedule-info/update-action";
import {
updateBankBotInfo,
updateGuardBotInfo,
updateRaidBotsInfo,
} from "../features/raid-bots/update-bots";
Expand All @@ -21,7 +20,6 @@ export const readyListener = async (client: Client) => {
updateBankRequestInfo(client, updateOptions),
updateApplicationInfo(client, updateOptions),
updateRaidBotsInfo(updateOptions),
updateBankBotInfo(updateOptions),
updateGuardBotInfo(updateOptions),
updateInviteListInfo(client, updateOptions),
updateJewelryRequestInfo(client, updateOptions),
Expand Down

0 comments on commit c716860

Please sign in to comment.