-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
final version
- Loading branch information
Showing
11 changed files
with
326 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,36 @@ | ||
# discord-website-bot | ||
Template for your Discord bot site | ||
Template for your website Discord bot. | ||
|
||
This template allows you to make a dynamic web page for your Discord bot! | ||
|
||
# How to configure the site? | ||
## Information between ` [] ` | ||
All you have to do is change the values to your own. | ||
``` | ||
Example: [BOT_NAME] to Wyno | ||
``` | ||
|
||
## Edit the ` config.php ` file | ||
Simply replace the information with yours in the **config.php** file. | ||
|
||
> `config.php` | ||
```php | ||
<?php | ||
// Configurations for your project | ||
|
||
// Database connection information | ||
define('DB_HOST', 'localhost'); // Database host (usually 'localhost') | ||
define('DB_USER', 'root'); // Database username | ||
define('DB_PASSWORD', 'password'); // Database password | ||
define('DB_NAME', 'bot_database'); // Database name | ||
|
||
// Discord bot token (replace with the real token) | ||
define('DISCORD_BOT_TOKEN', 'TOKEN_BOT'); | ||
|
||
// Discord API URL to get bot guilds | ||
define('DISCORD_API_URL', 'https://discord.com/api/v10/users/@me/guilds'); | ||
|
||
// Other global configurations | ||
define('SITE_NAME', 'BOT_NAME'); | ||
define('SITE_URL', 'WEBSITE_URL'); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
// Inclure la configuration | ||
require 'config.php'; | ||
|
||
// Lire et décoder le fichier JSON contenant les commandes | ||
$json_data = file_get_contents('src/commands.json'); | ||
$commands = json_decode($json_data, true); | ||
?> | ||
|
||
<!DOCTYPE html> | ||
<html lang="fr"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>[BOT_NAME] - Commands</title> | ||
|
||
<link rel="stylesheet" href="src/css/style.css"> | ||
|
||
<?php include('./src/inc/head.php'); ?> | ||
</head> | ||
<body> | ||
<nav> | ||
<div class="brand"><i class="fas fa-robot"></i> [BOT_NAME]</div> | ||
<div class="nav-links"> | ||
<a href="./"><i class="fas fa-home"></i> Home</a> | ||
<a href="commands.php"><i class="fas fa-list"></i> Commands</a> | ||
<a href="dashboard.php"><i class="fas fa-tachometer-alt"></i> Dashboard</a> | ||
</div> | ||
|
||
<div class="mobile-menu-icon" onclick="toggleMenu()"> | ||
<i class="fas fa-bars"></i> | ||
</div> | ||
</nav> | ||
|
||
<div class="mobile-menu" id="mobileMenu"> | ||
<a href="./"><i class="fas fa-home"></i> Home</a> | ||
<a href="commands.php"><i class="fas fa-list"></i> Commands</a> | ||
<a href="dashboard.php"><i class="fas fa-tachometer-alt"></i> Dashboard</a> | ||
</div> | ||
|
||
<!-- Contents of the Commands page --> | ||
<section class="commands-section"> | ||
<h1>[BOT_NAME] commands</h1> | ||
<p>Here is the list of main commands available on [BOT_NAME] :</p> | ||
|
||
<div class="commands-list"> | ||
<?php if (isset($commands['commands']) && !empty($commands['commands'])): ?> | ||
<?php foreach ($commands['commands'] as $command): ?> | ||
<div class="command"> | ||
<i class="<?php echo htmlspecialchars($command['icon']); ?>"></i> | ||
<div class="command-details"> | ||
<h3><?php echo htmlspecialchars($command['name']); ?></h3> | ||
<p><?php echo htmlspecialchars($command['description']); ?></p> | ||
</div> | ||
</div> | ||
<?php endforeach; ?> | ||
<?php else: ?> | ||
<p>No commands available.</p> | ||
<?php endif; ?> | ||
</div> | ||
</section> | ||
|
||
<?php include('src/inc/footer.php'); ?> | ||
|
||
<script src="src/js/script.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,18 @@ | ||
<?php | ||
// Configurations pour ton projet | ||
// Configurations for your project | ||
|
||
// Informations de connexion à la base de données | ||
define('DB_HOST', 'localhost'); // Hôte de la base de données (généralement 'localhost') | ||
define('DB_USER', 'root'); // Nom d'utilisateur de la base de données | ||
define('DB_PASSWORD', 'password'); // Mot de passe de la base de données | ||
define('DB_NAME', 'bot_database'); // Nom de la base de données | ||
// Database connection information | ||
define('DB_HOST', 'localhost'); // Database host (usually 'localhost') | ||
define('DB_USER', 'root'); // Database username | ||
define('DB_PASSWORD', 'password'); // Database password | ||
define('DB_NAME', 'bot_database'); // Database name | ||
|
||
// Token du bot Discord (remplacer par le vrai token) | ||
// Discord bot token (replace with the real token) | ||
define('DISCORD_BOT_TOKEN', 'TOKEN_BOT'); | ||
|
||
// URL de l'API Discord pour obtenir les guildes du bot | ||
// Discord API URL to get bot guilds | ||
define('DISCORD_API_URL', 'https://discord.com/api/v10/users/@me/guilds'); | ||
|
||
// Autres configurations globales | ||
// Other global configurations | ||
define('SITE_NAME', 'BOT_NAME'); | ||
define('SITE_URL', 'WEBSITE_URL'); | ||
|
||
// Paramètres divers | ||
define('DEFAULT_LANGUAGE', 'fr'); // Langue par défaut du site | ||
define('TIMEZONE', 'Europe/Paris'); // Fuseau horaire par défaut | ||
define('SITE_URL', 'WEBSITE_URL'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
// Inclure la configuration | ||
require 'config.php'; | ||
?> | ||
|
||
<!DOCTYPE html> | ||
<html lang="fr"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>[NAME_BOT] - Dashboard</title> | ||
|
||
<link rel="stylesheet" href="src/css/style.css"> | ||
|
||
<?php include('./src/inc/head.php'); ?> | ||
</head> | ||
<body> | ||
<nav> | ||
<div class="brand"><i class="fas fa-robot"></i> T'Bot</div> | ||
<div class="nav-links"> | ||
<a href="./"><i class="fas fa-home"></i> Home</a> | ||
<a href="commands.php"><i class="fas fa-list"></i> Commandes</a> | ||
<a href="dashboard.php"><i class="fas fa-tachometer-alt"></i> Dashboard</a> | ||
</div> | ||
<div class="mobile-menu-icon" onclick="toggleMenu()"> | ||
<i class="fas fa-bars"></i> | ||
</div> | ||
</nav> | ||
|
||
<div class="mobile-menu" id="mobileMenu"> | ||
<a href="./"><i class="fas fa-home"></i> Home</a> | ||
<a href="commandes.php"><i class="fas fa-list"></i> Commandes</a> | ||
<a href="dashboard.php"><i class="fas fa-tachometer-alt"></i> Dashboard</a> | ||
</div> | ||
|
||
<!-- Dashboard de systèmes --> | ||
<section class="dashboard-section"> | ||
<h1><i class="fas fa-cogs"></i> Hello <span style="color: lightblue;"><?php ?></span>!</h1> | ||
<p>And welcome.</p> | ||
</section> | ||
|
||
<?php include('src/inc/footer.php'); ?> | ||
|
||
<script src="src/js/script.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"commands": [ | ||
{ | ||
"name": "/commands", | ||
"description": "title of the command.", | ||
"icon": "fas fa-info-circle" | ||
}, | ||
{ | ||
"name": "/commands", | ||
"description": "title of the command.", | ||
"icon": "fas fa-info-circle" | ||
}, | ||
{ | ||
"name": "/commands", | ||
"description": "title of the command.", | ||
"icon": "fas fa-info-circle" | ||
}, | ||
{ | ||
"name": "/commands", | ||
"description": "title of the command.", | ||
"icon": "fas fa-info-circle" | ||
}, | ||
{ | ||
"name": "/commands", | ||
"description": "title of the command.", | ||
"icon": "fas fa-info-circle" | ||
}, | ||
{ | ||
"name": "/commands", | ||
"description": "title of the command.", | ||
"icon": "fas fa-info-circle" | ||
}, | ||
{ | ||
"name": "/commands", | ||
"description": "title of the command.", | ||
"icon": "fas fa-info-circle" | ||
}, | ||
{ | ||
"name": "/commands", | ||
"description": "title of the command.", | ||
"icon": "fas fa-info-circle" | ||
}, | ||
{ | ||
"name": "/commands", | ||
"description": "title of the command.", | ||
"icon": "fas fa-info-circle" | ||
}, | ||
{ | ||
"name": "/commands", | ||
"description": "title of the command.", | ||
"icon": "fas fa-info-circle" | ||
} | ||
] | ||
} |
Oops, something went wrong.