Discord
- 258 ответов
- 0 вопросов
172
Вклад в тег
embed_obj = discord.Embed(description = "текст")
# или
embed_obj = discord.Embed()
embed_obj.description = "текст"
on_member_join(member)
<@Bot.event
async def on_member_join(member):
if role := member.guild.get_role(418187634689139935):
await member.add_roles(role)
bot.wait_for("reaction_add")
: https://discordpy.readthedocs.io/en/v1.3.4/api.htm...@bot.command(ctx):
async def test(ctx):
accept_decline = await ctx.send('Test')
await accept_decline.add_reaction('one')
try:
reaction = await bot.wait_for("reaction_add", timeout=60, check = lambda r, u: r=='one' )
except asyncio.TimeoutError:
await channel.send("\N{THUMBS DOWN SIGN}")
else:
await channel.send("\N{THUMBS UP SIGN}")
import youtube_dl
ydl_opts = {}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download(['https://vk.com/video-30316056_456326877'])
# [vk] -30316056_456326877: Downloading JSON metadata
# [vk] -30316056_456326877: Downloading m3u8 information
# [hlsnative] Downloading m3u8 manifest
# [hlsnative] Total fragments: 2
# [download] Destination: webm--30316056_456326877.mp4
# [download] 100% of 7.31MiB in 00:01
# [ffmpeg] Fixing malformed AAC bitstream in "webm--30316056_456326877.mp4"
# 0