Skip to content

Commit

Permalink
feat: fixed logic errors (#1475)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tolfx committed Jan 18, 2023
1 parent 869231d commit dc84164
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/classes/Commands/commands/cart/BuyAndSell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class BuyAndSellCommand implements ICommand {

description = 'Instantly buy an item 💲';

allowInvalidType = false;
dontAllowInvalidType = true;

constructor(
public readonly bot: Bot,
Expand Down
2 changes: 1 addition & 1 deletion src/classes/Commands/commands/cart/BuyCart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class BuyCartCommand implements ICommand {

usage = '[amount] <name>';

allowInvalidType = false;
dontAllowInvalidType = true;

constructor(
public readonly bot: Bot,
Expand Down
2 changes: 1 addition & 1 deletion src/classes/Commands/commands/cart/Cancel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default class CancelCommand implements ICommand {

description = 'Cancel the trade offer ❌';

allowInvalidType = false;
dontAllowInvalidType = true;

constructor(
public readonly bot: Bot,
Expand Down
2 changes: 1 addition & 1 deletion src/classes/Commands/commands/cart/Cart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default class CartCommand implements ICommand {

description = 'View your cart 🛒';

allowInvalidType = false;
dontAllowInvalidType = true;

constructor(
public readonly bot: Bot,
Expand Down
2 changes: 1 addition & 1 deletion src/classes/Commands/commands/cart/Checkout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default class CheckoutCommand implements ICommand {

description = 'Have the bot send an offer with the items in your cart ✅🛒\n\n✨=== Trade actions ===✨';

allowInvalidType = false;
dontAllowInvalidType = true;

constructor(
public readonly bot: Bot,
Expand Down
2 changes: 1 addition & 1 deletion src/classes/Commands/commands/cart/ClearCart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default class ClearCartCommand implements ICommand {

description = 'View your cart 🛒';

allowInvalidType = false;
dontAllowInvalidType = true;

constructor(
public readonly bot: Bot,
Expand Down
2 changes: 1 addition & 1 deletion src/classes/Commands/commands/cart/SellCart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class SellCartCommand implements ICommand {

usage = '[amount] <name>';

allowInvalidType = false;
dontAllowInvalidType = true;

constructor(
public readonly bot: Bot,
Expand Down
25 changes: 25 additions & 0 deletions src/classes/Commands/commands/information/More.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import SteamID from 'steamid';
import CommandHandler, { ICommand } from '../../CommandHandler';
import Bot from '../../../Bot';
import IPricer from '../../../IPricer';

export default class MoreCommand implements ICommand {
name = 'more';

description = 'Show the advanced commands list';

constructor(
public readonly bot: Bot,
public readonly pricer: IPricer,
public readonly commandHandler: CommandHandler
) {
this.bot = bot;
this.pricer = pricer;
this.commandHandler = commandHandler;
}

execute = (steamID: SteamID, message: string) => {
const prefix = this.bot.getPrefix(steamID);
void this.commandHandler.help.moreCommand(steamID, prefix);
};
}
13 changes: 12 additions & 1 deletion src/classes/Commands/commands/information/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
import HelpCommand from './Help';
import LinkCommands from './Links';
import MessageCommand from './Message';
import MiscCommands from './Miscs';
import MoreCommand from './More';
import PriceCommand from './Price';
import QueueCommand from './Queue';
import How2TradeCommand from './how2trade';

export default [HelpCommand, How2TradeCommand, PriceCommand, QueueCommand, MiscCommands, LinkCommands];
export default [
HelpCommand,
How2TradeCommand,
PriceCommand,
QueueCommand,
MiscCommands,
LinkCommands,
MessageCommand,
MoreCommand
];

0 comments on commit dc84164

Please sign in to comment.