@NIKITe

Ошибка с Dropdown disnake/Error with Dropdown disnake?

Я не понимаю возникновения ошибки/I don't understand the error
Ignoring exception in command vak:
Traceback (most recent call last):
  File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/disnake/ext/commands/core.py", line 173, in wrapped
    ret = await coro(*args, **kwargs)
  File "<string>", line 372, in vak
TypeError: __init__() got an unexpected keyword argument 'desciption'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/disnake/ext/commands/bot_base.py", line 591, in invoke
    await ctx.command.invoke(ctx)
  File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/disnake/ext/commands/core.py", line 914, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/disnake/ext/commands/core.py", line 182, in wrapped
    raise CommandInvokeError(exc) from exc
disnake.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: __init__() got an unexpected keyword argument 'desciption'

Вот мой код(два)/Here is my code (two):
Первый/First:
@bot.command(aliases=["работы","вакансия"])
async def vak(ctx):
	emb = discord.Embed(title="Выбор работы",desciption=f"**{ctx.author.name}**,выберите работу!",colour=color)
	await ctx.send(embed=emb,view=VakView())

Второй/Second:
class Vak(discord.ui.StringSelect):
	
	def __init__(self):
		options = [
			discord.SelectOption(label="Дворник", description="Начальная работа \"Подметаем!\""),
			discord.SelectOption(label="Дальнобойщик", description="Уже лучше \"Груз везем!\""),
			discord.SelectOption(label="Грузчик", description="Уже намного лучше \"Грузим вещи!\""),
			discord.SelectOption(label="Работник отеля", description="Продвинутая работа \"Обслуживание клиентов!\""),
			discord.SelectOption(label="Строитель", description=" Мега работа \"Строим!\""),
			discord.SelectOption(label="Бизнес-мен/вомен", description="Лучшая работа \"Бизнес!\""),
		]
		
		super().__init__(
			placeholder="Выбор работы",
			min_values=1,
			max_values=1,		
			options=options
		)
	async def callback(self,inter: discord.Interaction):
		await inter.response.send_message(f"Вы выбрали работу: {self.values[0]}.")


class VakView(discord.ui.View):
		
		def __init__(self):
			super().__init__()
			self.add_item(Vak())
  • Вопрос задан
  • 47 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы