├── LICENSE ├── README.md ├── config.json ├── package.json └── server.js /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 BlackKnight683 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Discord Tutorial Bot 2 | This is a simple discord bot i use to showcase tutorials on various stuff on my Youtube channel :D 3 | 4 | Do not share with anyone your bot token from the discord dev portal. 5 | 6 | If you have an any problems, Please feel free to open up an issue or join the discord server: https://discord.gg/S2GGa23 7 | 8 | Sub to me in yt: https://youtube.com/c/BlackKnight683 9 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token" : "", //Bot Token from discord developer portal. (Don't share with anyone) 3 | "prefix" : "" //Choose a prefix for your bot like ! or ? 4 | } 5 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "//1": "describes your app and its dependencies", 3 | "//2": "https://docs.npmjs.com/files/package.json", 4 | "//3": "updating this file will download and update your packages", 5 | "name": "hello-sqlite", 6 | "version": "0.0.1", 7 | "description": "A simple Node app with SQLite as a database management system, instantly up and running.", 8 | "main": "server.js", 9 | "scripts": { 10 | "start": "node server.js" 11 | }, 12 | "dependencies": { 13 | "discord.js": "^12.3.1", 14 | "sqlite3": "^4.1.1" 15 | }, 16 | "engines": { 17 | "node": "12.x" 18 | }, 19 | "repository": { 20 | "url": "https://github.com/brianseminara/discord-bot-template" 21 | }, 22 | "license": "MIT", 23 | "keywords": [ 24 | "node", 25 | "glitch", 26 | "discord bot", 27 | "express" 28 | ] 29 | } 30 | 31 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | const bot = new Discord.Client(); 3 | 4 | const config = require("./config.json"); 5 | 6 | bot.once('ready', () => { 7 | bot.user.setActivity(`Custom Status Here`, { type: "WATCHING"}) 8 | console.log('Online'); 9 | }); 10 | 11 | bot.on('message', async (message) => { 12 | let prefix = config.prefix 13 | const [cmd, ...args] = message.content.split(/\s/) 14 | if (cmd === prefix + 'hello') { 15 | message.channel.send('Yes, Hi im on!!!'); 16 | } 17 | if(message.content.startsWith(prefix + 'test')){ 18 | const embed1 = new Discord.MessageEmbed() 19 | .setTitle('test embed') 20 | .setDescription('some important text') 21 | .addField('Github-repo', '**[Click here](https://github.com/BlackKnight683/Discord-Bot-Template)**') 22 | .setFooter('Made by oofy') 23 | .setColor('RED') 24 | 25 | await message.channel.send(embed1); //The embed1 or whatever variable you put in const embed1 must go in the (embed1) spot. 26 | } 27 | } 28 | ) 29 | 30 | bot.login(config.token); 31 | --------------------------------------------------------------------------------