Skip to content
This repository has been archived by the owner on Apr 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #21 from interactions-py/unstable
Browse files Browse the repository at this point in the history
chore: Version bump to 1.1.4
  • Loading branch information
B1ue-Dev authored Sep 15, 2022
2 parents 78e130c + 40310b0 commit 0cb97f1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions interactions/ext/files/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ async def command_send(
:rtype: Message
"""

if not isinstance(ctx, CommandContext):
return log.warning(f"You can only use command_send for CommandContext, not {type(ctx).__name__}")

payload, files = await Context._send(ctx, content, **kwargs)

if not ctx.deferred:
Expand Down Expand Up @@ -405,6 +408,9 @@ async def command_edit(
:rtype: Message
"""

if not isinstance(ctx, CommandContext):
return log.warning(f"You can only use command_edit for CommandContext, not {type(ctx).__name__}")

payload, files = await Context._edit(ctx, content, **kwargs)
msg = None

Expand Down Expand Up @@ -488,6 +494,9 @@ async def component_send(
:rtype: Message
"""

if not isinstance(ctx, ComponentContext):
return log.warning(f"You can only use component_send for ComponentContext, not {type(ctx).__name__}")

payload, files = await Context._send(ctx, content, **kwargs)

if not ctx.deferred:
Expand Down Expand Up @@ -556,6 +565,9 @@ async def component_edit(
:rtype: Message
"""

if not isinstance(ctx, ComponentContext):
return log.warning(f"You can only use component_edit for ComponentContext, not {type(ctx).__name__}")

payload, files = await Context._edit(ctx, content, **kwargs)

msg = None
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="interactions-files",
version="1.1.3",
version="1.1.4",
description="An extension library for interactions.py allowing files in interaction responses.",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 0cb97f1

Please sign in to comment.