Skip to content

Commit

Permalink
fix: formatting added and role checking remove
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Kryukov authored and Nikita Kryukov committed May 29, 2023
1 parent c551a43 commit fa531c4
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/bot/commands/daily.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export async function sendDailyNews(
gptResponse[0] = `${header}\n\n${gptResponse[0]}`;

for (const response of gptResponse) {
await channel.send(response);
await channel.send(`\`\`\`\n${response}\n\`\`\``);
}
return;
} else if (typeof gptResponse == 'object' && 'error' in gptResponse) {
Expand Down Expand Up @@ -118,16 +118,6 @@ export async function handleDailyCommandInteraction(
return;
}

if (
!(interaction.member as GuildMember)?.permissions.has('ModerateMembers')
) {
await interaction.reply({
content: 'You are not permitted to use this command.',
ephemeral: true,
});
return;
}

const dateArg = getArgument(interaction, 'date') as string;
const date = dateArg ? getValidatedDate(dateArg) : dayjs.utc();
if (!date) {
Expand Down

0 comments on commit fa531c4

Please sign in to comment.