Compare commits
No commits in common. "7003351eccfab419a0b0fa7ec0b7d6cbd48b5097" and "3dcc4e021f261b1d58e638a97950f67804ebd621" have entirely different histories.
7003351ecc
...
3dcc4e021f
49
functions.js
49
functions.js
@ -649,55 +649,6 @@ const functions = {
|
||||
|
||||
return newText + ' <:spongebob:1053398825965985822>';
|
||||
},
|
||||
autoresponses: { // Specific responses for certain keywords in sent messages
|
||||
checkForAll(messageContent) {
|
||||
let responses = [];
|
||||
if (this.bigDoinks(messageContent)) responses.push("bigDoinks");
|
||||
if (this.ligma(messageContent)) responses.push("ligma");
|
||||
if (this.ong(messageContent)) responses.push("ong");
|
||||
return responses;
|
||||
},
|
||||
bigDoinks(messageContent) {
|
||||
let count = 0;
|
||||
const { keywords } = strings.autoresponses.bigDoinks;
|
||||
keywords.forEach(e => {
|
||||
if (messageContent.includes(e)) count++;
|
||||
});
|
||||
if (count === keywords.length) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
ligma(messageContent) {
|
||||
let count = 0;
|
||||
const { keywords } = strings.autoresponses.ligma;
|
||||
keywords.forEach(e => {
|
||||
if (messageContent.includes(e)) count++;
|
||||
});
|
||||
if (count > 0) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
ong(messageContent) {
|
||||
let count = 0;
|
||||
const { keywords } = strings.autoresponses.ong;
|
||||
keywords.forEach(e => {
|
||||
if (messageContent.includes(e)) count++;
|
||||
});
|
||||
if (count > 0) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
send(message, responseType) {
|
||||
const { responses } = strings.autoresponses[responseType];
|
||||
const randomIndex = Math.floor(Math.random() * responses.length);
|
||||
const response = responses[randomIndex];
|
||||
try {
|
||||
message.reply(response);
|
||||
} catch(e) {
|
||||
console.log(new Error(e));
|
||||
}
|
||||
}
|
||||
},
|
||||
generateErrorId() {
|
||||
const digitCount = 10;
|
||||
const digits = [];
|
||||
|
15
main.js
15
main.js
@ -221,12 +221,17 @@ client.on('messageCreate', message => {
|
||||
// Some basic checking to prevent running unnecessary code
|
||||
if (message.author.bot) return;
|
||||
|
||||
// Automatic Responses, will respond if any message contains the keyword(s), excluding self-messages
|
||||
// Wildcard Responses, will respond if any message contains the trigger word(s), excluding self-messages
|
||||
const lowerContent = message.content.toLowerCase();
|
||||
const autoresponses = fn.autoresponses.checkForAll(lowerContent);
|
||||
autoresponses.forEach(e => {
|
||||
fn.autoresponses.send(message, e);
|
||||
});
|
||||
// big + doinks
|
||||
if (lowerContent.includes('big') && lowerContent.includes('doinks')) message.reply('gang.');
|
||||
// ligma
|
||||
if (lowerContent.includes('ligma')) message.reply('ligma balls, goteem');
|
||||
// frfr, fr fr , bussin, ong
|
||||
if (lowerContent.includes('frfr') || lowerContent.includes('fr fr') || lowerContent.includes('bussin') || lowerContent.includes(' ong') || lowerContent.startsWith('ong')) {
|
||||
const randIndex = Math.floor(Math.random() * strings.capbacks.length);
|
||||
message.reply(strings.capbacks[randIndex]);
|
||||
}
|
||||
|
||||
// Break the message down into its components and analyze it
|
||||
const commandData = fn.dot.getCommandData(message);
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nodbot",
|
||||
"version": "3.2.3",
|
||||
"version": "3.2.2",
|
||||
"description": "Nods and Nod Accessories, now with ChatGPT!",
|
||||
"main": "main.js",
|
||||
"dependencies": {
|
||||
|
44
strings.json
44
strings.json
@ -14,6 +14,14 @@
|
||||
"urls": {
|
||||
"avatar": "https://cdn.discordapp.com/avatars/513184762073055252/12227aa23a06d5178853e59b72c7487b.webp?size=128"
|
||||
},
|
||||
"capbacks": [
|
||||
"on god?!",
|
||||
"fr fr?!",
|
||||
"no cap?!",
|
||||
"no cap fr",
|
||||
"bussin fr, no cap",
|
||||
"ongggg no :billed_cap: fr fr"
|
||||
],
|
||||
"costs": {
|
||||
"gpt": {
|
||||
"gpt-3.5-turbo": 0.2
|
||||
@ -31,41 +39,5 @@
|
||||
"chatResCentsPer": 0.2,
|
||||
"chatResUnits": 1000
|
||||
},
|
||||
"autoresponses": {
|
||||
"bigDoinks": {
|
||||
"keywords": ["big", "doinks"],
|
||||
"responses": [
|
||||
"<:bigdoinks:1053706618853924905> Gang.",
|
||||
"<:bigdoinks:1053706618853924905> Out here in Amish",
|
||||
"<:bigdoinks:1053706618853924905> Out here in Amish, smoking Big Doinks in Amish... Gang."
|
||||
]
|
||||
},
|
||||
"ligma": {
|
||||
"keywords": ["ligma"],
|
||||
"responses": [
|
||||
"ligma balls lmao gottem",
|
||||
"ligma balls ahaha",
|
||||
"https://tenor.com/view/ligma-balls-gif-12236083",
|
||||
"<:deadmonkey:1139186312444911707>"
|
||||
]
|
||||
},
|
||||
"ong": {
|
||||
"keywords": [
|
||||
"frfr",
|
||||
"fr fr",
|
||||
"bussin",
|
||||
"no cap",
|
||||
" ong "
|
||||
],
|
||||
"responses": [
|
||||
"on god?!",
|
||||
"fr fr?!",
|
||||
"no cap?!",
|
||||
"no cap fr",
|
||||
"bussin fr, no cap",
|
||||
"ongggg no :billed_cap: fr fr"
|
||||
]
|
||||
}
|
||||
},
|
||||
"temp": {}
|
||||
}
|
Loading…
Reference in New Issue
Block a user