[WIP] Trading and TradingStore implementation 1

This commit is contained in:
Minz committed 2022-11-22 17:15:48 +01:00
1 parent 5be326d56a
commit 42797eb90e
5 files changed
+266 -1

No files matched your search

+7 -1
View File
@@ -3,7 +3,7 @@ const { UserUtils } = require('../util');
const { Card, Character, User } = require('../models');
const Sequelize = require('sequelize');
const { QUALITY_NAMES } = require('../config/constants');
const { TestStore } = require('../stores');
module.exports = {
name: "interactionCreate",
async execute (interaction) {
@@ -20,6 +20,12 @@ module.exports = {
choices = await this.fetchCards(focusedOption, { user: user, ownedOnly: true });
}
if (interaction.commandName === "trade") {
if (focusedOption.name === "card") {
choices = await this.fetchCards(focusedOption, { user: user, ownedOnly: true });
}
}
if (interaction.commandName === 'view') {
const viewType = interaction.options.getString('type');