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({ |
try { |
65 |
content: snippet.content, |
await message.channel.send({ |
66 |
files: snippet.files.map(name => { |
content: snippet.content.trim() === '' ? undefined : snippet.content, |
67 |
return { |
files: snippet.files.map(name => { |
68 |
name, |
return { |
69 |
attachment: path.resolve(__dirname, '../../../storage', name) |
name, |
70 |
} as FileOptions |
attachment: path.resolve(__dirname, '../../../storage', name) |
71 |
}), |
} as FileOptions |
72 |
}); |
}), |
73 |
|
embeds: snippet.embeds |
74 |
|
}); |
75 |
|
} |
76 |
|
catch (e) { |
77 |
|
console.log(e); |
78 |
|
} |
79 |
|
|
80 |
return; |
return; |
81 |
} |
} |