From 6e36252d4bfa74132667be0875bd9f09ec2bcdf9 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Fri, 2 Dec 2022 15:43:46 -0500 Subject: [PATCH 1/4] idek --- functions.js | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/functions.js b/functions.js index 39aad3e..1cea7cc 100644 --- a/functions.js +++ b/functions.js @@ -61,7 +61,7 @@ const functions = { } } - if (isDev) console.log('Valid Commands Added to Config'); + if (isDev) console.log(`Valid Commands Added to Config\n${config.validCommands}`); }, dotCommands(client) { if (!client.dotCommands) client.dotCommands = new Discord.Collection(); @@ -133,9 +133,10 @@ const functions = { for (const row of rows) { const strain = { id: row.id, - name: row.name, + name: row.strain, }; client.strains.set(strain.name, strain); + // if (isDev) console.log(strain) } if (isDev) console.log('Strains Collection Built'); } @@ -145,6 +146,7 @@ const functions = { const commandData = {}; // Split the message content at the final instance of a period const finalPeriod = message.content.lastIndexOf('.'); + if(isDev) console.log(message.content); // If the final period is the last character, or doesn't exist if (finalPeriod < 0) { if (isDev) console.log(finalPeriod); @@ -310,7 +312,8 @@ const functions = { strainEmbed.addFields([ { name: 'Strain Name', - value: `${strainInfo.name}`, + value: `${strainInfo.strain}`, + inline: true, }, { name: 'Type', @@ -322,16 +325,21 @@ const functions = { value: `${strainInfo.effects}`, inline: true, }, - { - name: 'Treats', - value: `${strainInfo.ailments}`, - inline: true, - }, { name: 'Flavor', value: `${strainInfo.flavor}`, inline: true, }, + { + name: 'Rating', + value: `${strainInfo.rating}⭐️`, + inline: true, + }, + { + name: 'Description', + value: `${strainInfo.description}`, + inline: false, + }, ]); message.reply({ embeds: [ strainEmbed ]}); @@ -439,23 +447,25 @@ const functions = { }, strain(commandData, message) { const { strainName } = commandData; - const query = `SELECT id, name, type, effects, ailment, flavor FROM strains WHERE name = ${db.escape(strainName)}`; + const query = `SELECT id, strain, type, effects, description, flavor, rating FROM strains WHERE strain = ${db.escape(strainName)}`; db.query(query, (err, rows, fields) => { + if (err) throw err; if (rows != undefined) { commandData.strainInfo = { id: `${rows[0].id}`, - name: `${rows[0].name}`, + strain: `${rows[0].strain}`, type: `${rows[0].type}`, effects: `${rows[0].effects}`, - ailments: `${rows[0].ailment}`, + description: `${rows[0].description}`, flavor: `${rows[0].flavor}`, + rating: `${rows[0].rating}`, }; functions.embeds.strain(commandData, message); } }); }, strains(client) { - const query = 'SELECT id, name FROM strains'; + const query = 'SELECT id, strain FROM strains'; db.query(query, (err, rows, fields) => { if (err) throw err; functions.collections.strains(rows, client); From 9ee92b090acb14ae3aa7775f2499a6e9862e112b Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Fri, 2 Dec 2022 16:29:39 -0500 Subject: [PATCH 2/4] Fix workflow for dev env --- .github/workflows/docker-image.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 389ffd4..67a7386 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -2,9 +2,9 @@ name: Docker Image CI on: push: - branches: [ "main" ] + branches: [ "dev" ] pull_request: - branches: [ "main" ] + branches: [ "dev" ] env: DHUB_UNAME: ${{ secrets.DHUB_UNAME }} @@ -19,8 +19,8 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build the Docker image - run: docker build . --file Dockerfile --tag v0idf1sh/nodbot + run: docker build . --file Dockerfile --tag v0idf1sh/nodbot-dev - name: Log into Docker Hub run: docker login -u $DHUB_UNAME -p $DHUB_PWORD - name: Push image to Docker Hub - run: docker push v0idf1sh/nodbot \ No newline at end of file + run: docker push v0idf1sh/nodbot-dev \ No newline at end of file From 3767d03148081be50411028f52be15e865f3abcb Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Sun, 11 Dec 2022 13:03:38 -0500 Subject: [PATCH 3/4] Adding key word phrases --- functions.js | 1 + main.js | 1 + 2 files changed, 2 insertions(+) diff --git a/functions.js b/functions.js index bd80b8c..243365b 100644 --- a/functions.js +++ b/functions.js @@ -483,6 +483,7 @@ const functions = { } }, submit(strainName) { + const query = `` return strainName; } } diff --git a/main.js b/main.js index dc09c66..b7bfab3 100644 --- a/main.js +++ b/main.js @@ -183,6 +183,7 @@ client.on('messageCreate', message => { const lowerContent = message.content.toLowerCase(); if (lowerContent.includes('big') && lowerContent.includes('doinks')) message.reply('gang.'); if (lowerContent.includes('ligma')) message.reply('ligma balls, goteem'); + if (lowerContent.includes('fr fr') || lowerContent.includes(':billed_cap:') || lowerContent.includes('ong')) message.reply('ongggg no :billed_cap: fr fr str8 bussin'); // Break the message down into its components and analyze it const commandData = fn.dot.getCommandData(message); From ff4c3f47cf0b9cea45ad15dc52e895e180ae5564 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Sun, 11 Dec 2022 13:37:12 -0500 Subject: [PATCH 4/4] onggggg --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index b7bfab3..d7d66a8 100644 --- a/main.js +++ b/main.js @@ -183,7 +183,7 @@ client.on('messageCreate', message => { const lowerContent = message.content.toLowerCase(); if (lowerContent.includes('big') && lowerContent.includes('doinks')) message.reply('gang.'); if (lowerContent.includes('ligma')) message.reply('ligma balls, goteem'); - if (lowerContent.includes('fr fr') || lowerContent.includes(':billed_cap:') || lowerContent.includes('ong')) message.reply('ongggg no :billed_cap: fr fr str8 bussin'); + if (lowerContent.includes('frfr') || lowerContent.includes('fr fr') || lowerContent.includes('bussin') || lowerContent.includes(' ong') || lowerContent.startsWith('ong')) message.reply('ongggg no :billed_cap: fr fr str8 bussin'); // Break the message down into its components and analyze it const commandData = fn.dot.getCommandData(message);