2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-08-31 06:05:22 +00:00
Commit Graph

260 Commits

Author SHA1 Message Date
GingerPlusPlus
dd5b01f73e Changed default config file format from json to js
Put all the documentation as jsdoc in example.config.js.

Leaving `numberOfWarnsToBan` without extra documentation,
IMO it's obvious what it does and what's the expected type.

Leaving documenting `excludeLinks` up to @poeti8,
I don't know how it works.
2017-11-25 19:37:28 +01:00
GingerPlusPlus
6adac05442 Fixed some spelling issues in Readme 2017-11-25 18:35:46 +01:00
Pouria Ezzati
0683d5fc26 Merge pull request #40 from azeezy/patch-1
Fix replacing previously added command
2017-11-25 14:41:54 +03:30
Aziz Kasymov
7dbec5eab8 Fix replacing previously added command
Without this, adding new command causes replacing previously added command
2017-11-25 14:10:18 +05:00
GingerPlusPlus
6c7b2dcf06 Made time before deleting join and leave messages configurable 2017-11-24 15:20:08 +01:00
GingerPlusPlus
cb644f8bb4 Added millisecond dependency 2017-11-24 14:09:12 +01:00
GingerPlusPlus
5a4002e7d4 Don't assume config file extension
Even if we want to enforce one extension,
doing it in requires scattered across the whole project
doesn't sound like a good idea (don't repeat yourself).

This commit also enables .js configs,
so I added that to .gitignore.
I'll document it when we settle on default config format.

Why was .json everywhere in the first place?
I thought it was neccessary in some older versions of Node
to be able to require a .json file.
2017-11-24 12:31:47 +01:00
Pouria Ezzati
19f0a109f8 fixup previous commit: checking if usernames match 2017-11-24 00:12:35 +03:30
Pouria Ezzati
e2f8432711 fixed sorting 2017-11-23 22:29:40 +03:30
Pouria Ezzati
f230d0497a fixed checking if usernames match 2017-11-23 22:19:07 +03:30
Pouria Ezzati
dabe672fa8 sorting staffs and groups alphabetically 2017-11-23 18:39:08 +03:30
Pouria Ezzati
e9695208eb don't check for username if no user is found 2017-11-23 18:06:52 +03:30
Pouria Ezzati
a88984d6a1 fixed minor typos 2017-11-23 00:20:21 +03:30
Pouria Ezzati
b0dd4578ea ban and unban users with id before they join 2017-11-22 21:44:17 +03:30
Pouria Ezzati
15b92ad1b6 usernames mentions are now case insensitive 2017-11-20 16:03:47 +03:30
Pouria Ezzati
73833c9740 removed custom command's adding step and make it inline 2017-11-20 14:32:34 +03:30
Pouria Ezzati
ff5eca49e7 made custom commands case insensitive 2017-11-20 13:29:33 +03:30
GingerPlusPlus
631f5732a0 Notify unbanned person in /unwarn and /nowarns too 2017-11-19 13:08:11 +01:00
Pouria Ezzati
480632d53f checking edited texts for channels and groups links 2017-11-18 22:07:18 +03:30
Pouria Ezzati
39dad12ead added checking captions and linked texts for ads 2017-11-18 14:05:39 +03:30
Pouria Ezzati
25ff603556 merging excluded groups and channels 2017-11-18 14:05:39 +03:30
GingerPlusPlus
64e1942a25 0.5.2 v0.5.2 2017-11-17 20:53:40 +01:00
GingerPlusPlus
4bcfaa70f5 Updated dependencies 2017-11-17 20:53:27 +01:00
GingerPlusPlus
c8c95f65a8 Remove ban_reason in /unwarn
For consistency with unban.
2017-11-17 19:13:44 +01:00
GingerPlusPlus
e02f3ca9c3 /nowarns unbans 2017-11-17 18:53:51 +01:00
GingerPlusPlus
900611fb75 Display numberOfWarnsToBan instead of 3 in /unwarn 2017-11-17 18:02:03 +01:00
GingerPlusPlus
f1215a995f [Bugfix] /unwarn no longer kicks
Unbanning (`unbanChatMember`) group member kicks him.
Interesting, but quirky and undocumented!
2017-11-17 17:46:40 +01:00
Pouria Ezzati
0619923579 no link preview for custom commands 2017-11-16 16:12:40 +03:30
Thomas Rory Gummerson
4c6e30f03e Config cleanup of horrible comments in JSON 2017-11-14 00:01:08 +01:00
GingerPlusPlus
48c7733cf1 Report to local admins, instead of bot admins
1. This ensures that bot won't try mentioning admins which are not in
the group (which may fail),
2. This allows also local admins to sort out the situation.
2017-11-11 11:50:37 +01:00
Pouria Ezzati
921d1896c6 don't let synced admins promote members 2017-11-05 22:17:09 +03:30
Pouria Ezzati
f2dea53a3f fixup! show more information for /user 2017-11-05 22:17:09 +03:30
Pouria Ezzati
4bbbb1377c update username if is needed 2017-11-05 22:17:09 +03:30
Pouria Ezzati
e277ab7522 show more information for /user 2017-11-05 22:17:09 +03:30
GingerPlusPlus
a7fdaf752a 0.5.1 v0.5.1 2017-11-02 19:20:40 +01:00
GingerPlusPlus
d392a2ac96 [Bugfix] use warnInlineKeyboard name consistently
instead of using warnsInlineKeyboard in code,
and warnInlineKeybaord in config.

Because the keyboard is attached after receiving every single warn.
2017-11-02 19:17:45 +01:00
GingerPlusPlus
ea1c8c4aa6 0.5.0 v0.5.0 2017-11-02 17:38:02 +01:00
GingerPlusPlus
d9ce330e05 Merge branch 'develop' 2017-11-02 17:36:48 +01:00
GingerPlusPlus
702dd5784c Fixed a typo 2017-11-02 17:34:26 +01:00
GingerPlusPlus
8e768095cf Improvements to commands/commands.js 2017-11-02 16:55:36 +01:00
GingerPlusPlus
70b8f7bb0e Minor improvements to /user 2017-11-02 16:54:17 +01:00
Pouria Ezzati
417bbb1dc9 members can use /user to get their status 2017-11-02 15:30:54 +03:30
GingerPlusPlus
2870b7fa56 [Bugfix] don't return Promise from scheduleDeletion
Because when Promise is returned from Telegraf handler,
bot doesn't fetch updates until it settles.

And we do `return reply(...).then(scheduleDeletion)`...
2017-11-02 12:04:42 +01:00
Pouria Ezzati
b6e57b4e29 Update README.md 2017-11-02 09:58:25 +03:30
Pouria Ezzati
70317189bd fixed warn capacity number 2017-11-02 08:58:21 +03:30
Pouria Ezzati
f6dfa08d4b send a message when /ban and /warn is used in private chat 2017-11-02 00:19:21 +03:30
Pouria Ezzati
8029e27fac catching error with logError 2017-11-02 00:19:21 +03:30
Pouria Ezzati
e2e31f04d9 added /user command and removed /getwarns 2017-11-02 00:19:21 +03:30
GingerPlusPlus
eb76e2a651 Added configurable inline keyboard in warn messages 2017-11-01 21:34:38 +01:00
GingerPlusPlus
fc152708ac Ignore past messages when in development 2017-11-01 21:03:48 +01:00