This commit is contained in:
Vendored
+2
-1
@@ -7,7 +7,8 @@
|
|||||||
"imcompiling",
|
"imcompiling",
|
||||||
"iterrows",
|
"iterrows",
|
||||||
"nextcord",
|
"nextcord",
|
||||||
"ondelete"
|
"ondelete",
|
||||||
|
"pylance's"
|
||||||
],
|
],
|
||||||
"python.analysis.diagnosticSeverityOverrides": {
|
"python.analysis.diagnosticSeverityOverrides": {
|
||||||
"reportOptionalMemberAccess": "warning",
|
"reportOptionalMemberAccess": "warning",
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class SubmissionCog(commands.Cog):
|
|||||||
"""Parent slash command for submitting scores. Never called."""
|
"""Parent slash command for submitting scores. Never called."""
|
||||||
|
|
||||||
@submit.subcommand(name="int", description="Submit an integer type score.")
|
@submit.subcommand(name="int", description="Submit an integer type score.")
|
||||||
async def integer(
|
async def integer( # noqa: PLR0911, PLR0913
|
||||||
self,
|
self,
|
||||||
interaction: nextcord.Interaction,
|
interaction: nextcord.Interaction,
|
||||||
group_id: str = nextcord.SlashOption(name="group", required=True, description="Group to submit score to."),
|
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.
|
proof (nextcord.Attachment): Is SlashOption. Picture to provide proof of score.
|
||||||
username (str, optional): Is SlashOption. Username to associate with the 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
|
# fill out username if not passed in
|
||||||
if username is None:
|
if username is None:
|
||||||
username = interaction.user.display_name
|
username = interaction.user.display_name
|
||||||
|
|||||||
Reference in New Issue
Block a user