diff options
| author | Samlon <stankiewiczgracjan2019@gmail.com> | 2025-09-01 16:55:09 +0200 |
|---|---|---|
| committer | Samlon <stankiewiczgracjan2019@gmail.com> | 2025-09-01 16:55:09 +0200 |
| commit | 51fcdc490d3e731adca3566cb2f9ee45b28c729f (patch) | |
| tree | 030eb2b8f97cb2270530ea7fadf1268c3c94bdca /cogs/compression.py | |
| parent | yt-dlp fixing (diff) | |
| download | senator-sperma-51fcdc490d3e731adca3566cb2f9ee45b28c729f.tar.gz senator-sperma-51fcdc490d3e731adca3566cb2f9ee45b28c729f.zip | |
add context commands
Diffstat (limited to '')
| -rw-r--r-- | cogs/compression.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cogs/compression.py b/cogs/compression.py index 2ee36bb..db47d46 100644 --- a/cogs/compression.py +++ b/cogs/compression.py | |||
| @@ -24,6 +24,17 @@ class Compression(commands.Cog): | |||
| 24 | def __init__(self, bot): | 24 | def __init__(self, bot): |
| 25 | self.bot = bot | 25 | self.bot = bot |
| 26 | 26 | ||
| 27 | @commands.message_command( | ||
| 28 | name="kompresja", | ||
| 29 | description="skompresuj wideło albo dźwienk :)", | ||
| 30 | ) | ||
| 31 | async def message_compression(self, ctx, message: discord.Message): | ||
| 32 | if message.attachments: | ||
| 33 | for attachment in message.attachments: | ||
| 34 | await self.compression(ctx, attachment) | ||
| 35 | else: | ||
| 36 | await ctx.respond("Brak załączników w wiadomości", ephemeral=True) | ||
| 37 | |||
| 27 | @commands.slash_command( | 38 | @commands.slash_command( |
| 28 | name="kompresja", | 39 | name="kompresja", |
| 29 | description="skompresuj wideło albo dźwienk :)", | 40 | description="skompresuj wideło albo dźwienk :)", |
