mirror of
https://github.com/1disk/edp445.git
synced 2024-08-14 22:47:02 +00:00
19 lines
No EOL
688 B
JavaScript
19 lines
No EOL
688 B
JavaScript
const Discord = require('discord.js') //Import Discord API
|
|
require('discord-inline-reply'); //Import inline replies for Discord API
|
|
const fetch = require('node-fetch'); //Import the FETCH API
|
|
|
|
module.exports = async (message, author, guild, client) => {
|
|
var pollcontent = message.content.replace(`<@${client.user.id}>`, '')
|
|
pollcontent = pollcontent.replace("cmd poll", '')
|
|
|
|
message.channel.send(`**:speech_left: ${pollcontent}**\n👤 ${author}`).then(m => {
|
|
try {
|
|
m.react("👍🏻")
|
|
m.react("👎🏻")
|
|
} catch (err) {
|
|
return message.channel.send("I can't react to messages 💀")
|
|
}
|
|
})
|
|
|
|
message.delete()
|
|
} |