$clear
$clear
will delete the amount of given messages in a channel.
Usage
$clear[channelID;amount;returnCount?;deleteBots?;deletePinned?;wordsFilter?;...usersFilter?]
Parameters
Field | Type | Description | Required |
---|---|---|---|
channelID | number | In which channel the permissions shall be deleted. | true |
amount | number | Amount of messages to delete. | true |
returnCount? | boolean | Return the count of deleted messages. 1. false (default) 2. true | false |
deleteBots? | boolean | Include bot messages. 1. false (default) 2. true | false |
deletePinned? | boolean | Include pinned messages. 1. false (default) 2. true | false |
wordsFilter? | string | Words to include, split by : colons. | false |
…usersFilter? | string | Users to include. | false |
Example(s)
This will delete the most recent fifty messages which are pinned:
1client.command({2 name: "clear",3 code: `4 $clear[$channelID;50;false;false;true]5 `,6});
This will delete the most recent fifty messages which are sent by the command author:
1client.command({2 name: "clear",3 code: `4 $clear[$channelID;50;false;false;false;;$authorId]5 `,6});