Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import datetime
- import time
- import s_taper # S-Taper
- import discord
- bot = discord.Bot(intents=discord.Intents.all())
- c = discord.commands.context.ApplicationContext
- print("Запущен!")
- @bot.message_command(name="Повысить репутацию")
- async def plus_rep(ctx: c, message: discord.Message):
- await ctx.respond(f"+ Rep, {message.author.name}")
- @bot.user_command(name="Дата регистрации")
- async def account_creation_date(ctx, member: discord.Member):
- await ctx.respond(f"{member.name} создал аккаунт {member.created_at}")
- @bot.slash_command(description="Сложение")
- async def send(ctx: c, channel: discord.Option(discord.Member), msg: discord.Option(discord.Role)):
- await channel.add_roles(msg)
- @bot.event
- async def on_member_update(old: discord.Member, gold: discord.Member):
- channel = None
- channels = gold.guild.channels
- for ch in channels:
- if ch.name == "основной":
- channel = ch
- if old.nick != gold.nick:
- await channel.send(f"{old.name if not old.nick else old.nick} теперь "
- f"{'без ника' if not gold.nick else gold.nick}")
- if old.roles != gold.roles:
- await channel.send(f"У {old.name} изменилась роль!")
- @bot.event
- async def on_user_update(old: discord.User, gold: discord.User):
- channel = None
- members = bot.get_all_members()
- for mem in members:
- if mem.name == gold.name:
- channels = mem.guild.channels
- for ch in channels:
- if ch.name == "основной":
- channel = ch
- if old.avatar != gold.avatar:
- await channel.send(f"У {gold.name} новая ава!")
- await channel.send(gold.avatar.url)
- await channel.send("👍👍👍")
- @bot.slash_command(description="Удаление")
- async def clear(ctx: c, num: discord.Option(int) = 100):
- await ctx.channel.purge(limit=num)
- bot.run('MTEzNjI2MDI1OTMwNDk2NDEyNw.G8P7Vc.ElO4fJMUb7k9odvS1HLPd_C_z6qfEb5iTMi-7Q')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement