39 |
options: args.filter(a => a[0] === '-'), |
options: args.filter(a => a[0] === '-'), |
40 |
isInteraction: false |
isInteraction: false |
41 |
} as CommandOptions; |
} as CommandOptions; |
|
|
|
|
if (!await client.cooldown.start(message, options)) |
|
|
return; |
|
42 |
|
|
43 |
await command.execute(client, message, options); |
await command.execute(client, message, options); |
44 |
} |
} |
57 |
|
|
58 |
const snippet = await client.snippetManager.getParsed(message.guild!.id, cmdName); |
const snippet = await client.snippetManager.getParsed(message.guild!.id, cmdName); |
59 |
|
|
60 |
if (snippet) { |
if (snippet) { |
61 |
await message.channel.send({ |
try { |
62 |
content: snippet.content.trim() === '' ? undefined : snippet.content, |
await message.channel.send({ |
63 |
files: snippet.files.map(name => { |
content: snippet.content.trim() === '' ? undefined : snippet.content, |
64 |
return { |
files: snippet.files.map(name => { |
65 |
name, |
return { |
66 |
attachment: path.resolve(__dirname, '../../../storage', name) |
name, |
67 |
} as FileOptions |
attachment: path.resolve(__dirname, '../../../storage', name) |
68 |
}), |
} as FileOptions |
69 |
embeds: snippet.embeds |
}), |
70 |
}); |
embeds: snippet.embeds |
71 |
|
}); |
72 |
|
} |
73 |
|
catch (e) { |
74 |
|
console.log(e); |
75 |
|
} |
76 |
|
|
77 |
return; |
return; |
78 |
} |
} |