Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
Co-authored-by: Andy Barrett-Sprot <[email protected]>
  • Loading branch information
raccube and Adimote committed Aug 21, 2024
1 parent 71a53e6 commit 78344cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion example.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DISCORD_TOKEN=BLAHBLAH
DISCORD_TOKEN=
DISCORD_GUILD_ID=
14 changes: 7 additions & 7 deletions src/commands/join.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

@discord.app_commands.command( # type:ignore[arg-type]
name='join',
description='Join a team using a password',
description='Use your password to join the server under your team',
)
@app_commands.describe(
password="Your team's password",
Expand All @@ -28,12 +28,12 @@ async def join(interaction: discord.Interaction["BotClient"], password: str) ->
if member is None or isinstance(member, discord.User):
return

if interaction.guild is None or not isinstance(interaction.channel, discord.TextChannel):
return
guild: discord.Guild = interaction.guild

channel: discord.TextChannel = interaction.channel
if channel is None or not channel.name.startswith(CHANNEL_PREFIX):
guild: discord.Guild | None = interaction.guild
channel: discord.abc.GuildChannel = interaction.channel
if (guild is None
or not isinstance(channel, discord.TextChannel)
or channel is None
or not channel.name.startswith(CHANNEL_PREFIX)):
return

chosen_team = await find_team(interaction.client, member, password)
Expand Down

0 comments on commit 78344cc

Please sign in to comment.