Who asked 2.0
not replying to messages without content, with attachments or embeds
This commit is contained in:
parent
45affbf744
commit
96e00b5b85
3 changed files with 22 additions and 8 deletions
15
kokocina.js
Normal file
15
kokocina.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
h(1)
|
||||
h(2)
|
||||
h(3)
|
||||
h(0)
|
||||
|
||||
function h(n) {
|
||||
console.log(7*(5**n)+9+g(n))
|
||||
}
|
||||
|
||||
function g(n) {
|
||||
if (n == 0) {
|
||||
return 0
|
||||
}
|
||||
return 9*7*(5**(n-1))+g(n-1)
|
||||
}
|
3
main.js
3
main.js
|
@ -98,13 +98,10 @@ function gotMessage(message) {
|
|||
debugger_.debug(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* kokot v piči
|
||||
const chance = help.RNG(50000);
|
||||
if (chance == 420) {
|
||||
resp.whoAsked(message);
|
||||
}
|
||||
*/
|
||||
|
||||
const msg = message.content.toLowerCase();
|
||||
|
||||
|
|
|
@ -19,9 +19,11 @@ function mood(message) {
|
|||
}
|
||||
|
||||
async function whoAsked(message) {
|
||||
if (message.embeds.length == 0 && message.attachments.size == 0 && message.content != '') {
|
||||
const searchKey = 'who-asked';
|
||||
const gifAmount = 20;
|
||||
const gifs = `https://g.tenor.com/v1/search?q=${searchKey}&key=${process.env.TENOR}&limit=${gifAmount}`;
|
||||
|
||||
message.reply({ embeds: [await help.getGifEmbed(gifs, gifAmount)] });
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue