Hotfix 2.1
This commit is contained in:
parent
da924b9cd5
commit
3968836758
3 changed files with 17 additions and 12 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,7 +1,7 @@
|
|||
.env
|
||||
.eslintignore
|
||||
.eslintrc.json
|
||||
debug.js
|
||||
deploy-guild-commands.js
|
||||
MOOver.code-workspace
|
||||
allCode.js
|
||||
debug.js
|
|
@ -34,12 +34,12 @@ async function getGifEmbed(options) {
|
|||
}
|
||||
catch {
|
||||
const gifs = `https://g.tenor.com/v1/random?key=${process.env.TENOR}&limit=${gifAmount}&contentfilter=${rating}`;
|
||||
return help.getGif(gifs, gifAmount);
|
||||
return help.getGifEmbed(gifs, gifAmount);
|
||||
}
|
||||
|
||||
const searchSplits = search.split(/[ ]+/);
|
||||
const searchKey = searchSplits.join('-');
|
||||
|
||||
const gifs = `https://g.tenor.com/v1/search?q=${searchKey}&key=${process.env.TENOR}&limit=${gifAmount}&contentfilter=${rating}`;
|
||||
return help.getGif(gifs, gifAmount);
|
||||
return help.getGifEmbed(gifs, gifAmount);
|
||||
}
|
17
main.js
17
main.js
|
@ -144,7 +144,7 @@ function move(message, channelId) {
|
|||
|
||||
if (msg.embeds.length > 0) {
|
||||
client.channels.cache.get(mentionedChannelId)
|
||||
.send({ content: `Sent by ${msg.author}\nmooved ${message.author}`, embeds: msg.embeds });
|
||||
.send({ content: `Sent by ${msg.author}\nmooved ${message.author}`, embeds: msg.embeds, files: newMsgAttachments });
|
||||
}
|
||||
else {
|
||||
client.channels.cache.get(mentionedChannelId)
|
||||
|
@ -154,12 +154,17 @@ function move(message, channelId) {
|
|||
else {
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setColor(help.randomColor())
|
||||
.addField('MOO', `Sent by ${msg.author}\nmooved ${message.author}`)
|
||||
.addField(
|
||||
'Message:', msg.content);
|
||||
.addField('MOO', `Sent by ${msg.author}\nmooved ${message.author}`);
|
||||
if (msg.content.includes('http')) {
|
||||
const file = new MessageAttachment(msg.content);
|
||||
client.channels.cache.get(mentionedChannelId).send({
|
||||
embeds: [embed],
|
||||
});
|
||||
embeds: [embed], files: [file] });
|
||||
}
|
||||
else {
|
||||
embed.addField('Message:', msg.content);
|
||||
client.channels.cache.get(mentionedChannelId).send({
|
||||
embeds: [embed] });
|
||||
}
|
||||
}
|
||||
setTimeout(() => msg.delete(), 3000);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue