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.';
|
||||
} else {
|
||||
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');
|
||||
dotenv.config();
|
||||
// Assignment of environment variables for database access
|
||||
const dbHost = process.env.dbHost;
|
||||
const dbUser = process.env.dbUser;
|
||||
const dbName = process.env.dbName;
|
||||
const dbPass = process.env.dbPass;
|
||||
const dbPort = process.env.dbPort;
|
||||
const isDev = process.env.isDev;
|
||||
const dbHost = process.env.DB_HOST;
|
||||
const dbUser = process.env.DB_USER;
|
||||
const dbName = process.env.DB_NAME;
|
||||
const dbPass = process.env.DB_PASS;
|
||||
const dbPort = process.env.DB_PORT;
|
||||
const isDev = process.env.IS_DEV;
|
||||
|
||||
const ownerId = process.env.ownerId;
|
||||
|
||||
@ -252,25 +252,20 @@ const functions = {
|
||||
},
|
||||
gif(commandData) {
|
||||
return { embeds: [new Discord.MessageEmbed()
|
||||
.setAuthor(`${commandData.args}.${commandData.command}`)
|
||||
.setAuthor({name: `${commandData.args}.${commandData.command}`})
|
||||
.setImage(commandData.embed_url)
|
||||
.setTimestamp()
|
||||
.setFooter(commandData.author)]};
|
||||
.setFooter({text: commandData.author})]};
|
||||
},
|
||||
pasta(commandData) {
|
||||
return { embeds: [ new Discord.MessageEmbed()
|
||||
.setAuthor(`${commandData.args}.${commandData.command}`)
|
||||
.setDescription(commandData.content)
|
||||
.setThumbnail(commandData.iconUrl)
|
||||
.setTimestamp()
|
||||
.setFooter(commandData.author)]};
|
||||
return commandData.content;
|
||||
},
|
||||
pastas(commandData) {
|
||||
const pastasArray = [];
|
||||
const pastasEmbed = new Discord.MessageEmbed()
|
||||
.setAuthor(commandData.command)
|
||||
.setAuthor({name: commandData.command})
|
||||
.setTimestamp()
|
||||
.setFooter(commandData.author);
|
||||
.setFooter({text: commandData.author});
|
||||
|
||||
for (const row of commandData.pastas) {
|
||||
pastasArray.push(`#${row.id} - ${row.name}.pasta`);
|
||||
@ -286,7 +281,7 @@ const functions = {
|
||||
const gifsEmbed = new Discord.MessageEmbed()
|
||||
.setAuthor(commandData.command)
|
||||
.setTimestamp()
|
||||
.setFooter(commandData.author);
|
||||
.setFooter({text: commandData.author});
|
||||
|
||||
for (const row of commandData.gifs) {
|
||||
gifsArray.push(`#${row.id} - ${row.name}.gif`);
|
||||
@ -302,13 +297,13 @@ const functions = {
|
||||
.setAuthor(commandData.command)
|
||||
.setDescription(commandData.content)
|
||||
.setTimestamp()
|
||||
.setFooter(commandData.author)]};
|
||||
.setFooter({text: commandData.author})]};
|
||||
},
|
||||
requests(commandData) {
|
||||
const requestsEmbed = new Discord.MessageEmbed()
|
||||
.setAuthor(commandData.command)
|
||||
.setTimestamp()
|
||||
.setFooter(commandData.author);
|
||||
.setFooter({text: commandData.author});
|
||||
|
||||
const requestsArray = [];
|
||||
|
||||
@ -326,7 +321,7 @@ const functions = {
|
||||
strain(commandData, message) {
|
||||
const strainEmbed = new Discord.MessageEmbed()
|
||||
.setTimestamp()
|
||||
.setFooter(commandData.author);
|
||||
.setFooter({text: commandData.author});
|
||||
const { strainInfo } = commandData;
|
||||
strainEmbed.addFields([
|
||||
{
|
||||
|
6
main.js
6
main.js
@ -33,9 +33,9 @@ client.once('ready', () => {
|
||||
fn.download.strains(client);
|
||||
fn.download.medicalAdvice(client);
|
||||
console.log('Ready!');
|
||||
client.channels.fetch(statusChannelId).then(channel => {
|
||||
channel.send(`${new Date().toISOString()} -- <@${process.env.ownerId}>\nStartup Sequence Complete`);
|
||||
});
|
||||
// client.channels.fetch(statusChannelId).then(channel => {
|
||||
// channel.send(`${new Date().toISOString()} -- <@${process.env.ownerId}>\nStartup Sequence Complete`);
|
||||
// });
|
||||
});
|
||||
|
||||
// slash-commands
|
||||
|
10
package.json
10
package.json
@ -1,22 +1,22 @@
|
||||
{
|
||||
"name": "nodbot",
|
||||
"version": "3.1.0",
|
||||
"version": "3.1.1",
|
||||
"description": "Nods and Nod Accessories.",
|
||||
"main": "main.js",
|
||||
"dependencies": {
|
||||
"@discordjs/builders": "^0.16.0",
|
||||
"@discordjs/builders": "^1.9.0",
|
||||
"@discordjs/rest": "^0.1.0-canary.0",
|
||||
"axios": "^0.21.4",
|
||||
"discord-api-types": "^0.22.0",
|
||||
"discord.js": "^13.15.1",
|
||||
"discord.js-selfbot-v13": "^2.14.0",
|
||||
"discord.js-selfbot-v13": "^3.4.0",
|
||||
"dotenv": "^10.0.0",
|
||||
"fuzzy-search": "^3.2.1",
|
||||
"mysql": "^2.18.1",
|
||||
"tenorjs": "^1.0.10"
|
||||
"tenorjs": "1.0.10"
|
||||
},
|
||||
"engines": {
|
||||
"node": "18.x"
|
||||
"node": "^20.x"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^7.32.0"
|
||||
|
@ -1,5 +1,5 @@
|
||||
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
|
||||
'Locale': 'en_US',
|
||||
'MediaFilter': 'minimal',
|
||||
|
Loading…
Reference in New Issue
Block a user