diff --git a/CONFIG.md b/CONFIG.md new file mode 100644 index 0000000..7165def --- /dev/null +++ b/CONFIG.md @@ -0,0 +1,74 @@ +# config.json format + +This document describes the field in config.json. + +Create config.json by running: + +`cp example.config.json config.json` + +in the project folder, then edit it. + +## "master" + +`number|string` + +Master admin ID as a number or username as a string. + +## "token" + +`string` + +Telegram Bot token obtained from [https://t.me/BotFather](@BotFather). + +## "plugins" + +`[string]` + +List of plugin names to be loaded. + +## "deleteCommands" + +`string` + +Which messages with commands should be deleted? + +Options: + +* "all" +* "own" (default) - leave commands meant for other bots +* "none" + +## "numberOfWarnsToBan" + +`number` + +Number of warns that will get someone banned. + +## "groupsInlineKeyboard" + +`[[inlineButton]]` + +inline keyboard to be added to reply to /groups. + +## "warnInlineKeyboard" + +`[[inlineButton]]` + +Inline keyboard to be added to warn message. + +## "excludedChannels" + +`[string]` + +List of channels that you want to be excluded from automatic warns. + +Use `"*"` to disable. + +## "excludedGroups" + +`[string]` + +List of groups that you want to be excluded from automatic warns. + +Use `"*"` to disable. + diff --git a/config.example.json b/config.example.json deleted file mode 100644 index c4b5e99..0000000 --- a/config.example.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "master": 123456789, // master admin ID as a number or username as astring. - "token": "", // bot token. - "plugins": [], // list of plugin names to be loaded - - "deleteCommands": "own", // which messages with commands should be deleted? - // valid options: "all", "own" (leave commands meant for other bots, this is the default), "none". - - "numberOfWarnsToBan": 3, // Number of warns that will get someone banned. - "groupsInlineKeyboard": [], // [[inlineButton]] -> inline keyboard to be added to reply to /groups - "warnInlineKeyboard": [], // [[inlineButton]] -> inline keyboard to be added to warn message - - // [String] -> list of channels or groups links/usernames that you want to be excluded from warnings - // use "*" to disable this feature. - "excludedChannels": [], - "excludedGroups": [] -} diff --git a/example.config.json b/example.config.json new file mode 100644 index 0000000..a3e048f --- /dev/null +++ b/example.config.json @@ -0,0 +1,11 @@ +{ + "master": 123456789, + "token": "", + "plugins": [], + "deleteCommands": "own", + "numberOfWarnsToBan": 3, + "groupsInlineKeyboard": [], + "warnInlineKeyboard": [], + "excludedChannels": [], + "excludedGroups": [] +}