driver.close() - закрывает активное окно браузера.
driver.quit() - закрывает все браузеры windows и завершает работу драйвера session/process.
async def on_member_join(autor):
@Bot.event
async def on_member_join(autor):
# channel = Bot.get_channel(685038866616680461)
await autor.send(
f"Привет <@!{autor.id}>, если ты решил вступить в клан Destiny 2, то в начале зайди в канал "
f"<#693850258995937350>, "
f"возьми роль Destiny 2, "
f"звтем вернись сюда и перейди в канал <#685429738038231050> и оставь там свою заявку.)")
@Bot.command()
async def test(ctx):
await ctx.send(
embed=discord.Embed(title="Пригласить в канал"),
components=[
Button(style=ButtonStyle.green, label="Вступить", emoji=":white_check_mark:"),
Button(style=ButtonStyle.red, label="Отказаться", emoji=":x:"),
Button(style=ButtonStyle.blue, label="Я подумаю", emoji=":question:"),
Button(style=ButtonStyle.URL, label="Канал", url="https://discord.gg/T3Rhg3xU"),
]
)
response = await Bot.wait_for("button_click")
if response.channel == ctx.channel:
if response.component.label == "Вступить":
await response.respond(content="Пркрасно")
else:
await response.respond(
embed=discord.Embed(title="Ты точно уверен?"),
components=[
Button(style=ButtonStyle.green, label="Да"),
Button(style=ButtonStyle.red, label="Нет"),
Button(style=ButtonStyle.blue, label="Я подумаю"),
]
)
@Bot.command()
async def send_m(ctx, member: discord.Member):
await member.send(f" Псс,{ctx.author.name}, сказал что {member.name} , хороший человек")
@Bot.command()
async def send_b(member: discord.Member):
await member.send(
f"Привет, {member} если ты решил вступить в клан Destiny 2, то в начале зайди в канал "
f"<#693850258995937350> и возьми роль Destiny 2, звтем перейди в канал <#685429738038231050> и оставь там "
f"свою заявку.)")
@Bot.command()
async def send_a(ctx):
await ctx.autor.send("ку-ку")
'form': AddAvailabilityForm(initial={'name': games})
'form': AddAvailabilityForm(name, initial={'name': games})