Skip to content

Commit

Permalink
Merge pull request #53 from TogetherCrew/fix/chat-input-interaction
Browse files Browse the repository at this point in the history
fix: discord-bot payloads!
  • Loading branch information
cyri113 authored Jan 18, 2024
2 parents f857b7b + fdd288c commit 9f11973
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name="tc-messageBroker",
version="1.6.5",
version="1.6.6",
author="Mohammad Amin Dadgar, RnDAO",
maintainer="Mohammad Amin Dadgar",
maintainer_email="[email protected]",
Expand Down
8 changes: 4 additions & 4 deletions tc_messageBroker/rabbit_mq/payload/payload_microservices.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def from_dict(cls, d: dict) -> "DiscordBotInteractionResponseCreatePayload":
)

def to_dict(self):
return {"data": self.data.to_dict(), "interaction": self.interaction}
return {"data": self.data.to_dict(), "interaction": self.interaction.to_dict()}


class DiscordBotInteractionResponseEditPayload:
Expand Down Expand Up @@ -65,7 +65,7 @@ def from_dict(cls, d: dict) -> "DiscordBotInteractionResponseEditPayload":
return cls(interaction=interaction, data=data)

def to_dict(self):
return {"data": self.data, "interaction": self.interaction}
return {"data": self.data.to_dict(), "interaction": self.interaction.to_dict()}


class DiscordBotInteractionResponseDeletePayload:
Expand All @@ -89,7 +89,7 @@ def from_dict(cls, d: dict) -> "DiscordBotInteractionResponseDeletePayload":
return cls(interaction=interaction)

def to_dict(self):
return {"interaction": self.interaction}
return {"interaction": self.interaction.to_dict()}


class DiscordBotFollowUpMessageCreatePayload:
Expand All @@ -116,7 +116,7 @@ def from_dict(cls, d: dict) -> "DiscordBotFollowUpMessageCreatePayload":
return cls(interaction=interaction, data=data)

def to_dict(self):
return {"interaction": self.interaction, "data": self.data}
return {"interaction": self.interaction.to_dict(), "data": self.data.to_dict()}


class DiscordInteractionResponsePayload:
Expand Down

0 comments on commit 9f11973

Please sign in to comment.