Edit embeds to provide bot information for submission.
This commit is contained in:
+10
-2
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user