BadgerStaffPanel
Setting up BadgerStaffPanel
Discord Application Configuration
<?php
$clientID = '{CLIENT-ID}';
$clientSecret = '{CLIENT-SECRET}';
$redirect_URI = '{REDIRECT-URI}';
$guildID = '{GUILD-ID}';
$discordRedirectAuth = '{DISCORD-REDIRECT-AUTH}';
$botToken = '{BOT-TOKEN}';Navigate to https://discordapp.com/developers/applications

Click on
New Applicationthen name the bot what you would like

Click
Copyunder theClient IDon the page. Then replace{CLIENT-ID}within theconfig.phpfileClick
Copyunder theClient Secreton the page. Then replace the{CLIENT-SECRET}within theconfig.phpfileClick on
OAuth2within the side navigation barAdd your website's URL as a redirect, for example we will use
http://localhostfor a locally hosted websiteYou will then want to generate a discord authorization link
To do this, navigate down to the
OAuth2 URL Generatorsection, then select ourhttp://localhostredirect URLNow we choose the options we need for the authorization URL, select
identify,email, andguilds

Now you will want to click the
Copybutton and copy the huge link that has been generatedNow we go back into our
config.phpfile again
$redirect_URI = '{REDIRECT-URI}';
$guildID = '{GUILD-ID}';
$discordRedirectAuth = '{DISCORD-REDIRECT-AUTH}';
$botToken = '{BOT-TOKEN}';You now want to submit
http://localhostwhere{REDIRECT-URI}is locatedYou then want to submit the huge link you copied in the previous step and replace
{DISCORD-REDIRECT-AUTH}with itYou now need to get the guild ID of your discord server
You will first turn on the developer mode in Discord to be able to do this (check below GIF)

Now you will need to copy your server's guild ID (check below GIF)

Now replace
{GUILD-ID}with the guild ID you just got through your discord applicationWe now need to create a discord bot, navigate to
Boton the side navigationCreate the discord bot, confirm creating it
Now, click
Copyand get the discord bot tokenReplace
{BOT-TOKEN}within theconfig.phpfile with the token you had just copiedInvite the discord bot to your server now by going to the
OAuth2on the side navigation

Click
Copyand then enter the URL in a browser, then invite this bot to your discord serverYou have now completed the discord application configuration section of BadgerStaffPanel
Server API Configuration
$serverIP = '{SERVER-IP}';
$port = 80; // Website port
$steamAPIkey = '{STEAM-API-KEY}';
$server_port = 30120;
$rconPassword = '{RCON-PASSWORD}';
$serverName = '{SERVER-NAME}';Replace
{SERVER-IP}with the server IP of your serverReplace
80with the port your website runs on (for most websites, the default port is port 80)Replace
{STEAM-API-KEY}with the steam API key you get from a key you get from https://steamcommunity.com/dev/apikeyReplace
30120with the port of your FiveM server (for most servers, the default port is 30120)Replace
{RCON-PASSWORD}with the RCON password within yourserver.cfgfileReplace
{SERVER-NAME}with your server's nameYou have now completed the server API configuration section of BadgerStaffPanel
SQL Configuration
// SQL INFO
$host = '';
$username = '';
$password = '';
$db = '';
$port = 3306;Website Permissions Configuration
$permissionsSetup = [
'{T-MOD-RANK}' => [// Start T-Mod
'Permission.Note',
'Permission.Warn',
'Permission.Kick',
'Permission.RemoveNote',
'Permission.RemoveWarn',
], // End T-Mod
'{MOD-RANK}' => [// Start Mod
'Permission.Note',
'Permission.Warn',
'Permission.Kick',
'Permission.Tempban',
'Permission.Ban',
'Permission.RemoveNote',
'Permission.RemoveWarn',
'Permission.RemoveKick',
'Permission.RemoveTempban',
], // End Mod
'{ADMIN-RANK}' => [ // Start Admin
'Permission.Note',
'Permission.Warn',
'Permission.Kick',
'Permission.Tempban',
'Permission.Ban',
'Permission.RemoveNote',
'Permission.RemoveWarn',
'Permission.RemoveKick',
'Permission.RemoveTempban',
'Permission.RemoveBan',
], // End Admin
'{MANAGEMENT-RANK}' => [ // Start Management
'Permission.Note',
'Permission.Warn',
'Permission.Kick',
'Permission.Tempban',
'Permission.Ban',
'Permission.RemoveNote',
'Permission.RemoveWarn',
'Permission.RemoveKick',
'Permission.RemoveTempban',
'Permission.RemoveBan',
], // End Management
];Replace
{T-MOD-RANK}with the role ID of the T-Mod rank in your discord serverReplace
{MOD-RANK}with the role ID of the Mod rank in your discord serverReplace
{ADMIN-RANK}with the role ID of the Admin rank in your discord serverReplace
{MANAGEMENT-RANK}with the role ID of the Management rank in your discord server
Last updated
Was this helpful?