Skip to content

Commit

Permalink
Remove channel check for ptal command (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
mandar1jn authored Nov 8, 2023
1 parent 80e61cd commit 2826307
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/commands/ptal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,6 @@ function GetReviewStateFromReview(state: string): PullRequestState

const generateReplyFromInteraction = async (description: string, github: string, deployment: string | null, other: string | null, interaction: ChatInputCommandInteraction | ButtonInteraction): Promise<InteractionReplyOptions | null> =>
{
// Allow /ptal in test server
if (interaction.guild?.name !== 'bot test') {
if(!(await interaction.guild?.channels.fetch(interaction.channelId))?.name.includes("ptal"))
{
interaction.reply({content: "This command can only be used in PTAL channels", ephemeral: true})
return null;
}
}

let urls: string[] = [];
let components: any[] = [];
const isUpdate = interaction.type === InteractionType.MessageComponent;
Expand Down

0 comments on commit 2826307

Please sign in to comment.