import discord
from discord.ext import commands
intents=intents=discord.Intents.all()
bot = commands.Bot(command_prefix = '.', intents = intents)
@bot.event
async def on_ready():
print('текст')
@bot.event
async def on_member_join(member):
await member.send("ТЕКСТ!")
for ch in bot.get.guild(member.guild.id).channel:
if ch.name == "962359853995671572":
await bot.get.channel(ch.id).send( f'{member}, ТЕКСТ')
async def on_member_leave(member):
await member.send("ТЕКСТ")
for ch in bot.get.guild(member.guild.id).channel:
if ch.name == "967540720284098560":
await bot.get.channel(ch.id).send( f'{member}, ТЕКСТ')
bot.run('ТОКЕН')