на мероприятии «Уйти» в Discord.py
@client.event
async def on_member_leave(member):
print("member has left a server.")
Energetic Eel
@client.event
async def on_member_leave(member):
print("member has left a server.")
@bot.event
async def on_message(message):
if message.content == "pong":
await message.channel.send('ping')
import discord
class MyClient(discord.Client):
async def on_ready(self):
print('Logged on as {0}!'.format(self.user))
async def on_message(self, message):
print('Message from {0.author}: {0.content}'.format(message))
client = MyClient()
client.run('my token goes here')
channel.guild