TANDEROFF1

Untitled

Aug 30th, 2021
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. emb = discord.Embed(description=f'{ctx.author.mention}, что-бы забрать прибыль, придётся подождать ещё: `{round(h)}ч {round(m)}м {round(s)}сек`', color=0xa697ff)
  2. emb.set_thumbnail(url=ctx.author.avatar_url)
  3. emb.set_author(name=f"👷🏻‍♂️ Работа", icon_url='https://i.ibb.co/2ZRbtqv/1565.png')
  4. emb.set_footer(text=f'🚀 Вы можете использовать бустер , что-бы сократить время ожидание.', icon_url=strela)
  5.  
  6. em1 = self.client.get_emoji(881769449047326750)
  7. one = Button(style = ButtonStyle.gray, label = 'Использовать ускоритель ', id='1' , emoji=em1)
  8. components1 = [one]
  9. await ctx.message.delete()
  10. await ctx.send(embed = emb, components=[components1])
  11.  
  12. while True:
  13. try:
  14.  
  15. responce = await self.client.wait_for('button_click', check = lambda message: message.author == ctx.author, timeout=30)
  16. if responce.component.id == '{}'.format(1):
  17.  
  18. emojiFromServer = self.client.get_emoji(881769449047326750)
  19. msg2 = await ctx.send(content=f"Вот эмоджи {emojiFromServer}")
  20. menu1 = SelectOption(label=f'Бустер на 15 минут ',value='m1', description='Ускоряет время ожидание на 15 минут', emoji=f"{emojiFromServer}")
  21.  
  22.  
  23. menu2 = SelectOption(label='Второй итем',value='m2', description='Alle Infos zum GlobalMint-Bot', emoji='🌸')
  24. msg = await ctx.send(
  25. "Выберите придмет который вы хотите использовать",
  26. components=[
  27. SelectMenu(custom_id="test",placeholder="Только 1 придмет",max_values=1, options=[menu1, menu2])])
  28. # Wait for someone to click on it
  29. inter = await msg.wait_for_dropdown()
  30. # Send what you received
  31. labels = [option.value for option in inter.select_menu.selected_options]
  32. await inter.reply(f"Options: {', '.join(labels)}")
  33.  
  34.  
  35.  
  36.  
  37. except asyncio.TimeoutError as e:
  38. # message = await ctx.channel.fetch_message(message_id)
  39. # embed77.set_footer(text=f'Время ожидания закончилось.', icon_url=ctx.author.avatar_url)
  40. await responce.edit_origin(components=[])
Advertisement
Add Comment
Please, Sign In to add comment