Edit embeds to provide bot information for submission.

This commit is contained in:
alwayscompiling
2022-12-01 23:26:04 -05:00
parent 02145ba244
commit 44cb9025b0
4 changed files with 41 additions and 31 deletions
+10 -2
View File
@@ -175,7 +175,7 @@ class Submission:
"""
self._username = username
def get_embed(self) -> Embed:
def get_embeds(self) -> "list[Embed]":
"""Creates an embed based off of the submission state and fields filled out."""
state: SubmissionState = self.submission_state
@@ -209,7 +209,15 @@ class Submission:
embed.add_field(name="Category", value=session.scalar(stmt), inline=False)
if self.score:
embed.add_field(name="Score", value=self.score, inline=False)
return embed
embeds = [embed]
if state is SubmissionState.VERIFY:
embed = Embed(title="Bot Information", description="Please disregard.")
embed.add_field(name="GroupId", value=self.group_id)
embed.add_field(name="CategoryId", value=self.category_id)
embeds.append(embed)
return embeds
class SubmissionMap: