@admingroup.sub_command(
base="message",
name="news",
description="Відправити новину",
options=[
disnake.Option(
name="everyone",
description="Чи треба пінг евріван",
type=disnake.OptionType.boolean,
required=True
),
disnake.Option(
name="опис",
description="Опис (використовуйте \\n для нового рядка) або ID повідомлення с описом",
required=True
),
disnake.Option(
name="назва",
description="Назва новини",
required=False
),
disnake.Option(
name="колір",
description="Колір (HEX)",
required=False
),
disnake.Option(
name="канал",
description="Канал куди відправити",
)
]
)
async def news(self, inter, everyone:bool, опис:str, канал:disnake.TextChannel=None, назва:str="Новина", колір:str="2a66c6"):
#how to use TextChannel in options
1 messages · Page 1 of 1 (latest)
This feels cursed.
Not understood. My code does not work, but I need to be able to specify the channel in the options.
- Use docstrings
- what do you mean specify the channel in options?