-
Notifications
You must be signed in to change notification settings - Fork 9
Warn Module update + started documentation + added guild aware permission checking #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 16 commits
de8932b
118c1eb
8f64ef9
dfbb841
13e8fac
6ffd656
1ff4aa6
f4a129c
f1e61f1
c5defdb
7520a3a
86a487e
8ec4640
e1b118f
972a567
5b753e8
b99c5a1
c36d456
0d0b5e6
3c55592
774f4ad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| # Not a Bot | ||
|
|
||
| Source code of the bot of the french programming discord server NaN (Not a Name). https://discord.gg/zcWp9sC | ||
|
|
||
| [Documentation (WIP)](doc/index.md) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Not a Bot - Discord Bot | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This shouldn't be part of this PR |
||
|
|
||
| Not a Bot is a french moderation bot designed for the [Not a Name](https://discord.gg/zcWp9sC). | ||
|
|
||
| It is based on multiple configurable modules where each ones have their own task. | ||
|
|
||
| The bot is made in Lua, with a custom wrapper around the Discordia library. | ||
|
|
||
| ## Summary | ||
|
|
||
| ### Modules | ||
|
|
||
| - [Ban]() : Ban management module | ||
| - [Channel]() : Channel management module | ||
| - [Game]() : | ||
|
||
| - [Kick]() : Kick management | ||
| - [Mention]() : Mention reaction module | ||
| - [Message]() : Message handler module (includes custom commands) | ||
| - [Modmail]() : Modmail and tickets module | ||
| - [Modo]() : Alert and flags module | ||
| - [Mute]() : Mute management module | ||
| - [Pin]() : Message pinning module | ||
| - [Poll]() : Polling module | ||
| - [Purge]() : Purge management module | ||
| - [Quote]() : Message quoting module | ||
| - [Raid]() : Anti-raid module | ||
| - [RoleInfo]() : Infos about roles | ||
| - [Stats]() : Guild stat module | ||
| - [Twitch]() : Twitch notification module | ||
| - [Warn](modules/warn_module.md) : Warning module | ||
| - [Welcome]() : Welcome message module | ||
|
|
||
| ### API | ||
|
|
||
|
|
||
|
|
||
| ### External Resources | ||
|
|
||
| - [Discordia Library](https://github.com/SinisterRectus/Discordia) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # Warn Module | ||
|
|
||
| Back to the *[Summary](../index.md)*. | ||
|
|
||
| *[Sources of the module](../../module_warn.lua)* | ||
|
|
||
| The warn module is used to give members warnings about their behaviour in the guild. | ||
|
|
||
| After a given amount of warns, the member gets muted __if the mute module is enabled__ | ||
|
|
||
| ## Config | ||
|
|
||
|
|
||
| - Sanctions (Boolean) (default = true) | ||
| - Enables sanctions (mute and ban alert) when a member receives a warning. | ||
|
|
||
| - MinimalWarnRole (Role) (default = nothing) | ||
| - Minimal role to be able to warn members and see their histories | ||
| - Unlocks `warn` and `warnlist` | ||
|
|
||
| - MinimalUnwarnRole (Role) (default = nothing) | ||
| - Minimal role to be able to unwarn a member. | ||
| - Unlocks `popwarn` and `clearwarn` | ||
|
|
||
| - WarnAmountToMute (Integer) (default = 3) | ||
| - Number of warns needed to mute a member. | ||
|
|
||
| - WarnAmountToBan (Integer) (default = 9) | ||
| - Numbed of warns needed to send the ban alert to the moderators. | ||
|
|
||
| - DefaultMuteDuration (Duration) (default = 1 hour) | ||
| - Default mute duration when a member gets enough warnings. | ||
| - The duration increases as the warning amount increases: `duration = default_duration * (warnings / WarnAmountToMute)` | ||
|
|
||
| - BanInformationChannel (Channel) (default = nothing) | ||
| - Channel where all the ban notifications are sent when a player has enough warnings | ||
| - This setting is required to enable the module | ||
| - You still have to manually ban the member, the last choice remains to the moderation team. | ||
|
|
||
| - WarnLogChannel (Channel) (default = nothing) | ||
| - Channel where all the notifications about warns and unwarns are logged. | ||
|
|
||
| - SendPrivateMessage (Boolean) (default = true) | ||
| - Enable private messages to inform the member of his warning. | ||
|
|
||
| ## Commands | ||
|
|
||
| Assuming the bot prefix is `!` | ||
|
|
||
| - `!warn <target> [reason]` | ||
| - This command gives a warning to the target with the given reason. It also checks if the member should receive a mute or more (only if the option is enabled). | ||
| - If enabled, the member will receive a private message resuming the warning and where it comes from. | ||
| - Example : `!warn @SomePlayer You are a terrible liar` | ||
|
|
||
| - `!warnlist <target>` | ||
| - Shows all the warnings that the given user received. | ||
| - Example : `!warnlist @SomePlayer` | ||
|
|
||
| - `!clearwarns <target>` | ||
| - Clears all the history of the given member. | ||
| - Example : `!clearwarns @SomePlayer` | ||
|
|
||
| - `!popwarns <target>` | ||
| - Removes the last warn of the targeted member |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed GuildAwarePrivilegeCheck