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 / 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": {
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 / code_colors_discordjs.md
Last active January 28, 2025 01:32
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
@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**".
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 / 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");
@thomasbnt
thomasbnt / mysql-cheatsheet.md
Last active September 16, 2022 08:40 — forked from angristan/mysql-cheatsheet.md
MySQL cheatsheet

Manage databases

Create database

CREATE DATABASE database;

Delete database

Keybase proof

I hereby claim:

  • I am thomasbnt on github.
  • I am thomasbnt (https://keybase.io/thomasbnt) on keybase.
  • I have a public key ASBhhiOkwmT-DRcdNjcIZTtMAugtymCe7a8r2RLz8rYlqgo

To claim this, I am signing this object:

Discord

Règles sur les serveurs Discord

Règles généraux

  • Pas de pseudos vides.
  • Aucun pseudos inapproprié.
  • Pas de pseudos sexuellement explicites.
  • Pas de pseudos offensants.
@thomasbnt
thomasbnt / mysql.md
Created March 2, 2021 11:19 — forked from nesmon/mysql.md
Help for use MySQL.js with Node.js and a helper

MySQL.js Usage with Node.js and a helper.

Requirements :

Before start you will need :

  • A Node.JS project with mysql module
  • A mysql account with mysql_native_password as authentication method :
    • If this is not the case do this : ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

      Where root is your username, and password your new password.