@bot.command()
async def but(ctx):
view = disnake.ui.View()
button = disnake.ui.Button(style=disnake.ButtonStyle.green, label="Нажми на меня")
button.callback = lambda interaction: interaction.response.edit_message("Удачное нажатие!")
view.add_item(button)
await ctx.send(view=view)