60 |
|
|
61 |
const snippet = await client.snippetManager.getParsed(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.trim() === '' ? undefined : 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 |
embeds: snippet.embeds |
}), |
73 |
}); |
embeds: snippet.embeds |
74 |
|
}); |
75 |
|
} |
76 |
|
catch (e) { |
77 |
|
console.log(e); |
78 |
|
} |
79 |
|
|
80 |
return; |
return; |
81 |
} |
} |