peterthehan / discord-reaction-role-bot Goto Github PK
View Code? Open in Web Editor NEWA Discord bot that allows users to self-assign roles using reactions.
License: MIT License
A Discord bot that allows users to self-assign roles using reactions.
License: MIT License
The readme says we should use the 'emoji id' for custom emojis. Practically, it doesn't say how to get input that emoji id and report them as "unknown".
For example, I've a :cyan_ship: custom emoji, but the bot is errorring when I try use cyan_ship
or :cyan_ship:
as an id.
To get the actual id, ones need to escape the emoji. So in my case, I had to type \:cyan_ship:
in discord to see the id to use.
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'roles' of undefined
Where do I put my token?
This is being so all people
npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/runner/discord-reaction-role-bot/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/runner/discord-reaction-role-bot/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2022-01-04T09_30_19_818Z-debug.log
exit status 254
I got the project running it works except for that the bot doesn’t add the emoji reaction to the message.
I am currently on mobile, I can look into the project myself tomorrow but if you know a quick fix please let me know :)
Your projects look awesome btw! :)
For anyone who has a problem with: “AbortController is not defined” make sure you are using the latest JS version.
check node version:
node -v
For using Discord.js v13 is that you need to use NodeJS v16.6 or higher
fix:
npm install -g n
n latest
Hello!
First off, great project, thanks a lot as it really takes a lot work off people's bottoms.
Anyways, to the issue I'm having.
Everything properly set up, if I start using a custom emoji, that is being added to the message as expected.
However, if I click on the emoji, the role isn't being assigned properly - in contrary to a utf-8 emoji. The reaction is being removed instantly as expected, so the bot "works with it", however it doesn't identify that the reaction was clicked.
I'm assuming it is a bug but didn't find the source yet. Maybe you'll have an idea. I'm assuming it could be an issue with identifying what emoji was clicked since it expects :emojiname:emojid, contrary to documentation.
Might be worth checking further
There is no package.json and main file :fp:
I see in the .gif example, when a user reacts it gets reset back to 1 reaction. Not sure how this is even done (though I've seen it before) but is there an easy way to disable this or make it so it doesn't do that?
Just out of curiosity would be nice to see the quantity count of reactions.
Is it possible to set 2 roles per reaction?
There might be a slight issue with this. When the user unreacts to get the role removed, the bot doesn't know better to leave the base role assigned unless users has unreacted to all reactions.
once you choose a role no takebacks, and only one at a time
the bot works, however when remove the reaction the role doesnt get removed, but it does if i react again. (using any policy)
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.