У нас вы можете посмотреть бесплатно COMO CRIAR UM BOT DE CONTAGEM 📊[CODIGO COMPLETO+TUTORIAL🔥] или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
SITES
https://wispbyte.com/client/servers/5adc78...
https://discord.com/developers/applications
meu Discord
https://discord.gg/gQcBTfx97
código do bot
import discord
from discord.ext import tasks
from discord import Intents
========= CONFIG =========
TOKEN = "SEU_TOKEN_AQUI"
NOME_MEMBROS = "👥 Membros:"
NOME_ONLINE = "🟢 Online:"
NOME_BOTS = "🤖 Bots:"
CANAL_BOAS_VINDAS_NOME = "👋-boas-vindas"
CANAL_SAIDA_NOME = "👋-saidas"
==========================
intents = Intents.default()
intents.members = True
intents.presences = True
intents.guilds = True
client = discord.Client(intents=intents)
def achar_canal(guild, nome, voice=False):
for canal in guild.channels:
if canal.name.startswith(nome):
if voice and isinstance(canal, discord.VoiceChannel):
return canal
if not voice and isinstance(canal, discord.TextChannel):
return canal
return None
@client.event
async def on_ready():
print(f"✅ Nytro online como {client.user}")
atualizar.start()
@tasks.loop(seconds=3)
async def atualizar():
for guild in client.guilds:
membros = len([m for m in guild.members if not m.bot])
bots = len([m for m in guild.members if m.bot])
online = len([m for m in guild.members if m.status != discord.Status.offline])
===== VOICE CHANNELS =====
canal_membros = achar_canal(guild, NOME_MEMBROS, voice=True)
canal_online = achar_canal(guild, NOME_ONLINE, voice=True)
canal_bots = achar_canal(guild, NOME_BOTS, voice=True)
if not canal_membros:
canal_membros = await guild.create_voice_channel(f"{NOME_MEMBROS} {membros}")
else:
await canal_membros.edit(name=f"{NOME_MEMBROS} {membros}")
if not canal_online:
canal_online = await guild.create_voice_channel(f"{NOME_ONLINE} {online}")
else:
await canal_online.edit(name=f"{NOME_ONLINE} {online}")
if not canal_bots:
canal_bots = await guild.create_voice_channel(f"{NOME_BOTS} {bots}")
else:
await canal_bots.edit(name=f"{NOME_BOTS} {bots}")
@client.event
async def on_member_join(member):
canal = discord.utils.get(member.guild.text_channels, name=CANAL_BOAS_VINDAS_NOME)
if not canal:
canal = await member.guild.create_text_channel(CANAL_BOAS_VINDAS_NOME)
await canal.send(
f"👋 **Bem-vindo(a), {member.mention}!**
"
f"Agora somos *{len(member.guild.members)} membros* 🎉"
)
@client.event
async def on_member_remove(member):
canal = discord.utils.get(member.guild.text_channels, name=CANAL_SAIDA_NOME)
if not canal:
canal = await member.guild.create_text_channel(CANAL_SAIDA_NOME)
await canal.send(
f"😢 **{member.name} saiu do servidor.**
"
f"Agora somos **{len(member.guild.members)} membros**."
)
client.run(TOKEN)