Advertisement
jensie1996

Opslaan data mongoose Discord v14

Jan 24th, 2024 (edited)
607
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const { SlashCommandBuilder } = require('discord.js');
  2. // ...
  3.  
  4. module.exports = {
  5.     data: new SlashCommandBuilder()
  6.         .setName('opslaandb')
  7.         .setDescription('Slaat een waarde op in de DB')
  8.         .addStringOption(option =>
  9.             option.setName('waarde')
  10.                 .setDescription('Tekst wat je wilt opslaan')
  11.                 .setRequired(true)),
  12.     async execute(client, interaction) {
  13.  
  14.         const waardeStr = await interaction.options.getString('waarde');
  15.  
  16.         // ...
  17.        
  18.         await interaction.reply("Tekst opgeslagen");
  19.     }
  20. };
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement