Skip to content

Commit

Permalink
Merge pull request #407 from JakeBrowning90/feature/slash-memory
Browse files Browse the repository at this point in the history
new-era-commands/slash: Add memory command
  • Loading branch information
ManonLef authored Sep 8, 2023
2 parents 6678b66 + 6f3b7b0 commit 73d0919
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions new-era-commands/slash/memory.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');

module.exports = {
data: new SlashCommandBuilder()
.setName('memory')
.setDescription('A professional\'s anecdote about why you don\'t need to memorize everything you\'re learning.')
.addUserOption((option) => option.setName('user').setDescription('user to ping')),
execute: async (interaction) => {
const userId = interaction.options.getUser('user')?.id;
const memoryEmbed = new EmbedBuilder()
.setColor('#cc9543')
.setTitle('Memorization and learning to code')
.setDescription(
'Please read this [blog post about why you don\'t need to memorize everything you learn.](https://dev.to/theodinproject/memorization-and-learning-to-code-1b6h)',
);
await interaction.reply({
content: userId ? `<@${userId}>` : '',
embeds: [memoryEmbed],
});
},
};

0 comments on commit 73d0919

Please sign in to comment.