Skip to content

Garlic-Team/GPunishment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPunishment

GPunishment gives you a chance to punish with Slash commands. With GPunishment you can control members with mute, v-mute and ban commands. Everything is recorded under database using MySQL. It's easy to find out which member got suspended and when, how long the punishment will last, the reason for the punishment and more. I would like to thank Armagan#4869 for helping me with this project. So let's get started!

Don't forget to visit GCommands server for help and more!

Preparation of MySQL

MySQL is a very good database for such bots. If you didn't download it (MySQL Community Server) at first, you should download it from Google. I'll leave some links below.

TIP: Do not forget to choose the version and version that suits you! TIP 2: After installation, you can download MySQL Workbench for stronger control if you want.

You should create the queries given below in MySQL. (Database and tables.) If you do not have an average knowledge of MySQL, it is recommended that you do not modify the following tables.

CREATE  DATABASE GPunishment;

USE GPunishment;

CREATE  TABLE Penalties (
pid INT  PRIMARY  KEY AUTO_INCREMENT NOT  NULL,
member_id CHAR(18) NOT  NULL,
punishment_type ENUM ('TEMP-MUTE','TEMP-VMUTE','BAN') NOT  NULL,
punishment_reason VARCHAR(255) NOT  NULL,
end_of_punishment CHAR(13) NOT  NULL,
staff_id CHAR(18) NOT  NULL,
is_ended BOOLEAN  DEFAULT false,
extras VARCHAR(500) CHARACTER  SET utf8 NOT  NULL,
date_now DATETIME  DEFAULT (CURRENT_TIME) NOT  NULL
);

CREATE  TABLE TotalPenalties (
pid INT  UNIQUE AUTO_INCREMENT NOT  NULL,
member_id CHAR(18) PRIMARY  KEY  NOT  NULL,
temp_mute INT  DEFAULT  0,
temp_vmute INT  DEFAULT  0,
ban INT  DEFAULT  0,
total_points INT  DEFAULT  0
);

CREATE  TABLE PenaltiesList (
pid INT  UNIQUE AUTO_INCREMENT NOT  NULL,
member_id CHAR(18) PRIMARY  KEY  NOT  NULL,
punishment_type VARCHAR(255) NOT  NULL
);

After successfully installing the tables, we can proceed to the installation of the bot!

Creating Bot

We will also need the Discord Developer Portal, which we use to create each bot, here. You can open it from this link.

After installing the bot and inviting it to your own server, you need to activate the OAuth Scopes permissions below. Click on the two boxes indicated, then invite them back to your server from the link that appears below.

SCOPES

Editing the Settings File (defaults.json)

Editing the settings file is easy! An example file is given below.

{
"bot":  {
"name":  "BOT_NAME",
"token":  "BOT_TOKEN",
"prefix":  "BOT_PREFIX",
"authors":  ["BOT_AUTHORS"],
"testers":  ["BOT_TESTERS"],
"server":  "BOT_SERVER",
"status":  "BOT_STATUS"
 },

"colors":  [
"f6b10f",
"EC6969",
"27d976",
"c61069"
 ],

"mysqlDefs":  {
"host":  "MYSQL_HOST",
"user":  "MYSQL_USER",
"dbName":  "MYSQL_DBNAME",
"password":  "MYSQL_PASS"
 },

"other":  {
"penaltyLogChannel":  "SERVER_LOG_CHANNEL",
"muteRole":  "SERVER_MUTE_ROLE",
"muterRole":  "SERVER_MUTE_STAFF_ROLE",
"vmuterRole":  "SERVER_VMUTE_STAFF_ROLE",
"banerRole":  "SERVER_BAN_STAFF_ROLE",
"penaltierRole":  "SERVER_PENALTY_STAFF_ROLE"
 }
}

After performing these operations, our bot is ready to be launched! You can start the bot by installing the packages.

As the package manager, we recommend yarn. Enter yarn install command in command prompt. After all packages are installed, start the bot by typing nodemon main.

Why GPunishment?

Because GPunishment is innovative and stable! GPunishment is fair and free! It's simple to setup and uses MySQL!

Powerful Database

Who would find managing data so much fun? MySQL

Don't Confuse!

All commands in the bot are Slash commands. Therefore, the explanation and way of everything is predetermined. Slashs

Be informed about everything!

Every action taken is shown in the Log channel. Inform

Take the wind at your back!

Banned

You are in control of everything!

Remove the penalties if you want, or learn!Removing

Advanced registry features!

Did I mention that everything is recorded? Maybe you forgot, I thought I'd say it again!

REGISTERY REGISTERY

Don't forget to install for the features in these photos and more! It is possible to achieve wonders with GCommands!

LINKS

About

Punish your members with Slash commands.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published