2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-08-28 12:47:56 +00:00

129 Commits

Author SHA1 Message Date
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
e2f8432711 fixed sorting 2017-11-23 22:29:40 +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
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
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
f2dea53a3f fixup! show more information for /user 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
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
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
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
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
564545e818 Don't remove the command in /warn
It's already handled by deleteMessage middleware in commands/index.js.
Handling it again causes an unhandled rejection.
2017-11-01 15:24:57 +01:00
GingerPlusPlus
ff2e78c92b [eslint] function-paren-newline: error, multiline 2017-10-31 23:08:22 +01:00
GingerPlusPlus
337f6e2183 Added and used scheduleDeletion
...only where I was certain that whis was a good idea,
perhaps it could be useful in more places.
2017-10-31 22:36:18 +01:00
GingerPlusPlus
84e178f363 Always send warn message on /warn
even when the last warning gets the target banned.
Closes #38

Also, use numberOfWarnsToBan instead of 3.
2017-10-31 19:08:17 +01:00
GingerPlusPlus
04b5fac255 Made deleting commands more flexible and configurable 2017-10-29 17:46:52 +01:00
GingerPlusPlus
9e728e33c7 /unwarn unbans 2017-10-28 20:24:13 +02:00
GingerPlusPlus
f08de28edd [Refactor] split handlers into composers 2017-10-27 13:50:54 +02:00
GingerPlusPlus
b0075f2065 Used new quietLink instead of link in /staff
1. It doesn't mention admins
2. It's more reliable (inline mentiones sometimes don't work)
2017-10-22 17:33:21 +02:00
Pouria Ezzati
a160e992fa sort and show all custom command roles in lowercase 2017-10-11 22:51:44 +03:30
Pouria Ezzati
7904e1db6c removed console logs XD 2017-10-11 00:02:45 +03:30
Pouria Ezzati
d487a6fc75 ban/warn command on admins doesn't delete the message now 2017-10-10 22:20:50 +03:30
Pouria Ezzati
183b901f26 custom commands role is not case sensitive anymore 2017-10-10 21:54:59 +03:30
Pouria Ezzati
699df6e1c5 small fix for removecommand message 2017-10-10 21:42:39 +03:30
Pouria Ezzati
6713112903 improved custom commands info 2017-10-08 14:18:55 +03:30
Pouria Ezzati
c42db48de1 /leave now works with id and name too. closes #20 2017-10-08 13:19:11 +03:30
Pouria Ezzati
5314328ab6 replaced stars with zero-width spaces, resolves #22 2017-10-08 11:45:43 +03:30
Pouria Ezzati
78fbcdc981 custom commands name can't be one of preserved names. 2017-10-06 22:44:16 +03:30
GingerPlusPlus
0f0dee3a7d Removed utils/json, replaced loadJSON with require 2017-10-06 18:35:53 +02:00
Pouria Ezzati
36535d4a6b refactoring on line if statements returns 2017-10-06 16:40:49 +03:30
Pouria Ezzati
672fd562f3 refactoring, created messages folder and added context state 2017-10-06 16:34:23 +03:30
GingerPlusPlus
23ac796744 Don't ban / warn in PM, don't ban / warn itself 2017-10-04 20:36:34 +02:00
Pouria Ezzati
0bf92d9ff2 fixed unwarn count 2017-10-04 20:58:12 +03:30
Pouria Ezzati
88a08d0d88 added custom commands 2017-10-04 20:55:50 +03:30
Pouria Ezzati
1b12efce72 delete /groups and /link responses after 5 min 2017-10-02 14:16:54 +03:30
Pouria Ezzati
1f693bf3d0 added /link command 2017-10-02 14:16:54 +03:30
GingerPlusPlus
2e729d62b8 [Bugfix] adapt /report to changed schema 2017-09-29 15:53:21 +02:00