DiscordBoost

10,00 

Categories: , , Tags: , ,

Description

This plugin need an active bot with roles management to work.

 

Discord has recently created a new Nitro Boost subscription system.

This plugin allows your user to link their steam and discord and ask for a reward for a boost.

To create a discord bot, you have to go to www.discordapp.com/developers

Once you have created your bot, you have to invite him to your server you just have to get him a Token and put it in the config file.

How to install:

-The bot requires NodeJS to work => https://nodejs.org/en/download/
-You have to start a CMDDOS from the bot folder and tip the command:
-npm install discord.io
-npm install discord.js
-npm install body-parser
-npm install express
-npm install mysql
-Configure auth.json
You have to fill up “token” from the discord application website
You have to setup your MySQL database information (follow this guide if you don’t have mysql Mysql Guide)

Commands:

/auth (allow you to link your steam to your discord)

/boosted (reward yourself if you have boosted the discord server)

Bot PM command:

!auth Your_Code

Default config:

{
“Permission”: [],
“Settings”: {
“Bot Token”: “”,
“Chat Prefix”: “<color=#1874CD>(Auth)</color>”,
“Chat Icon (SteamID64)”: 0,
“IP Address”: “127.0.0.1”,
“Port”: 3306,
“UserName”: “root”,
“Password”: “”,
“Database Name”: “rustdb”
},
“Authentication Code”: {
“Code Lifetime (minutes)”: 60,
“Code Length”: 5,
“Lowercase”: false
}
}

Default Lang file:

{
“Code Generation”: “Here is your code: <color=#1874CD>{0}</color>\n\n<color=#EE3B3B>What’s next:</color>\n<color=#1874CD>1</color> – Join the Discord at \n<color=#1874CD>2</color> – PM your code to the bot called ‘XXX’\n\nHere is the discord invite link – <color=#1874CD></color>”,
“Code Expired”: “Your code has <color=#EE3B3B>Expired!</color>”,
“Authenticated”: “Thank you for authenticating your account!”,
“NotRegistered”: “You may register your discord account first !”,
“Already Authenticated”: “You have already <color=#1874CD>authenticated</color> your account, no need to do it again!”,
“Unable to find code”: “Sorry, we couldn’t find your code, please try to authenticate again, If you haven’t generated a code, please type /auth in-game”,
“BotKeyNotSet”: “The bot token has not been set, please ask an admin.”,
“PermissionSet”: “You have been granted with perm <color=#EE3B3B>{0}</color>.”,
“PermissionNotSet”: “The permissions list is empty, please ask an admin.”
}

SQL Infos:

CREATE TABLE leavedclient (
 discordid varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE stats_player_discord (
 id bigint(20) NOT NULL,
 steamid varchar(50) NOT NULL,
 discordid varchar(50) NOT NULL,
 confirmed tinyint(1) DEFAULT '0',
 code varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE leavedclient
 ADD PRIMARY KEY (discordid);
ALTER TABLE stats_player_discord
 ADD PRIMARY KEY (id),
 ADD UNIQUE KEY steamid (steamid),
 ADD UNIQUE KEY discordid (discordid);
ALTER TABLE stats_player_discord
 MODIFY id bigint(20) NOT NULL AUTO_INCREMENT;

 

More details here