From 46015211a38f8e3a6a7babbf21c946cf998eae9d Mon Sep 17 00:00:00 2001 From: Mina Zaky <63650831+Minazak1@users.noreply.github.com> Date: Tue, 16 Feb 2021 22:21:13 -0500 Subject: [PATCH 01/15] Update README.md --- README.md | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/README.md b/README.md index dff8d83..ebd4033 100644 --- a/README.md +++ b/README.md @@ -1,21 +1 @@ -# CodingThrone Courses - -## Attention Devs -@FOUNDERS feel free to go about the main branch as you wish. -For now, meaing until further directions are explicitely given, -create a new branch named after your github username and create a folder for each course named accordingly. - -Incase of confusion, copy structure of branch **rbrtbrnschn** - -## Finished & published courses: - -| Author | Name | State (%) | Github | Blog | -|- |- |- |- |- | -| rbrtbrnschn | web-deploy-201 | 100 | [URL](https://github.com/codingthrone/courses/tree/rbrtbrnschn/web-deploy-201/src) | [URL](http://64.225.103.55/deployment/web-deployment-201/) | -| Minazak1 | How to make a discord bot | 0 | | | -| | | | | | -| | | | | | -| | | | | | -| | | | | | -| | | | | | -| | | | | | +# Discord.js Basics From bcb1b3adc949437060e385cf8e82dc8f21118116 Mon Sep 17 00:00:00 2001 From: Mina Zaky <63650831+Minazak1@users.noreply.github.com> Date: Tue, 16 Feb 2021 22:22:59 -0500 Subject: [PATCH 02/15] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ebd4033..a898637 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ # Discord.js Basics + +== Test From 686fb5dec00ddb24a24030db509798ed56dd5736 Mon Sep 17 00:00:00 2001 From: Mina Zaky <63650831+Minazak1@users.noreply.github.com> Date: Tue, 16 Feb 2021 22:23:17 -0500 Subject: [PATCH 03/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a898637..d340570 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # Discord.js Basics -== Test +== test == From bd7985befb4cb8aaf56e39c266ca826774906b3b Mon Sep 17 00:00:00 2001 From: Mina Zaky <63650831+Minazak1@users.noreply.github.com> Date: Tue, 16 Feb 2021 22:23:25 -0500 Subject: [PATCH 04/15] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index d340570..bbba1c5 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,2 @@ # Discord.js Basics -== test == From 2cc23c613644dc0d45839e378fd0a8a085e05328 Mon Sep 17 00:00:00 2001 From: Mina Zaky <63650831+Minazak1@users.noreply.github.com> Date: Tue, 16 Feb 2021 22:25:57 -0500 Subject: [PATCH 05/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bbba1c5..1c20ea5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # Discord.js Basics - +:A quick and easy guide to setting up and making a discord bot: From 25108bdfee070a61583cc96446f29ab07523de44 Mon Sep 17 00:00:00 2001 From: Mina Zaky <63650831+Minazak1@users.noreply.github.com> Date: Tue, 16 Feb 2021 22:27:57 -0500 Subject: [PATCH 06/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1c20ea5..010c8c8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # Discord.js Basics -:A quick and easy guide to setting up and making a discord bot: +> - A quick easy and guide to making a simple bot that goes over most features of Discord.js From abff13127c24a1f10ba33de39a61a44b216938bc Mon Sep 17 00:00:00 2001 From: Mina Zaky <63650831+Minazak1@users.noreply.github.com> Date: Tue, 16 Feb 2021 22:28:09 -0500 Subject: [PATCH 07/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 010c8c8..f985142 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # Discord.js Basics -> - A quick easy and guide to making a simple bot that goes over most features of Discord.js +> A quick easy and guide to making a simple bot that goes over most features of Discord.js From 3a2e8f262ebad608aa4bacad020d5bb844095e8c Mon Sep 17 00:00:00 2001 From: Mina Zaky <63650831+Minazak1@users.noreply.github.com> Date: Tue, 16 Feb 2021 22:31:08 -0500 Subject: [PATCH 08/15] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index f985142..df0ab3e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # Discord.js Basics > A quick easy and guide to making a simple bot that goes over most features of Discord.js + +## Set Up +Firstly you will wand to head over to [node.js](https://nodejs.org/en/) and download the shown **LTS** From 777b6b622cb8620da6bac6c2da07bc606525542e Mon Sep 17 00:00:00 2001 From: Mina Zaky <63650831+Minazak1@users.noreply.github.com> Date: Tue, 16 Feb 2021 22:52:29 -0500 Subject: [PATCH 09/15] Update README.md --- README.md | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index df0ab3e..71a814f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,30 @@ # Discord.js Basics > A quick easy and guide to making a simple bot that goes over most features of Discord.js -## Set Up -Firstly you will wand to head over to [node.js](https://nodejs.org/en/) and download the shown **LTS** +## Node.js Set Up +Firstly you will want to head over to [node.js](https://nodejs.org/en/) and download the shown **LTS** by following the installation steps. +After doing so you will need to head over to your node.js console which can be found by searching for it on your devices search bar. +After locating the node.js console you will need to create a new folder for your botin your desired location. then you will need to locate your folder in you node.js console and run the following commands. +- Follow this if your folder is in documents +``` +cd documents +// Then +cd (folder name) +``` +> - if you weren't already in your users folder whne the console opened then follow the steps bellow +``` +cd Users + +cd (user name) + +cd documents + +cd (folder name) +``` +**REMINDER** *make sure your in the Node.js Command Prompt* + +You will then need to run the following command once your in the folder. +```npm init``` +Wait for everything to compile and you will be promted with some questions such has name, verison of the project. You can skip all of them unless you want to change some things. **Keep the entry point** ```index.js```. + +- We have now done the Node.js Set up From 58f463a1cfc5f77d13fbd4982433bf9a8cc1b856 Mon Sep 17 00:00:00 2001 From: Mina Zaky <63650831+Minazak1@users.noreply.github.com> Date: Wed, 17 Feb 2021 14:56:14 -0500 Subject: [PATCH 10/15] Update README.md --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index 71a814f..01005c4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Discord.js Basics > A quick easy and guide to making a simple bot that goes over most features of Discord.js +# Set Up + ## Node.js Set Up Firstly you will want to head over to [node.js](https://nodejs.org/en/) and download the shown **LTS** by following the installation steps. After doing so you will need to head over to your node.js console which can be found by searching for it on your devices search bar. @@ -28,3 +30,26 @@ You will then need to run the following command once your in the folder. Wait for everything to compile and you will be promted with some questions such has name, verison of the project. You can skip all of them unless you want to change some things. **Keep the entry point** ```index.js```. - We have now done the Node.js Set up + +## Discord.js Installation / Bot set-up +Now that we have Node.js installed we will now need to install [Discord.js](https://discord.js.org/#/), you can do this by running +``` +npm install discord.js +``` +in your Node.js command prompt or you can run this command in your **Vs Code** terminal while having your bot folder open. + +You will now need to go register your bot on the [Discord Developer Bot Dashboard](https://discord.com/developers/applications). Log in and follow the steps below. +> - Click on **New Application** on the top right of applications page and give your bot a name. +> - Now after making the bot you will need to select it if not done already +> - Click on the ***Bot*** Tab on the left side of the screen +> - Click **Add Bot** +> You have now made your bot +**Disclaimer**: ***Dont share your BOT TOKEN this will be used to log into your bot*** +To invite your bot to your server you will need to go back to your **General Information Tab** and copy your ***Client ID***. +Then head over to [Permissions Calculator](https://discordapi.com/permissions.html) and select the permissons you want your bot to have. +Paste your client id on the bottom of the page and click on the link to invite your bot. + +**YOUR ALL SET** + +## Getting started +Now that we are all set lets set up a basic command. From 289629365db4b907dd4b7361a7634a3d159cf7bd Mon Sep 17 00:00:00 2001 From: Mina Zaky Date: Wed, 17 Feb 2021 14:56:41 -0500 Subject: [PATCH 11/15] assets --- .gitignore | 1 + assets/index.js | 0 package-lock.json | 107 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 22 ++++++++++ 4 files changed, 130 insertions(+) create mode 100644 .gitignore create mode 100644 assets/index.js create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..40b878d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules/ \ No newline at end of file diff --git a/assets/index.js b/assets/index.js new file mode 100644 index 0000000..e69de29 diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..6afddfa --- /dev/null +++ b/package-lock.json @@ -0,0 +1,107 @@ +{ + "name": "coursebot", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@discordjs/collection": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.1.6.tgz", + "integrity": "sha512-utRNxnd9kSS2qhyivo9lMlt5qgAUasH2gb7BEOn6p0efFh24gjGomHzWKMAPn2hEReOPQZCJaRKoURwRotKucQ==" + }, + "@discordjs/form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "requires": { + "event-target-shim": "^5.0.0" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "discord.js": { + "version": "12.5.1", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-12.5.1.tgz", + "integrity": "sha512-VwZkVaUAIOB9mKdca0I5MefPMTQJTNg0qdgi1huF3iwsFwJ0L5s/Y69AQe+iPmjuV6j9rtKoG0Ta0n9vgEIL6w==", + "requires": { + "@discordjs/collection": "^0.1.6", + "@discordjs/form-data": "^3.0.1", + "abort-controller": "^3.0.0", + "node-fetch": "^2.6.1", + "prism-media": "^1.2.2", + "setimmediate": "^1.0.5", + "tweetnacl": "^1.0.3", + "ws": "^7.3.1" + } + }, + "event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" + }, + "mime-db": { + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", + "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==" + }, + "mime-types": { + "version": "2.1.28", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", + "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", + "requires": { + "mime-db": "1.45.0" + } + }, + "node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + }, + "prism-media": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.2.7.tgz", + "integrity": "sha512-thS1z3L6BDmf724sqLC73bHGjSYArFTYHa7cqInyS3EdDNTHKgDCXy7l+IhRvlnX7aFNiUb8jJcC+R8ezxwgMA==" + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" + }, + "ws": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.3.tgz", + "integrity": "sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..5a47a1c --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "coursebot", + "version": "1.0.0", + "description": "A Discord.js Course Bot", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/codingthrone/courses.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/codingthrone/courses/issues" + }, + "homepage": "https://github.com/codingthrone/courses#readme", + "dependencies": { + "discord.js": "^12.5.1" + } +} From 785ed6d7d13e01c4bec3e3716404cf9af32dcacf Mon Sep 17 00:00:00 2001 From: Mina Zaky <63650831+Minazak1@users.noreply.github.com> Date: Wed, 17 Feb 2021 15:05:21 -0500 Subject: [PATCH 12/15] Update README.md --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 01005c4..51bb2fb 100644 --- a/README.md +++ b/README.md @@ -53,3 +53,19 @@ Paste your client id on the bottom of the page and click on the link to invite y ## Getting started Now that we are all set lets set up a basic command. + +> Lets first start by setting up some ```const``` variables that we will be needing. +``` +const Discord = require('discord.js'); +//makes sure we are using discord.js + +const client = new Discord.Client(); +//makes a new discord client + +const prefix = '`'; +//the prefix for your bot that will be used before each command + +const fs = require('fs'); +//command handler +``` +After doing so go ahead and make a ```commands``` folder in your bot folder. From 568577b7e3449c772b668b0002158a68a9e6f371 Mon Sep 17 00:00:00 2001 From: Mina Zaky Date: Wed, 17 Feb 2021 15:06:16 -0500 Subject: [PATCH 13/15] const set up --- assets/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/assets/index.js b/assets/index.js index e69de29..3735c87 100644 --- a/assets/index.js +++ b/assets/index.js @@ -0,0 +1,7 @@ +const Discord = require('discord.js'); + +const client = new Discord.Client(); + +const prefix = '`'; + +const fs = require('fs'); \ No newline at end of file From b314991f3e23ee322714d117dc3b990ea3f47864 Mon Sep 17 00:00:00 2001 From: Mina Zaky <63650831+Minazak1@users.noreply.github.com> Date: Wed, 17 Feb 2021 15:25:36 -0500 Subject: [PATCH 14/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 51bb2fb..33fc794 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Discord.js Basics > A quick easy and guide to making a simple bot that goes over most features of Discord.js -# Set Up +# 🔨Set Up ## Node.js Set Up Firstly you will want to head over to [node.js](https://nodejs.org/en/) and download the shown **LTS** by following the installation steps. From 37388457b1ea28bc9c7fd4a2fbd1ca0f3ce88464 Mon Sep 17 00:00:00 2001 From: Mina Zaky <63650831+Minazak1@users.noreply.github.com> Date: Wed, 3 Mar 2021 09:35:00 -0500 Subject: [PATCH 15/15] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 33fc794..8d79221 100644 --- a/README.md +++ b/README.md @@ -69,3 +69,4 @@ const fs = require('fs'); //command handler ``` After doing so go ahead and make a ```commands``` folder in your bot folder. +This is where all the command files will be stored.