This commit is contained in:
Vendored
+3
-2
@@ -7,11 +7,12 @@
|
||||
"imcompiling",
|
||||
"iterrows",
|
||||
"nextcord",
|
||||
"ondelete"
|
||||
"ondelete",
|
||||
"pylance's"
|
||||
],
|
||||
"python.analysis.diagnosticSeverityOverrides": {
|
||||
"reportOptionalMemberAccess": "warning",
|
||||
"reportArgumentType": "information",
|
||||
"reportAttributeAccessIssue": "warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class SubmissionCog(commands.Cog):
|
||||
"""Parent slash command for submitting scores. Never called."""
|
||||
|
||||
@submit.subcommand(name="int", description="Submit an integer type score.")
|
||||
async def integer(
|
||||
async def integer( # noqa: PLR0911, PLR0913
|
||||
self,
|
||||
interaction: nextcord.Interaction,
|
||||
group_id: str = nextcord.SlashOption(name="group", required=True, description="Group to submit score to."),
|
||||
@@ -53,6 +53,10 @@ class SubmissionCog(commands.Cog):
|
||||
proof (nextcord.Attachment): Is SlashOption. Picture to provide proof of score.
|
||||
username (str, optional): Is SlashOption. Username to associate with the score.
|
||||
"""
|
||||
if interaction.guild is None or interaction.user is None or interaction.guild_id is None:
|
||||
# Type checking for pylance's sake.
|
||||
await interaction.response.send_message("Error with guild or user.", ephemeral=True)
|
||||
return
|
||||
# fill out username if not passed in
|
||||
if username is None:
|
||||
username = interaction.user.display_name
|
||||
|
||||
Reference in New Issue
Block a user