-1

I'm working on discord server, and I want to assign a role for specific duration, let's say for 1 month, 6 months or 12 months. I've tried "Member ful" Bot Integration but it is not free to use. Any help will be appreciated and I'll be thankful for it.

I'm seeking for a discord bot that can track the time, when that role will be assigned to the member and should automatically remove after the timespan, or user can check status for his role.

  • 2
    A project like this could potentially require a fair bit of coding (depending on how elaborate you make it), but stackoverflow is not a code writing service, please do some research and if you come across any issues, we can help resolve them. To point you in the right direction look into cron jobs and code it to check the members join date and if it has been x amount of time, add a role. – Kaspr Apr 14 '22 at 14:09

1 Answers1

-1

Here

const delay = ms => new Promise(resolve => setTimeout(resolve, ms))

var role = member.guild.roles.cache.find(role => id === "role id");
member.roles.add(role); // expecting you already have a member object, if not - message.member

delay(60000) // time in milliseconds

member.roles.remove(role);

but yes... as @Gh0st said, you should do a bit of research on your own and try to give some of the things you tried already and/or some of your code.