43 |
if (!await client.cooldown.start(message, options)) |
if (!await client.cooldown.start(message, options)) |
44 |
return; |
return; |
45 |
|
|
46 |
await command.run(client, message, options); |
await command.execute(client, message, options); |
47 |
} |
} |
48 |
else { |
else { |
49 |
await message.reply({ |
await message.reply({ |
58 |
return; |
return; |
59 |
} |
} |
60 |
|
|
61 |
const snippet = await client.snippetManager.get(message.guild!.id, cmdName); |
const snippet = await client.snippetManager.getParsed(message.guild!.id, cmdName); |
62 |
|
|
63 |
if (snippet) { |
if (snippet) { |
64 |
await message.channel.send({ |
await message.channel.send({ |
65 |
content: snippet.content, |
content: snippet.content.trim() === '' ? undefined : snippet.content, |
66 |
files: snippet.files.map(name => { |
files: snippet.files.map(name => { |
67 |
return { |
return { |
68 |
name, |
name, |
69 |
attachment: path.resolve(__dirname, '../../../storage', name) |
attachment: path.resolve(__dirname, '../../../storage', name) |
70 |
} as FileOptions |
} as FileOptions |
71 |
}), |
}), |
72 |
|
embeds: snippet.embeds |
73 |
}); |
}); |
74 |
|
|
75 |
return; |
return; |