/[sudobot]/trunk/commands/addsnippet.js
ViewVC logotype

Diff of /trunk/commands/addsnippet.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5 by rakin, Mon Jul 29 17:28:11 2024 UTC revision 27 by rakin, Mon Jul 29 17:28:16 2024 UTC
# Line 17  module.exports = { Line 17  module.exports = {
17          let args = [...cm.args];          let args = [...cm.args];
18          args.shift();          args.shift();
19          let content = args.join(' ');          let content = args.join(' ');
20    
21            let files = msg.attachments.map(a => {
22                return {
23                    name: a.name,
24                    attachment: a.attachment,
25                    proxyURL: a.proxyURL,
26                }
27            });
28    
29            console.log(files);
30                    
31          let status = cm.snippetManager.create(cm.args[0], content);          let status = await cm.snippetManager.create(msg.guild.id, cm.args[0], content, files);
32                    
33          if (status) {          if (status) {
34              await msg.reply({              await msg.reply({

Legend:
Removed from v.5  
changed lines
  Added in v.27

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26