Skip to content

Instantly share code, notes, and snippets.

View thomasbnt's full-sized avatar
👋
Probably listening music now

Thomas Bonnet thomasbnt

👋
Probably listening music now
View GitHub Profile
@thomasbnt
thomasbnt / app.js
Created March 6, 2018 14:54
Simple, complete example of a bot in Discord.js
// Load up the discord.js library
const Discord = require("discord.js");
// This is your client. Some people call it `bot`, some people call it `self`,
// some might call it `cootchie`. Either way, when you see `client.something`, or `bot.something`,
// this is what we're refering to. Your client.
const client = new Discord.Client();
// Here we load the config.json file that contains our token and our prefix values.
const config = require("./config.json");
cd /opt
sudo git clone https://github.com/letsencrypt/letsencrypt
cd /opt/letsencrypt
./letsencrypt-auto --apache -d example.com
./letsencrypt-auto --apache -d example.com -d www.example.com
@thomasbnt
thomasbnt / Basic Bot Discord JS
Created January 24, 2018 14:43
A simple Bot Discord usable to start developing his own
### Description
Basic Bot Discord in Javascript. Work with [discord.js](https://discord.js.org/#/) as well as [Node](https://nodejs.org/en/).
A simple Bot Discord usable to start developing his own.
#### Foundation and adding the Bot Discord
Create a new Bot Discord on Discordapp :
* Go to the page : [https://discordapp.com/developers/docs/intro](https://discordapp.com/developers/docs/intro)
* **Then MyApplications** > **New Application**.
* Complete the form . When done, click on "**Create Application**".
@thomasbnt
thomasbnt / code_colors_discordjs.md
Last active April 1, 2025 19:54
Code colors for embed discord.js

Here is an updated list of the colors that are currently implemented with a name. To using colors on discord.js, this is a typedef Colors, Colors.Aqua to get the Aqua color.

Name Int value Hex Code
Default 0 #000000
Aqua 1752220 #1ABC9C
DarkAqua 1146986 #11806A
Green 5763719 #57F287
DarkGreen 2067276 #1F8B4C
const { ShardingManager } = require('discord.js');
const shard = new ShardingManager('./discordemoji.js', {
token: 'nope',
autoSpawn: true
});
shard.spawn(); // Spawns recommended shards!
shard.on('launch', shard => console.log(`[SHARD] Shard ${shard.id}/${shard.totalShards}`));
@thomasbnt
thomasbnt / package.json
Created August 21, 2017 20:07
Le fichier package.json
{
"name": "BotDiscordJs",
"version": "1.0.0",
"description": "Un tout nouveau Bot Discord avec discord.js",
"main": "app.js",
"scripts": {
"start": "node app.js"
},
"author": "Thomas Bnt",
"dependencies": {