Skip to content

Commit

Permalink
add ToT to blacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
torikushiii committed Aug 22, 2024
1 parent 5ce9143 commit f4aa360
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 10 deletions.
1 change: 1 addition & 0 deletions commands/expedition/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ module.exports = {
const { interaction } = context;
const supportedGames = app.HoyoLab.supportedGames({ blacklist: [
"honkai",
"tot",
"nap"
]});

Expand Down
5 changes: 4 additions & 1 deletion commands/notes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,10 @@ module.exports = {
run: (async function notes (context, game, uid) {
const { interaction } = context;

const supportedGames = app.HoyoLab.supportedGames({ blacklist: "honkai" });
const supportedGames = app.HoyoLab.supportedGames({ blacklist: [
"honkai",
"tot"
]});

if (supportedGames.length === 0) {
const message = "There are no accounts available for checking notes.";
Expand Down
5 changes: 4 additions & 1 deletion commands/redeem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ module.exports = {
],
run: (async function redeem (context, game, uid, code) {
const { interaction } = context;
const supportedGames = app.HoyoLab.supportedGames({ blacklist: "honkai" });
const supportedGames = app.HoyoLab.supportedGames({ blacklist: [
"honkai",
"tot"
]});

if (supportedGames.length === 0) {
if (interaction) {
Expand Down
5 changes: 4 additions & 1 deletion commands/stamina/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ module.exports = {
],
run: (async function stamina (context, game) {
const { interaction } = context;
const supportedGames = app.HoyoLab.supportedGames({ blacklist: "honkai" });
const supportedGames = app.HoyoLab.supportedGames({ blacklist: [
"honkai",
"tot"
]});

if (supportedGames.length === 0) {
const message = "There are no accounts available for checking stamina.";
Expand Down
6 changes: 5 additions & 1 deletion crons/code-redeem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ module.exports = {
expression: "* * * * *",
description: "Check and redeem codes supported games from HoyoLab.",
code: (async function codeRedeem () {
const accountData = app.HoyoLab.getActiveAccounts({ blacklist: "honkai" });
const accountData = app.HoyoLab.getActiveAccounts({ blacklist: [
"honkai",
"tot"
]});

if (accountData.length === 0) {
app.Logger.debug("CodeRedeem", "No active accounts found.");
return;
Expand Down
6 changes: 5 additions & 1 deletion crons/dailies-reminder/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ module.exports = {
description: "Reminds you to complete your dailies.",
code: (async function dailiesReminder () {
// eslint-disable-next-line object-curly-spacing
const accountsList = app.HoyoLab.getActiveAccounts({ blacklist: ["honkai"] });
const accountsList = app.HoyoLab.getActiveAccounts({ blacklist: [
"honkai",
"tot"
]});

if (accountsList.length === 0) {
app.Logger.warn("Cron:DailiesReminder", "No active accounts found to run dailies reminder for.");
return;
Expand Down
2 changes: 1 addition & 1 deletion crons/expedition/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
description: "Check for ongoing expeditions every 30 minutes and send a notification if all expeditions are completed.",
code: (async function expedition () {
// eslint-disable-next-line object-curly-spacing
const accountList = app.HoyoLab.getActiveAccounts({ blacklist: ["honkai", "nap"] });
const accountList = app.HoyoLab.getActiveAccounts({ blacklist: ["honkai", "nap", "tot"] });
if (accountList.length === 0) {
app.Logger.warn("Cron:Expedition", "No active accounts found to run expedition check for.");
return;
Expand Down
2 changes: 1 addition & 1 deletion crons/stamina/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
description: "Check for your stamina and notify you when it's within the set threshold.",
code: (async function stamina () {
// eslint-disable-next-line object-curly-spacing
const accountsList = app.HoyoLab.getActiveAccounts({ blacklist: ["honkai"] });
const accountsList = app.HoyoLab.getActiveAccounts({ blacklist: ["honkai", "tot"] });
if (accountsList.length === 0) {
app.Logger.warn("Cron:Stamina", "No active accounts found to run stamina check for.");
return;
Expand Down
3 changes: 2 additions & 1 deletion crons/update-cookie/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ module.exports = {
expression: "0 */2 * * *",
description: "Update cookie for all accounts",
code: (async function updateCookie () {
const accounts = app.HoyoLab.getActiveAccounts({ blacklist: "honkai" });
// eslint-disable-next-line object-curly-spacing
const accounts = app.HoyoLab.getActiveAccounts({ blacklist: ["honkai", "tot"] });
if (accounts.length === 0) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion crons/weeklies-reminder/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
description: "Reminds you to complete your weeklies.",
code: (async function weekliesReminder () {
// eslint-disable-next-line object-curly-spacing
const accountsList = app.HoyoLab.getActiveAccounts({ blacklist: ["honkai", "nap"] });
const accountsList = app.HoyoLab.getActiveAccounts({ blacklist: ["honkai", "nap", "tot"] });
if (accountsList.length === 0) {
app.Logger.warn("Cron:WeekliesReminder", "No active accounts found to run weeklies check for.");
return;
Expand Down
3 changes: 2 additions & 1 deletion platforms/telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ module.exports = class Telegram extends require("./template.js") {
const { command, args, channelData, userData } = data;

if (command === "redeem") {
const accounts = app.HoyoLab.getActiveAccounts({ blacklist: "honkai" });
// eslint-disable-next-line object-curly-spacing
const accounts = app.HoyoLab.getActiveAccounts({ blacklist: ["honkai", "tot"] });
if (accounts.length === 0) {
await this.send("There are no accounts available for redeeming codes.");
return;
Expand Down

0 comments on commit f4aa360

Please sign in to comment.