Fix link preview (#2681)
* Fix link preview * Fix typo * Fix preview options * Add example for preview
This commit is contained in:
parent
5001a89714
commit
ac0a50082f
2 changed files with 17 additions and 24 deletions
|
|
@ -66,6 +66,9 @@ client.on('message', async msg => {
|
|||
} else if (msg.body.startsWith('!echo ')) {
|
||||
// Replies with the same message
|
||||
msg.reply(msg.body.slice(6));
|
||||
} else if (msg.body.startsWith('!preview ')) {
|
||||
const text = msg.body.slice(9);
|
||||
msg.reply(text, null, { linkPreview: true });
|
||||
} else if (msg.body.startsWith('!desc ')) {
|
||||
// Change the group description
|
||||
let chat = await msg.getChat();
|
||||
|
|
|
|||
Loading…
Reference in a new issue