From ab497987ac36d0928252b3766a18c60dff45a66c Mon Sep 17 00:00:00 2001 From: DA-344 <108473820+DA-344@users.noreply.github.com> Date: Fri, 25 Apr 2025 21:38:27 +0200 Subject: [PATCH] chore: Update examples and things --- discord/ui/view.py | 2 +- examples/views/layout.py | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/discord/ui/view.py b/discord/ui/view.py index 4fd528ee3..a13141432 100644 --- a/discord/ui/view.py +++ b/discord/ui/view.py @@ -700,7 +700,7 @@ class LayoutView(BaseView): This object must be inherited to create a UI within Discord. - + You can find usage examples in the :resource:`repository ` .. versionadded:: 2.6 diff --git a/examples/views/layout.py b/examples/views/layout.py index 08d43c1af..70effc30c 100644 --- a/examples/views/layout.py +++ b/examples/views/layout.py @@ -28,11 +28,9 @@ class Layout(discord.ui.LayoutView): await interaction.response.send_message('Hi!', ephemeral=True) container = discord.ui.Container( - [ - discord.ui.TextDisplay( - 'Click the above button to receive a **very special** message!', - ), - ], + discord.ui.TextDisplay( + 'Click the above button to receive a **very special** message!', + ), accent_colour=discord.Colour.blurple(), ) @@ -43,7 +41,7 @@ bot = Bot() @bot.command() async def layout(ctx: commands.Context): """Sends a very special message!""" - await ctx.send(view=Layout()) # sending LayoutView's does not allow for sending any other content + await ctx.send(view=Layout()) # sending LayoutView's does not allow for sending any content, embed(s), stickers, or poll bot.run('token')