forked from Supositware/Haha-Yes
Merge branch 'master' of https://gitlab.com/loicbersier/discordbot
This commit is contained in:
commit
2051698bd8
5 changed files with 36 additions and 14 deletions
|
@ -1,4 +1,5 @@
|
|||
const { Command } = require('discord.js-commando');
|
||||
const responseObject = require("../../json/despacito.json");
|
||||
module.exports = class DespacitoCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
|
@ -6,13 +7,25 @@ module.exports = class DespacitoCommand extends Command {
|
|||
group: 'fun',
|
||||
memberName: 'despacito',
|
||||
description: `despacito`,
|
||||
args: [
|
||||
{
|
||||
key: 'user',
|
||||
prompt: 'What do you want me to say',
|
||||
type: 'member',
|
||||
default: ''
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
message.say("DES\nPA\nCITO");
|
||||
message.channel.send({files: ["https://images-eu.ssl-images-amazon.com/images/I/619fzjO1rmL._SS500.jpg"]});
|
||||
message.channel.send({files: ["https://cdn.dopl3r.com/memes_files/despacito-eS6Lm.jpg"]});
|
||||
message.say("https://www.youtube.com/watch?v=kJQP7kiw5Fk");
|
||||
}
|
||||
async run(message, { user }) {
|
||||
if (!user) {
|
||||
const number = Object.keys(responseObject).length;
|
||||
const despacitoNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
|
||||
message.channel.send({files: [responseObject[despacitoNumber]]});
|
||||
} else if (user.id === message.author.id) {
|
||||
message.say(`Did you just try to despacitoad yourself?`)
|
||||
} else
|
||||
message.say(`${user}, you have been despacitoad`)
|
||||
}
|
||||
};
|
|
@ -19,10 +19,9 @@ module.exports = class emoteSayCommand extends Command {
|
|||
|
||||
async run(message, { text }) {
|
||||
message.delete();
|
||||
text.toLowerCase().split('')
|
||||
let emojiArray = [];
|
||||
for (let i = 0; i < text.length; i++)
|
||||
emojiArray[i] = emojiCharacters[text[i]];
|
||||
emojiArray[i] = emojiCharacters[text.toLowerCase().split('')[i]];
|
||||
message.say(emojiArray.join(""))
|
||||
|
||||
|
||||
|
|
6
index.js
6
index.js
|
@ -82,7 +82,11 @@ client.registry
|
|||
// auto respond to messages
|
||||
else if(responseObject[message_content]) {
|
||||
message.channel.send(responseObject[message_content]);
|
||||
}
|
||||
} else if (message_content.includes("like if")) {
|
||||
message.react("\u{1F44D}")
|
||||
} else if (message_content.includes("jeff")) {
|
||||
message.react("496028845967802378")
|
||||
}
|
||||
}});
|
||||
|
||||
client.on('error', console.error);
|
||||
|
|
10
json/despacito.json
Normal file
10
json/despacito.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"1": "https://cdn.discordapp.com/attachments/475999813587173406/498088708210425866/image-50.jpg",
|
||||
"2": "https://cdn.discordapp.com/attachments/475999813587173406/498088708872994818/image-29.png",
|
||||
"3": "https://cdn.discordapp.com/attachments/475999813587173406/498088708872994821/magik-2.png",
|
||||
"4": "https://cdn.discordapp.com/attachments/475999813587173406/498088709443289088/image-26.png",
|
||||
"5": "https://cdn.discordapp.com/attachments/475999813587173406/498088709443289089/image-301.jpg",
|
||||
"6": "https://cdn.discordapp.com/attachments/475999813587173406/498088709883953162/458da9a.jpg",
|
||||
"7": "https://cdn.discordapp.com/attachments/349122704995254275/498086713026150400/despacito-eS6Lm.jpg",
|
||||
"8": "https://cdn.discordapp.com/attachments/240843640375607296/498096605661102090/38026328_1287563578041482_711316145507926016_n.png"
|
||||
}
|
|
@ -1,9 +1,5 @@
|
|||
{
|
||||
"like if owned": "👍",
|
||||
"fortnite": "🤦",
|
||||
"perhaps": "492350777034014720",
|
||||
"press f to pay respect": "493014525788946443",
|
||||
"jeff": "496028845967802378",
|
||||
"my nama jeff": "496028845967802378",
|
||||
"my name jeff": "496028845967802378"
|
||||
"press f to pay respect": "493014525788946443"
|
||||
}
|
Loading…
Reference in a new issue