remove eris-collector
This commit is contained in:
parent
f7adf1a865
commit
333779f9c4
3 changed files with 1464 additions and 57 deletions
|
@ -1,33 +0,0 @@
|
|||
const { ReactionCollector } = require('eris-collector');
|
||||
|
||||
module.exports = class {
|
||||
constructor (wsEvent) {
|
||||
this.wsEvent = wsEvent;
|
||||
}
|
||||
|
||||
async run (client, message) {
|
||||
/* Creating reaction collector */
|
||||
if (message.content === 'createReactionCollector') {
|
||||
|
||||
/* Send informative message */
|
||||
const msg = await client.createMessage(message.channel.id, 'This is a reaction collector example!');
|
||||
await msg.addReaction('🐝');
|
||||
|
||||
/* Create reaction filter */
|
||||
const filter = (m, emoji, userID) => emoji.name === '🐝' && userID === message.author.id;
|
||||
|
||||
/* Create collector */
|
||||
const collector = new ReactionCollector(client, msg, filter, {
|
||||
time: 1000 * 20
|
||||
});
|
||||
|
||||
/*
|
||||
* Emitted when collector collects something suitable for filter
|
||||
* For more information, please see discord.js docs: https://discord.js.org/#/docs/main/stable/class/ReactionCollector
|
||||
*/
|
||||
collector.on('collect', (m, emoji, userID) => {
|
||||
console.log(client.createMessage(m.channel.id, `Reaction added by \`${userID}\``));
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
1485
package-lock.json
generated
1485
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -7,16 +7,15 @@
|
|||
"@sentry/node": "^5.27.3",
|
||||
"chalk": "^4.1.0",
|
||||
"eris": "^0.14.0",
|
||||
"eris-collector": "^1.0.1",
|
||||
"eslint": "^7.12.1",
|
||||
"fs-readdir-recursive": "^1.1.0",
|
||||
"js-yaml": "^3.14.0",
|
||||
"node-fetch": "^2.6.1",
|
||||
"pg": "^8.4.2",
|
||||
"pg-format": "^1.0.4",
|
||||
"pretty-ms": "^7.0.1",
|
||||
"windrose": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"scripts": {
|
||||
"test": "\"echo \\\"Error: no test specified\\\" && exit 1\""
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue