vladdenisov / crove-bot Goto Github PK
View Code? Open in Web Editor NEWDiscord.js bot. Can play music from YouTube, Spotify; has many other commands such as purge, kick, 8ball, etc.
License: MIT License
Discord.js bot. Can play music from YouTube, Spotify; has many other commands such as purge, kick, 8ball, etc.
License: MIT License
I tried adding a new reaction for a loop function but didn't work I know I am doing something wrong but don't know what
`/* eslint-disable no-console /
/ eslint-disable no-unused-vars */
// File to handle Reactions changes
const VOICE_API = require('./voice')
const handleReaction = async (client, message, reaction) => {
const server = servers[message.guild.id]
if (reaction.message.channel.name !== 'dancing_disco') return
if (!reaction.message.author.bot) return
if (reaction.emoji.name === '⏭') {
server.dispatcher.end()
}
if (reaction.emoji.name === '⏹') {
VOICE_API.leave(client, message)
}
if (reaction.emoji.name === '⏯') {
if (!server.dispatcher.isPaused) {
server.dispatcher.isPaused = true
server.dispatcher.pause()
} else {
server.dispatcher.isPaused = false
server.dispatcher.resume()
}
if (reaction.emoji.name === '🔁') {
if (server.dispatcher.loop === true) server.dispatcher.songs.push(server.dispatcher.songs.shift());
else server.dispatcher.songs.shift();
play(guild, server.dispatcher.songs[0]);
}
}
}
exports.hook = async (client, message) => {
client.on('messageReactionAdd', async (reaction, _user) => {
handleReaction(client, message, reaction)
})
client.on('messageReactionRemove', async (reaction, _user) => {
handleReaction(client, message, reaction)
})
}
`
I copy your purge command code,
My bot prefix is +
While running +purge 3 or +purge 10 or something : bot is only deleting one message and sending deleteing only one message
when running the bot
It gives me this error
throw new TypeError('CLIENT_MISSING_INTENTS');
^
TypeError [CLIENT_MISSING_INTENTS]: Valid intents must be provided for the Client.
When i try to npm install
there is always an error with enmap i tried npm --force enmap
and still have the same error
this is the error
`Error: Cannot find module 'enmap'
Require stack:
I copy your purge command code,
My bot prefix is +
While running +purge 3 or +purge 10 or something : bot is only deleting one message and sending deleteing only one message
(node:27024) UnhandledPromiseRejectionWarning: TypeError: (intermediate value).setColor(...).setTitle(...).setAuthor(...).setDescription(...).setThumbnail(...).addField(...).addBlankField is not a function
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.