-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #407 from JakeBrowning90/feature/slash-memory
new-era-commands/slash: Add memory command
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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], | ||
}); | ||
}, | ||
}; |