Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Of course, it’s a shame not to know this, there is an API and Google, but still keep it
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix = '!')
guild_welcome = {727877261159694496} #Тут ID канала, в которые приходит сообщение и приветствие
@bot.event
async def on_ready():
print("Ready!")
@bot.event
async def on_member_join(member):
welcome = bot.get_channel(guild_welcome[member.guild.id]) #Получение канала для приветствия
embed=discord.Embed(title="Добро пожаловать!", description=f"К нам в {member.guild.name} приехал {member.mention}!", color=0xCC974F) #Embed
await welcome.send(embed=embed) #Отправка сообщения
Pay attention to tabs!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question