Skip to content

HalloSouf/discordjs-mysql

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

DiscordJS and MySQL

In this repository I will show you a quick example of how to use MySQL in your DiscordJS bot. Before you take a look into this repository and don't know how MySQL works, please visit first my other repository where I show how MySQL and NodeJS works: NodeJS-MySQL

Before you asking around and ask yourself questions, pay attention to the following things:

  • You have basic understanding of Javascript
  • You know the DiscordJS library a little bit
  • You have some understanding of SQL queries w3schools
  • You know how a MySQL database works

Packages

For using MySQL in your NodeJS application, you will need the mysql-package and the discord.js-package. You can download these packages with:

npm install mysql

Documentation: https://www.npmjs.com/package/mysql

npm install discord.js

Documentation: https://discord.js.org

MySQL Database

Here is a look how I designed my settings-table in my Database: database design1 database design2

About

An example how to use MySQL in your Discord bot

Topics

Resources

Stars

Watchers

Forks