WarnSys | Give user a warning without you to remember how many they have


forthebadge forthebadge forthebadge

The WarnSys, or long Warning System, is a simple script which allows you to give a user a warning for misbehavior and you don’t need to remember how many warnings he have.

The script timeout the User two times, first for 5 seconds and the second time for 600 seconds by default, and at least the third it will ban the User.


To install this script you simply need to download the latest release (click on the “release” image)

GitHub release

Folder View

and drop it in your PhantomBot folder /path/to/phatombot. Now restart the Bot and when you see this at the end of the startup the script is active:
Warn System Enabled


Its really simple!
First of all i need define two things:

  [] => Optional for command use
  () => Required for command use

The warn command

!warn (User) [Reason]

With this command you increase the warn level of the given user add ban/timout the user with the given reason.

Delete one warning

!delwarn (User)

With this command you decrease the warn level of the given user.

Clear the warnings

!delwarn (User) all

As it say it clear the warnings of the given User

Support, Bug etc.

GitHub issues

If you found something broken or a little or huge bug tell me here right away or open an Issue on GitHub.

GitHub license

WarnSys | Add warn reason to public message

Fixed the wrong Release Link :sweat_smile: sorry for that.

1 Like

Ok found an Bug my self :sweat_smile:
And i need a little help to solve it.
How can i check if the first char is an @ and if it is so how can i remove the first char from a string ?
Currently i use this helper function and it don’t work :confused:

  * @function userStrings
  * @param {string} user
  * @return {array}
function userStrings(user) {
    var user_mention = "";
    var user_string = "";
    if (user.charAt(0) == "@"){
        user_mention = user;
        user_string = user.substr(1);
    } else {
        user_mention = "@" + user;
        user_string = user;
    return [user_mention, user_string];

Thanks for the help :innocent:

Edit: Made an workaround with substring().


v1.0.1 (HotFix) is out.

I fixed two bugs in this version.
The first bug was that i missed to remove a hard coded output.
The second one were that str.charAt() not worked properly so i reworked it with str.substring()

Thanks to @MatBuc who found the first bug.

Download Link in the start post.


Really like this module/script hope it will be picked up as an default because this is great for small streamers


Depending when the new Panel get released I will may create a interface part and if I figure out how, I will replace the fixed warn steps with a self configure one.

And then maybe I will do an PR to the Bot itself


Yeah simple description:
You need to add an argument to the command.

Long thing I can May do the next day.

But you want to define the reason with the command right ?

1 Like

Yes thats correct

Bot: 1st warn: NAME this is your first warning! | Reason: customreason

Sorry for this 10d late response.


Ok this week I don’t have time.
Maybe I have a look on that next week.


Appreciate it!
Thank you very much in advance for your time.


Hi, i just installed your script and changed it to fit my needs, just one question, do i need to restrict the commands to be used only by mods or is that hardcoded already?

just found it myself, dont mind me :smiley:

1 Like

Oh Yeah is hard coded i should das the command with settings to the command permissions if I not already have :sweat_smile: