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.
- {scurrypy-0.5.2/scurrypy.egg-info → scurrypy-0.5.3}/PKG-INFO +9 -9
- {scurrypy-0.5.2 → scurrypy-0.5.3}/README.md +8 -8
- {scurrypy-0.5.2 → scurrypy-0.5.3}/pyproject.toml +1 -1
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/models/emoji.py +16 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3/scurrypy.egg-info}/PKG-INFO +9 -9
- {scurrypy-0.5.2 → scurrypy-0.5.3}/LICENSE +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/__init__.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/client.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/client_like.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/config.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/dispatch/__init__.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/dispatch/command_dispatcher.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/dispatch/event_dispatcher.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/dispatch/prefix_dispatcher.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/error.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/events/__init__.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/events/channel_events.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/events/guild_events.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/events/hello_event.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/events/interaction_events.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/events/message_events.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/events/reaction_events.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/events/ready_event.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/gateway.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/http.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/intents.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/logger.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/model.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/models/__init__.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/models/application.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/models/guild.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/models/integration.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/models/interaction.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/models/member.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/models/role.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/models/user.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/__init__.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/channel.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/command.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/component_types.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/components.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/components_v2.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/embed.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/message.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/modal.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/parts/role.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/resources/__init__.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/resources/application.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/resources/bot_emojis.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/resources/channel.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/resources/guild.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/resources/interaction.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/resources/message.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy/resources/user.py +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy.egg-info/SOURCES.txt +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy.egg-info/dependency_links.txt +0 -0
- {scurrypy-0.5.2 → scurrypy-0.5.3}/scurrypy.egg-info/top_level.txt +0 -0
- {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.
|
|
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
|
|
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 =
|
|
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=
|
|
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:
|
|
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
|
|
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 =
|
|
80
|
+
client = scurrypy.Client(
|
|
81
81
|
token=os.getenv("DISCORD_TOKEN"),
|
|
82
82
|
application_id=APPLICATION_ID # your bot’s application ID
|
|
83
|
-
intents=
|
|
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:
|
|
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
|
|
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 =
|
|
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=
|
|
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:
|
|
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
|
|
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 =
|
|
70
|
+
client = scurrypy.Client(
|
|
71
71
|
token=os.getenv("DISCORD_TOKEN"),
|
|
72
72
|
application_id=APPLICATION_ID # your bot’s application ID
|
|
73
|
-
intents=
|
|
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:
|
|
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
|
|
|
@@ -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.
|
|
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
|
|
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 =
|
|
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=
|
|
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:
|
|
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
|
|
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 =
|
|
80
|
+
client = scurrypy.Client(
|
|
81
81
|
token=os.getenv("DISCORD_TOKEN"),
|
|
82
82
|
application_id=APPLICATION_ID # your bot’s application ID
|
|
83
|
-
intents=
|
|
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:
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|