Updates, fix pastas
Some checks are pending
NodBot Production Dockerization / build (push) Waiting to run
Some checks are pending
NodBot Production Dockerization / build (push) Waiting to run
This commit is contained in:
parent
9d24745e46
commit
21ef9012ac
@ -12,8 +12,8 @@ module.exports = {
|
|||||||
commandData.content = 'Sorry I couldn\'t find that pasta.';
|
commandData.content = 'Sorry I couldn\'t find that pasta.';
|
||||||
} else {
|
} else {
|
||||||
commandData.content = client.pastas.get(commandData.args).content;
|
commandData.content = client.pastas.get(commandData.args).content;
|
||||||
commandData.iconUrl = client.pastas.get(commandData.args).iconUrl;
|
|
||||||
}
|
}
|
||||||
message.reply(fn.embeds.pasta(commandData));
|
const messagePayload = fn.embeds.pasta(commandData);
|
||||||
|
message.reply(messagePayload);
|
||||||
}
|
}
|
||||||
}
|
}
|
35
functions.js
35
functions.js
@ -3,12 +3,12 @@
|
|||||||
const dotenv = require('dotenv');
|
const dotenv = require('dotenv');
|
||||||
dotenv.config();
|
dotenv.config();
|
||||||
// Assignment of environment variables for database access
|
// Assignment of environment variables for database access
|
||||||
const dbHost = process.env.dbHost;
|
const dbHost = process.env.DB_HOST;
|
||||||
const dbUser = process.env.dbUser;
|
const dbUser = process.env.DB_USER;
|
||||||
const dbName = process.env.dbName;
|
const dbName = process.env.DB_NAME;
|
||||||
const dbPass = process.env.dbPass;
|
const dbPass = process.env.DB_PASS;
|
||||||
const dbPort = process.env.dbPort;
|
const dbPort = process.env.DB_PORT;
|
||||||
const isDev = process.env.isDev;
|
const isDev = process.env.IS_DEV;
|
||||||
|
|
||||||
const ownerId = process.env.ownerId;
|
const ownerId = process.env.ownerId;
|
||||||
|
|
||||||
@ -252,25 +252,20 @@ const functions = {
|
|||||||
},
|
},
|
||||||
gif(commandData) {
|
gif(commandData) {
|
||||||
return { embeds: [new Discord.MessageEmbed()
|
return { embeds: [new Discord.MessageEmbed()
|
||||||
.setAuthor(`${commandData.args}.${commandData.command}`)
|
.setAuthor({name: `${commandData.args}.${commandData.command}`})
|
||||||
.setImage(commandData.embed_url)
|
.setImage(commandData.embed_url)
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter(commandData.author)]};
|
.setFooter({text: commandData.author})]};
|
||||||
},
|
},
|
||||||
pasta(commandData) {
|
pasta(commandData) {
|
||||||
return { embeds: [ new Discord.MessageEmbed()
|
return commandData.content;
|
||||||
.setAuthor(`${commandData.args}.${commandData.command}`)
|
|
||||||
.setDescription(commandData.content)
|
|
||||||
.setThumbnail(commandData.iconUrl)
|
|
||||||
.setTimestamp()
|
|
||||||
.setFooter(commandData.author)]};
|
|
||||||
},
|
},
|
||||||
pastas(commandData) {
|
pastas(commandData) {
|
||||||
const pastasArray = [];
|
const pastasArray = [];
|
||||||
const pastasEmbed = new Discord.MessageEmbed()
|
const pastasEmbed = new Discord.MessageEmbed()
|
||||||
.setAuthor(commandData.command)
|
.setAuthor({name: commandData.command})
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter(commandData.author);
|
.setFooter({text: commandData.author});
|
||||||
|
|
||||||
for (const row of commandData.pastas) {
|
for (const row of commandData.pastas) {
|
||||||
pastasArray.push(`#${row.id} - ${row.name}.pasta`);
|
pastasArray.push(`#${row.id} - ${row.name}.pasta`);
|
||||||
@ -286,7 +281,7 @@ const functions = {
|
|||||||
const gifsEmbed = new Discord.MessageEmbed()
|
const gifsEmbed = new Discord.MessageEmbed()
|
||||||
.setAuthor(commandData.command)
|
.setAuthor(commandData.command)
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter(commandData.author);
|
.setFooter({text: commandData.author});
|
||||||
|
|
||||||
for (const row of commandData.gifs) {
|
for (const row of commandData.gifs) {
|
||||||
gifsArray.push(`#${row.id} - ${row.name}.gif`);
|
gifsArray.push(`#${row.id} - ${row.name}.gif`);
|
||||||
@ -302,13 +297,13 @@ const functions = {
|
|||||||
.setAuthor(commandData.command)
|
.setAuthor(commandData.command)
|
||||||
.setDescription(commandData.content)
|
.setDescription(commandData.content)
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter(commandData.author)]};
|
.setFooter({text: commandData.author})]};
|
||||||
},
|
},
|
||||||
requests(commandData) {
|
requests(commandData) {
|
||||||
const requestsEmbed = new Discord.MessageEmbed()
|
const requestsEmbed = new Discord.MessageEmbed()
|
||||||
.setAuthor(commandData.command)
|
.setAuthor(commandData.command)
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter(commandData.author);
|
.setFooter({text: commandData.author});
|
||||||
|
|
||||||
const requestsArray = [];
|
const requestsArray = [];
|
||||||
|
|
||||||
@ -326,7 +321,7 @@ const functions = {
|
|||||||
strain(commandData, message) {
|
strain(commandData, message) {
|
||||||
const strainEmbed = new Discord.MessageEmbed()
|
const strainEmbed = new Discord.MessageEmbed()
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter(commandData.author);
|
.setFooter({text: commandData.author});
|
||||||
const { strainInfo } = commandData;
|
const { strainInfo } = commandData;
|
||||||
strainEmbed.addFields([
|
strainEmbed.addFields([
|
||||||
{
|
{
|
||||||
|
6
main.js
6
main.js
@ -33,9 +33,9 @@ client.once('ready', () => {
|
|||||||
fn.download.strains(client);
|
fn.download.strains(client);
|
||||||
fn.download.medicalAdvice(client);
|
fn.download.medicalAdvice(client);
|
||||||
console.log('Ready!');
|
console.log('Ready!');
|
||||||
client.channels.fetch(statusChannelId).then(channel => {
|
// client.channels.fetch(statusChannelId).then(channel => {
|
||||||
channel.send(`${new Date().toISOString()} -- <@${process.env.ownerId}>\nStartup Sequence Complete`);
|
// channel.send(`${new Date().toISOString()} -- <@${process.env.ownerId}>\nStartup Sequence Complete`);
|
||||||
});
|
// });
|
||||||
});
|
});
|
||||||
|
|
||||||
// slash-commands
|
// slash-commands
|
||||||
|
10
package.json
10
package.json
@ -1,22 +1,22 @@
|
|||||||
{
|
{
|
||||||
"name": "nodbot",
|
"name": "nodbot",
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"description": "Nods and Nod Accessories.",
|
"description": "Nods and Nod Accessories.",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discordjs/builders": "^0.16.0",
|
"@discordjs/builders": "^1.9.0",
|
||||||
"@discordjs/rest": "^0.1.0-canary.0",
|
"@discordjs/rest": "^0.1.0-canary.0",
|
||||||
"axios": "^0.21.4",
|
"axios": "^0.21.4",
|
||||||
"discord-api-types": "^0.22.0",
|
"discord-api-types": "^0.22.0",
|
||||||
"discord.js": "^13.15.1",
|
"discord.js": "^13.15.1",
|
||||||
"discord.js-selfbot-v13": "^2.14.0",
|
"discord.js-selfbot-v13": "^3.4.0",
|
||||||
"dotenv": "^10.0.0",
|
"dotenv": "^10.0.0",
|
||||||
"fuzzy-search": "^3.2.1",
|
"fuzzy-search": "^3.2.1",
|
||||||
"mysql": "^2.18.1",
|
"mysql": "^2.18.1",
|
||||||
"tenorjs": "^1.0.10"
|
"tenorjs": "1.0.10"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "18.x"
|
"node": "^20.x"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^7.32.0"
|
"eslint": "^7.32.0"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const tenor = require('tenorjs').client({
|
const tenor = require('tenorjs').client({
|
||||||
'Key': process.env.tenorAPIKey, // https://tenor.com/developer/keyregistration
|
'Key': process.env.TENOR_API_KEY, // https://tenor.com/developer/keyregistration
|
||||||
'Filter': 'off', // "off", "low", "medium", "high", not case sensitive
|
'Filter': 'off', // "off", "low", "medium", "high", not case sensitive
|
||||||
'Locale': 'en_US',
|
'Locale': 'en_US',
|
||||||
'MediaFilter': 'minimal',
|
'MediaFilter': 'minimal',
|
||||||
|
Loading…
Reference in New Issue
Block a user