How do I add temprole to any user in an automated way using djs14??
I know I can use dyno bot or carl bot for it but I want to automate it. Writing my own temprole feature feels like peeling off skin from the side of my fingernails.
I tried to do this but it wont work for obvious reasons because carl bot ignores my bot.I know I can use dyno bot or carl bot for it but I want to automate it. Writing my own temprole feature feels like peeling off skin from the side of my fingernails.
I tried to do this but it wont work for obvious reasons because carl bot ignores my bot.
46 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by staffso do you have any code of your attempts to write this yourself?
the image above? yes that message is written using code that checks for a certain action, just that carl bot ignores my message
so your bot already knows who to give the roles to. at that point just add the roles via your bot and have some automated cron like jobs to remove them after the time, of 30mins in the screenshot, instead of using a secondary bot
I thought it is the same as me doing it manually, how would it be innefficient?? @Qjuh
cron job is like a thread?
Because any decent bot ignores other bots
they could atleast add a feature to make exceptions 😭
well first off you automated the command generation already and then try to pass of the small work left to another bot
idk how this is an effective solution (passing it to another bot that is)
no im not storing anthing 😭
yeah idk where your bot gets the role names from then
so i need to enter a key in a modal and if the key works then the bot assigns a temp role to user
problem with cronjob (like a thread or timer i think) i see is that if my bot goes down then it forgets to take off role hwne it comes back up hence database
and if i want to implement robustly this solution, i need to write another database system that tracks all this
the role names are hardcoded since they are specific to this "key" feature
i have no database solution implemented
yes they are actual roles that i want to remove from users after a while, like a temp access kind of thing
implementing sqlite is simple
is there no other way other than databases 😭 this is why im passing of this job to super efficient largescale god carl bot or dyno bot
yes but then if my bot gies down for maintainance or some other issue, people with the roles keep it
no if it comes back up you remove all the timed roles (of people who have it)
yes but untill it comes back up
also how would i mass remove roles? (its interesting)
if carl went down it would be the same issue lol
so if its down, even after the 30 minutes run oyt the roles on the people stay since cron job wont remove it.
yeah i still dont see how adding another, uncontrolled by you, automation helps in this scenario
but carl is a lot more reliable 😭
i dont get to break my head writing a bad solution for a feature thats implemented perfectly in carl
cant learn how to write good solutions if you dont implement bad ones first
you cant walk if you dont crawl first
because im using a private hosting service with a few hours amount of downtime every month 😭
thats true
so implement an sqlite db
idk how your bot even knows that keys for temp roles are valid
do you hardcode the keys?
nah i have a rest api setup with this bot that generates it and stores it in mem till it is used
so if your bot goes down the keys are invalid
we arrived at the same issue
if my bot goes down there is no use of the keys because the modal to enter it is given by that bot
okay okay hold on
ye and if its back up theres no use to the keys either cause they are gone
you build a bot that only works well if its up all the time yet chose hosting that goes down for a couple of hours every month
either get a good host or just stick with manually doing commands lol
my issue is, I dont want to write my own database to implement temproles because its too much extra work. I want to somehow automate carl bots temprole with my bot
so hire some staff person to do it
ez automation
☠️
yall are just trollling me now
no
you won't find a way to call a carl command through a bot, carl simply ignores them, there's no way around that
your issue is youre lazy
yesyes so is there some kind of indirect way like a trigger o could play with or something
no
no, if the message doesn't come from a human user, carl ignores it
if you break discord ToS and eventually get banned of the platform its possible
otherwise no
not to mention you already did the hard part
database and timed roles is the easy part
yesyes what i meant is instead of reactint to messages if it can react to anyting else that will ask it to give temp role idk
no
i see
no other way then i suppose
does the bot also ignore webhook?
like using carl reaction roles? would still have to be the user that directly clicks the reaction to trigger the action
what i meant by react how the bot works. it reacts to comands and does stuff etc etc
if it would work id personally work towards getting that fixed in carlbot
whattt?????
how is that violation?
hmm
also in the 30minutes of arguing here you could have already read a tutorial on sqlite and implement the db and prob also be partially into making the code to remove the roles
im just trying to get some help on any dirty workaround bud
dont be like that