scurrypy 0.5.2__tar.gz → 0.5.3__tar.gz

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.

Potentially problematic release.


This version of scurrypy might be problematic. Click here for more details.

Files changed (58) hide show
  1. {scurrypy-0.5.2/scurrypy.egg-info → scurrypy-0.5.3}/PKG-INFO +9 -9
  2. {scurrypy-0.5.2 → scurrypy-0.5.3}/README.md +8 -8
  3. {scurrypy-0.5.2 → scurrypy-0.5.3}/pyproject.toml +1 -1
  4. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/models/emoji.py +16 -0
  5. {scurrypy-0.5.2 → scurrypy-0.5.3/scurrypy.egg-info}/PKG-INFO +9 -9
  6. {scurrypy-0.5.2 → scurrypy-0.5.3}/LICENSE +0 -0
  7. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/__init__.py +0 -0
  8. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/client.py +0 -0
  9. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/client_like.py +0 -0
  10. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/config.py +0 -0
  11. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/dispatch/__init__.py +0 -0
  12. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/dispatch/command_dispatcher.py +0 -0
  13. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/dispatch/event_dispatcher.py +0 -0
  14. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/dispatch/prefix_dispatcher.py +0 -0
  15. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/error.py +0 -0
  16. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/events/__init__.py +0 -0
  17. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/events/channel_events.py +0 -0
  18. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/events/guild_events.py +0 -0
  19. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/events/hello_event.py +0 -0
  20. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/events/interaction_events.py +0 -0
  21. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/events/message_events.py +0 -0
  22. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/events/reaction_events.py +0 -0
  23. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/events/ready_event.py +0 -0
  24. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/gateway.py +0 -0
  25. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/http.py +0 -0
  26. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/intents.py +0 -0
  27. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/logger.py +0 -0
  28. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/model.py +0 -0
  29. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/models/__init__.py +0 -0
  30. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/models/application.py +0 -0
  31. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/models/guild.py +0 -0
  32. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/models/integration.py +0 -0
  33. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/models/interaction.py +0 -0
  34. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/models/member.py +0 -0
  35. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/models/role.py +0 -0
  36. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/models/user.py +0 -0
  37. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/__init__.py +0 -0
  38. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/channel.py +0 -0
  39. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/command.py +0 -0
  40. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/component_types.py +0 -0
  41. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/components.py +0 -0
  42. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/components_v2.py +0 -0
  43. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/embed.py +0 -0
  44. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/message.py +0 -0
  45. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/modal.py +0 -0
  46. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/role.py +0 -0
  47. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/resources/__init__.py +0 -0
  48. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/resources/application.py +0 -0
  49. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/resources/bot_emojis.py +0 -0
  50. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/resources/channel.py +0 -0
  51. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/resources/guild.py +0 -0
  52. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/resources/interaction.py +0 -0
  53. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/resources/message.py +0 -0
  54. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/resources/user.py +0 -0
  55. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy.egg-info/SOURCES.txt +0 -0
  56. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy.egg-info/dependency_links.txt +0 -0
  57. {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy.egg-info/top_level.txt +0 -0
  58. {scurrypy-0.5.2 → scurrypy-0.5.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scurrypy
3
- Version: 0.5.2
3
+ Version: 0.5.3
4
4
  Summary: Dataclass-driven Discord API Wrapper in Python
5
5
  Author: Furmissile
6
6
  Requires-Python: >=3.10
@@ -46,24 +46,24 @@ The following demonstrates building and responding to a slash command.
46
46
  *Note: Adjust `dotenv_path` if your `.env` file is not in the same directory as this script.*
47
47
 
48
48
  ```py
49
- import discord, os
49
+ import scurrypy, os
50
50
  from dotenv import load_dotenv
51
51
 
52
52
  load_dotenv(dotenv_path='./path/to/env')
53
53
 
54
- client = discord.Client(
54
+ client = scurrypy.Client(
55
55
  token=os.getenv("DISCORD_TOKEN"),
56
56
  application_id=APPLICATION_ID # your bot’s application ID
57
57
  )
58
58
 
59
59
  @client.command(
60
- command=discord.SlashCommand(
60
+ command=scurrypy.SlashCommand(
61
61
  name='example',
62
62
  description='Demonstrate the minimal slash command!'
63
63
  ),
64
64
  guild_ids=GUILD_ID # must be a guild ID your bot is in
65
65
  )
66
- async def example(bot: discord.Client, event: discord.InteractionEvent):
66
+ async def example(bot: scurrypy.Client, event: scurrypy.InteractionEvent):
67
67
  await event.interaction.respond(f'Hello, {event.interaction.member.user.username}!')
68
68
 
69
69
  client.run()
@@ -72,20 +72,20 @@ client.run()
72
72
  ## Minimal Prefix Command (Legacy)
73
73
  The following demonstrates building and responding to a message prefix command.
74
74
  ```py
75
- import discord, os
75
+ import scurrypy, os
76
76
  from dotenv import load_dotenv
77
77
 
78
78
  load_dotenv(dotenv_path='./path/to/env')
79
79
 
80
- client = discord.Client(
80
+ client = scurrypy.Client(
81
81
  token=os.getenv("DISCORD_TOKEN"),
82
82
  application_id=APPLICATION_ID # your bot’s application ID
83
- intents=discord.set_intents(message_content=True),
83
+ intents=scurrypy.set_intents(message_content=True),
84
84
  prefix='!' # your custom prefix
85
85
  )
86
86
 
87
87
  @client.prefix_command
88
- async def ping(bot: discord.Client, event: discord.MessageCreateEvent):
88
+ async def ping(bot: scurrypy.Client, event: scurrypy.MessageCreateEvent):
89
89
  # The function name is the name of the command
90
90
  await event.message.send("Pong!")
91
91
 
@@ -36,24 +36,24 @@ The following demonstrates building and responding to a slash command.
36
36
  *Note: Adjust `dotenv_path` if your `.env` file is not in the same directory as this script.*
37
37
 
38
38
  ```py
39
- import discord, os
39
+ import scurrypy, os
40
40
  from dotenv import load_dotenv
41
41
 
42
42
  load_dotenv(dotenv_path='./path/to/env')
43
43
 
44
- client = discord.Client(
44
+ client = scurrypy.Client(
45
45
  token=os.getenv("DISCORD_TOKEN"),
46
46
  application_id=APPLICATION_ID # your bot’s application ID
47
47
  )
48
48
 
49
49
  @client.command(
50
- command=discord.SlashCommand(
50
+ command=scurrypy.SlashCommand(
51
51
  name='example',
52
52
  description='Demonstrate the minimal slash command!'
53
53
  ),
54
54
  guild_ids=GUILD_ID # must be a guild ID your bot is in
55
55
  )
56
- async def example(bot: discord.Client, event: discord.InteractionEvent):
56
+ async def example(bot: scurrypy.Client, event: scurrypy.InteractionEvent):
57
57
  await event.interaction.respond(f'Hello, {event.interaction.member.user.username}!')
58
58
 
59
59
  client.run()
@@ -62,20 +62,20 @@ client.run()
62
62
  ## Minimal Prefix Command (Legacy)
63
63
  The following demonstrates building and responding to a message prefix command.
64
64
  ```py
65
- import discord, os
65
+ import scurrypy, os
66
66
  from dotenv import load_dotenv
67
67
 
68
68
  load_dotenv(dotenv_path='./path/to/env')
69
69
 
70
- client = discord.Client(
70
+ client = scurrypy.Client(
71
71
  token=os.getenv("DISCORD_TOKEN"),
72
72
  application_id=APPLICATION_ID # your bot’s application ID
73
- intents=discord.set_intents(message_content=True),
73
+ intents=scurrypy.set_intents(message_content=True),
74
74
  prefix='!' # your custom prefix
75
75
  )
76
76
 
77
77
  @client.prefix_command
78
- async def ping(bot: discord.Client, event: discord.MessageCreateEvent):
78
+ async def ping(bot: scurrypy.Client, event: scurrypy.MessageCreateEvent):
79
79
  # The function name is the name of the command
80
80
  await event.message.send("Pong!")
81
81
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "scurrypy"
7
- version = "0.5.2"
7
+ version = "0.5.3"
8
8
 
9
9
  description = "Dataclass-driven Discord API Wrapper in Python"
10
10
  readme = "README.md"
@@ -32,3 +32,19 @@ class EmojiModel(DataModel):
32
32
  return quote(f"a:{self.name}:{self.id}")
33
33
 
34
34
  return quote(f"{self.name}:{self.id}")
35
+
36
+ @property
37
+ def url(self) -> str:
38
+ """
39
+ Return the full qualifying link for this emoji.
40
+
41
+ !!! important
42
+ This only works for custom Discord emojis (those with an ID).
43
+ Unicode emojis will return `None`.
44
+ """
45
+ if not self.id:
46
+ return None
47
+
48
+ ext = 'gif' if self.animated else 'png'
49
+
50
+ return f"https://cdn.discordapp.com/emojis/{self.id}.{ext}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scurrypy
3
- Version: 0.5.2
3
+ Version: 0.5.3
4
4
  Summary: Dataclass-driven Discord API Wrapper in Python
5
5
  Author: Furmissile
6
6
  Requires-Python: >=3.10
@@ -46,24 +46,24 @@ The following demonstrates building and responding to a slash command.
46
46
  *Note: Adjust `dotenv_path` if your `.env` file is not in the same directory as this script.*
47
47
 
48
48
  ```py
49
- import discord, os
49
+ import scurrypy, os
50
50
  from dotenv import load_dotenv
51
51
 
52
52
  load_dotenv(dotenv_path='./path/to/env')
53
53
 
54
- client = discord.Client(
54
+ client = scurrypy.Client(
55
55
  token=os.getenv("DISCORD_TOKEN"),
56
56
  application_id=APPLICATION_ID # your bot’s application ID
57
57
  )
58
58
 
59
59
  @client.command(
60
- command=discord.SlashCommand(
60
+ command=scurrypy.SlashCommand(
61
61
  name='example',
62
62
  description='Demonstrate the minimal slash command!'
63
63
  ),
64
64
  guild_ids=GUILD_ID # must be a guild ID your bot is in
65
65
  )
66
- async def example(bot: discord.Client, event: discord.InteractionEvent):
66
+ async def example(bot: scurrypy.Client, event: scurrypy.InteractionEvent):
67
67
  await event.interaction.respond(f'Hello, {event.interaction.member.user.username}!')
68
68
 
69
69
  client.run()
@@ -72,20 +72,20 @@ client.run()
72
72
  ## Minimal Prefix Command (Legacy)
73
73
  The following demonstrates building and responding to a message prefix command.
74
74
  ```py
75
- import discord, os
75
+ import scurrypy, os
76
76
  from dotenv import load_dotenv
77
77
 
78
78
  load_dotenv(dotenv_path='./path/to/env')
79
79
 
80
- client = discord.Client(
80
+ client = scurrypy.Client(
81
81
  token=os.getenv("DISCORD_TOKEN"),
82
82
  application_id=APPLICATION_ID # your bot’s application ID
83
- intents=discord.set_intents(message_content=True),
83
+ intents=scurrypy.set_intents(message_content=True),
84
84
  prefix='!' # your custom prefix
85
85
  )
86
86
 
87
87
  @client.prefix_command
88
- async def ping(bot: discord.Client, event: discord.MessageCreateEvent):
88
+ async def ping(bot: scurrypy.Client, event: scurrypy.MessageCreateEvent):
89
89
  # The function name is the name of the command
90
90
  await event.message.send("Pong!")
91
91
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes