Revert "Further updates to match new data source .strain"
This reverts commit 9857406edd
.
This commit is contained in:
parent
cb7218152c
commit
a233d18e53
12
functions.js
12
functions.js
@ -327,14 +327,9 @@ const functions = {
|
|||||||
value: `${strainInfo.flavor}`,
|
value: `${strainInfo.flavor}`,
|
||||||
inline: true,
|
inline: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'Rating',
|
|
||||||
value: `${strainInfo.rating}⭐️`,
|
|
||||||
inline: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'Description',
|
name: 'Description',
|
||||||
value: `${strainInfo.description}`,
|
value: `${strainInfo.ailments}`,
|
||||||
inline: false,
|
inline: false,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
@ -444,7 +439,7 @@ const functions = {
|
|||||||
},
|
},
|
||||||
strain(commandData, message) {
|
strain(commandData, message) {
|
||||||
const { strainName } = commandData;
|
const { strainName } = commandData;
|
||||||
const query = `SELECT id, name, type, effects, description, flavor, rating FROM strains WHERE name = ${db.escape(strainName)}`;
|
const query = `SELECT id, name, type, effects, ailment, flavor FROM strains WHERE name = ${db.escape(strainName)}`;
|
||||||
db.query(query, (err, rows, fields) => {
|
db.query(query, (err, rows, fields) => {
|
||||||
if (rows != undefined) {
|
if (rows != undefined) {
|
||||||
commandData.strainInfo = {
|
commandData.strainInfo = {
|
||||||
@ -452,9 +447,8 @@ const functions = {
|
|||||||
name: `${rows[0].name}`,
|
name: `${rows[0].name}`,
|
||||||
type: `${rows[0].type}`,
|
type: `${rows[0].type}`,
|
||||||
effects: `${rows[0].effects}`,
|
effects: `${rows[0].effects}`,
|
||||||
description: `${rows[0].description}`,
|
ailments: `${rows[0].ailment}`,
|
||||||
flavor: `${rows[0].flavor}`,
|
flavor: `${rows[0].flavor}`,
|
||||||
rating: `${rows[0].rating}`,
|
|
||||||
};
|
};
|
||||||
functions.embeds.strain(commandData, message);
|
functions.embeds.strain(commandData, message);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user