embed-model 0.4__py3-none-any.whl → 0.4.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
embed_model/__init__.py CHANGED
@@ -104,7 +104,7 @@ class EmbedModelCommands(app_commands.Group):
104
104
  )
105
105
 
106
106
  exemplo_json = """```json
107
- {
107
+ {
108
108
  "title": "Título do Embed",
109
109
  "description": "Descrição do Embed",
110
110
  "color": "#5865F2",
@@ -136,7 +136,7 @@ class EmbedModelCommands(app_commands.Group):
136
136
  "inline": false
137
137
  }
138
138
  ]
139
- }
139
+ }
140
140
  ```"""
141
141
 
142
142
  embed.add_field(name="📝 Exemplo de JSON", value=exemplo_json, inline=False)
embed_model/buttons.py CHANGED
@@ -30,17 +30,11 @@ class SendButton(discord.ui.Button):
30
30
  self.msg = msg
31
31
 
32
32
  async def callback(self, interaction: discord.Interaction):
33
- await self.msg.channel.send(content=self.msg.content, embed=self.msg.embeds[0])
33
+ embed = self.msg.embeds[0]
34
+ embed.timestamp = discord.utils.utcnow() if embed.timestamp else None
35
+ await self.msg.channel.send(content=self.msg.content, embed=embed)
34
36
  await interaction.response.send_message("Embed enviado com sucesso!", ephemeral=True)
35
37
 
36
- class CancelButton(discord.ui.Button):
37
- def __init__(self, msg: discord.Message):
38
- super().__init__(label="Cancelar", style=discord.ButtonStyle.red, emoji="❌")
39
- self.msg = msg
40
-
41
- async def callback(self, interaction: discord.Interaction):
42
- await self.msg.delete()
43
-
44
38
  class AddFieldButton(discord.ui.Button):
45
39
  def __init__(self, message: discord.Message):
46
40
  super().__init__(label="Adicionar Field", style=discord.ButtonStyle.gray, emoji="➕")
embed_model/menus.py CHANGED
@@ -120,7 +120,7 @@ class LinguagemSelect(discord.ui.Select):
120
120
  js_code += f' color: {'"#{:06X}"'.format(embed.colour.value) if embed.colour else 'null'},\n'
121
121
  js_code += f' timestamp: "{embed.timestamp.isoformat()}"' if embed.timestamp else ""
122
122
  if embed.author:
123
- js_code += f',\n author: {{\n name: "{embed.author.name}"'
123
+ js_code += f' author: {{\n name: "{embed.author.name}"'
124
124
  if embed.author.url:
125
125
  js_code += f',\n url: "{embed.author.url}"'
126
126
  if embed.author.icon_url:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: embed_model
3
- Version: 0.4
3
+ Version: 0.4.3
4
4
  Summary: Um modelo de embeds não oficial para discord.py. Feito em Português.
5
5
  Home-page: https://github.com/LucaCunha001/DiscordEmbedModel
6
6
  Author: Luca Cunha (Frisk)
@@ -0,0 +1,11 @@
1
+ embed-model/__init__.py,sha256=GPy9PjPYdp9Bkk2q7-Ax6OWN6vvVf2gMN0qwKuSWczE,20
2
+ embed-model/modulo.py,sha256=Z3_Is6T3PxU5QXO4i7t-L40MlDlcAqS3Eti77yxADFo,18431
3
+ embed_model/__init__.py,sha256=ngZapDyhlk5fLHOkNGSs9XwmTp90pYPHIeMvAwKlxmI,5590
4
+ embed_model/buttons.py,sha256=ofdkYbuAswTF7-Gm9IZsWI15pc4ovrs1sYup2L-v6Ps,1846
5
+ embed_model/menus.py,sha256=kGrKnGmfR_QubF118aY0ObSUR6EQ1c8S33gbhzcQSkw,6317
6
+ embed_model/modals.py,sha256=ZfOOeeodmlYUIgRoi--mYhSPu20y_7Pk4zfSQeWJGrA,6970
7
+ embed_model/modulo.py,sha256=Z3_Is6T3PxU5QXO4i7t-L40MlDlcAqS3Eti77yxADFo,18431
8
+ embed_model-0.4.3.dist-info/METADATA,sha256=_LSEQFsYOqx6RfOGrBRAiMPGIPQjxcl7D5RQdVRO1kw,1834
9
+ embed_model-0.4.3.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
10
+ embed_model-0.4.3.dist-info/top_level.txt,sha256=de9m0qp01SqUQYtnlOoOOlGtfgttPyh38cxJqGjtSLs,12
11
+ embed_model-0.4.3.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- embed-model/__init__.py,sha256=GPy9PjPYdp9Bkk2q7-Ax6OWN6vvVf2gMN0qwKuSWczE,20
2
- embed-model/modulo.py,sha256=Z3_Is6T3PxU5QXO4i7t-L40MlDlcAqS3Eti77yxADFo,18431
3
- embed_model/__init__.py,sha256=T8NZU1xAlXNJ47quC8Yu4LbU_OWH7TrnITp_VhnziUA,5592
4
- embed_model/buttons.py,sha256=ejaS65Ww5x4DZI06r0uqh6rdkzNVXP7jxPgrMc4V32Y,2033
5
- embed_model/menus.py,sha256=3g1Q_n4TP_91kqH6poehq92avuRBf7hO4GZ9QcmJdiY,6320
6
- embed_model/modals.py,sha256=ZfOOeeodmlYUIgRoi--mYhSPu20y_7Pk4zfSQeWJGrA,6970
7
- embed_model/modulo.py,sha256=Z3_Is6T3PxU5QXO4i7t-L40MlDlcAqS3Eti77yxADFo,18431
8
- embed_model-0.4.dist-info/METADATA,sha256=lrujdR-zm5s5PplbozYhmO5nzy4yO_M6HkVJ4Mv6vAw,1832
9
- embed_model-0.4.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
10
- embed_model-0.4.dist-info/top_level.txt,sha256=de9m0qp01SqUQYtnlOoOOlGtfgttPyh38cxJqGjtSLs,12
11
- embed_model-0.4.dist-info/RECORD,,