Discord bot der Rollen nach einer bestimmten Zeit wieder weg nimmt?

Hey.

Ich suche schon lange ein Bot für Discord der die Funktion hat nach einer angegebenen Zeit eine Rolle wieder weg nimmt von einer Person.

Wollte ein Ban system über rollen machen das man auf dem Discord Server ein Entbannungsantrag stellen kann in meinem Ticket Support.

Kennt da jemand was?

Danke im vorraus schonmal 🙂

(1 votes)
Loading...

Similar Posts

Subscribe
Notify of
3 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
MasterFAQ
9 months ago

Can you also do with Dyno Bot or stop with your own, as you introduce a Discord Bot? if not there are tutorials also have to set up in the discord developer and there is also the token that is important for the code.

pyhton best download and then in cmd pip install discord.py

then first ne python datei bsp bot.py:

import discord
from discord.ext import commands, tasks
import asyncio


bot = commands.Bot(command_prefix="!")


@bot.event
async def on_ready():
    print(f'Bot is ready. Logged in as {bot.user}')


@bot.command()
async def tempban(ctx, member: discord.Member, role: discord.Role, duration: int):
    await member.add_roles(role)
    await ctx.send(f'{member.name} wurde die Rolle {role.name} für {duration} Sekunden zugewiesen.')
    await asyncio.sleep(duration)
    await member.remove_roles(role)
    await ctx.send(f'{member.name} wurde die Rolle {role.name} wieder entfernt.')


bot.run('YOUR_BOT_TOKEN')

At YOUR BOT TOKEN, of course, the Bot Token comes from the Discord Developer Portal pure then you start the , so that the Bot 24/7 up is needed hoster also gives which for Free

Then in textchannel the command:

!tempban @user @role 60

The user (@user) gets the roll (@role) for 60 seconds.

ez as that.

derajax
9 months ago

Dyno has Temp Roles https://docs.dyno.gg/en/commands/temprole

But there are other messengers who can.