Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 13
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?
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
de8932b118c1eb8f64ef9dfbb84113e8fac6ffd6561ff4aa6f4a129cf1e61f1c5defdb7520a3a86a487e8ec4640e1b118f972a5675b753e8b99c5a1c36d4560d0b5e63c55592774f4adFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
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]() : Global mudule handling bot status | ||
| - [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 |
Uh oh!
There was an error while loading. Please reload this page.
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