@@ -52,27 +52,42 @@ def create_embed(
52
52
"""
53
53
Create a customized Discord embed based on the specified type and parameters.
54
54
55
- Args:
56
- embed_type (EmbedType): Determines the default color and icon for the embed.
57
- bot (Tux | None): If provided, used to display bot latency in the footer.
58
- title (str | None): The embed's title. At least one of title or description should be provided.
59
- description (str | None): The embed's main content. At least one of title or description should be provided.
60
- user_name (str | None): Used in footer if provided, otherwise defaults to bot's username.
61
- user_display_avatar (str | None): User's avatar URL for the footer icon.
62
- image_url (str | None): URL for the embed's main image.
63
- thumbnail_url (str | None): URL for the embed's thumbnail image.
64
- message_timestamp (datetime | None): Custom timestamp for the embed.
65
- custom_footer_text (str | None): Overrides default footer text if provided.
66
- custom_footer_icon_url (str | None): Overrides default footer icon if provided.
67
- custom_author_text (str | None): Overrides default author text if provided.
68
- custom_author_text_url (str | None): Adds author URL if provided.
69
- custom_author_icon_url (str | None): Overrides default author icon if provided.
70
- hide_author (bool): If True, removes the author from the embed.
71
- custom_color (int | Colour |None): Overrides default color for the embed type if provided.
72
-
73
- Note:
74
- Custom parameters (prefixed with 'custom_') override default values.
55
+ Parameters
56
+ ----------
57
+ embed_type : EmbedType
58
+ Determines the default color and icon for the embed.
59
+ bot : Tux, optional
60
+ If provided, used to display bot latency in the footer.
61
+ title : str, optional
62
+ The embed's title. At least one of `title` or `description` should be provided.
63
+ description : str, optional
64
+ The embed's main content. At least one of `title` or `description` should be provided.
65
+ user_name : str, optional
66
+ Used in footer if provided, otherwise defaults to bot's username.
67
+ user_display_avatar : str, optional
68
+ User's avatar URL for the footer icon.
69
+ image_url : str, optional
70
+ URL for the embed's main image.
71
+ thumbnail_url : str, optional
72
+ URL for the embed's thumbnail image.
73
+ message_timestamp : datetime, optional
74
+ Custom timestamp for the embed.
75
+ custom_footer_text : str, optional
76
+ Overrides default footer text if provided.
77
+ custom_footer_icon_url : str, optional
78
+ Overrides default footer icon if provided.
79
+ custom_author_text : str, optional
80
+ Overrides default author text if provided.
81
+ custom_author_text_url : str, optional
82
+ Adds author URL if provided.
83
+ custom_author_icon_url : str, optional
84
+ Overrides default author icon if provided.
85
+ hide_author : bool, default=False
86
+ If True, removes the author from the embed.
87
+ custom_color : int or Colour, optional
88
+ Overrides default color for the embed type if provided.
75
89
"""
90
+
76
91
try :
77
92
embed : discord .Embed = discord .Embed (title = title , description = description )
78
93
@@ -133,4 +148,8 @@ def get_footer(
133
148
raise
134
149
135
150
else :
136
- return (text , user_display_avatar or "https://i.imgur.com/4sblrd0.png" )
151
+ return (
152
+ text ,
153
+ user_display_avatar
154
+ or "https://github.com/allthingslinux/tux/blob/main/assets/branding/avatar.png?raw=true" ,
155
+ )
0 commit comments