Compare commits

..

7 commits

Author SHA1 Message Date
c0ac18515f Merge branch 'main' into develop
All checks were successful
Deploy To Stage / build (push) Successful in 7s
Deploy To Stage / deploy (push) Successful in 16s
2024-06-03 18:45:42 +01:00
75315b3db2 v0.6.2
All checks were successful
Deploy To Production / build (push) Successful in 7s
Deploy To Production / deploy (push) Successful in 15s
2024-06-03 18:44:33 +01:00
25f605e623 0.6.2 2024-06-03 18:44:26 +01:00
1395a65344 Fix linter
All checks were successful
Test / build (push) Successful in 8s
2024-06-03 18:43:18 +01:00
fd16500315 Fix build 2024-06-03 18:42:01 +01:00
a581bf9d80 Migrate to yarn 2024-06-03 18:36:09 +01:00
1b707c4517 Rebalance the sacrifice amounts 2024-06-03 18:33:06 +01:00
12 changed files with 5979 additions and 11780 deletions

View file

@ -7,7 +7,7 @@
# any secret values. # any secret values.
BOT_TOKEN= BOT_TOKEN=
BOT_VER=0.6.1 BOT_VER=0.6.2
BOT_AUTHOR=Vylpes BOT_AUTHOR=Vylpes
BOT_OWNERID=147392775707426816 BOT_OWNERID=147392775707426816
BOT_CLIENTID=682942374040961060 BOT_CLIENTID=682942374040961060

View file

@ -17,9 +17,10 @@ jobs:
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 18.x node-version: 18.x
- run: npm ci - run: yarn install --frozen-lockfile
- run: npm run build - run: yarn build
- run: npm test - run: yarn test
- run: yarn lint
- name: "Copy files over to location" - name: "Copy files over to location"
run: cp -r . ${{ secrets.PROD_REPO_PATH }} run: cp -r . ${{ secrets.PROD_REPO_PATH }}

View file

@ -17,9 +17,10 @@ jobs:
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 18.x node-version: 18.x
- run: npm ci - run: yarn install --frozen-lockfile
- run: npm run build - run: yarn build
- run: npm test - run: yarn test
- run: yarn lint
- name: "Copy files over to location" - name: "Copy files over to location"
run: cp -r . ${{ secrets.STAGE_REPO_PATH }} run: cp -r . ${{ secrets.STAGE_REPO_PATH }}

View file

@ -19,6 +19,7 @@ jobs:
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 18.x node-version: 18.x
- run: npm ci - run: yarn install --frozen-lockfile
- run: npm run build - run: yarn build
- run: npm test - run: yarn test
- run: yarn lint

11758
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{ {
"name": "card-drop", "name": "card-drop",
"version": "0.6.1", "version": "0.6.2",
"main": "./dist/bot.js", "main": "./dist/bot.js",
"typings": "./dist", "typings": "./dist",
"scripts": { "scripts": {

View file

@ -15,7 +15,7 @@ export default class Balance extends Command {
public override async execute(interaction: CommandInteraction) { public override async execute(interaction: CommandInteraction) {
const user = await User.FetchOneById(User, interaction.user.id); const user = await User.FetchOneById(User, interaction.user.id);
let userBalance = user != null ? user.Currency : 0; const userBalance = user != null ? user.Currency : 0;
const embed = new EmbedBuilder() const embed = new EmbedBuilder()
.setColor(EmbedColours.Ok) .setColor(EmbedColours.Ok)

View file

@ -77,7 +77,7 @@ export default class Give extends Command {
} }
const cardNumber = interaction.options.get("cardnumber", true); const cardNumber = interaction.options.get("cardnumber", true);
const user = interaction.options.getUser("user", true); const user = interaction.options.get("user", true).user!;
AppLogger.LogSilly("Commands/Give/GiveCard", `Parameters: cardNumber=${cardNumber.value}, user=${user.id}`); AppLogger.LogSilly("Commands/Give/GiveCard", `Parameters: cardNumber=${cardNumber.value}, user=${user.id}`);
@ -103,7 +103,7 @@ export default class Give extends Command {
private async GiveCurrency(interaction: CommandInteraction) { private async GiveCurrency(interaction: CommandInteraction) {
const amount = interaction.options.get("amount", true); const amount = interaction.options.get("amount", true);
const user = interaction.options.getUser("user", true); const user = interaction.options.get("user", true).user!;
AppLogger.LogSilly("Commands/Give/GiveCurrency", `Parameters: amount=${amount.value} user=${user.id}`); AppLogger.LogSilly("Commands/Give/GiveCurrency", `Parameters: amount=${amount.value} user=${user.id}`);

View file

@ -22,7 +22,9 @@ export default class Inventory extends Command {
public override async execute(interaction: CommandInteraction) { public override async execute(interaction: CommandInteraction) {
const page = interaction.options.get("page"); const page = interaction.options.get("page");
const user = interaction.options.getUser("user") || interaction.user; const userOption = interaction.options.get("user");
const user = userOption ? userOption.user! : interaction.user;
AppLogger.LogSilly("Commands/Inventory", `Parameters: page=${page?.value}, user=${user.id}`); AppLogger.LogSilly("Commands/Inventory", `Parameters: page=${page?.value}, user=${user.id}`);

View file

@ -30,9 +30,9 @@ export default class Trade extends Command {
} }
public override async execute(interaction: CommandInteraction) { public override async execute(interaction: CommandInteraction) {
const user = interaction.options.getUser("user")!; const user = interaction.options.get("user", true).user!;
const give = interaction.options.get("give")!; const give = interaction.options.get("give", true);
const receive = interaction.options.get("receive")!; const receive = interaction.options.get("receive", true);
AppLogger.LogSilly("Commands/Trade", `Parameters: user=${user.id}, give=${give.value}, receive=${receive.value}`); AppLogger.LogSilly("Commands/Trade", `Parameters: user=${user.id}, give=${give.value}, receive=${receive.value}`);

View file

@ -65,11 +65,11 @@ export function GetSacrificeAmount(rarity: CardRarity): number {
case CardRarity.Bronze: case CardRarity.Bronze:
return 5; return 5;
case CardRarity.Silver: case CardRarity.Silver:
return 15; return 10;
case CardRarity.Gold: case CardRarity.Gold:
return 30; return 30;
case CardRarity.Manga: case CardRarity.Manga:
return 50; return 40;
case CardRarity.Legendary: case CardRarity.Legendary:
return 100; return 100;
default: default:

5952
yarn.lock Normal file

File diff suppressed because it is too large Load diff