Creating a Discord Bot is a piece of cake 🙂
Developing a discord bot is a very easy task. Developing a bot for discord is aloso a fun task, i am saying this from my opinion, idk about yours but i am sure you will also feel same in future if you learn discord.js. Today i am going to Teach you about how to create a simple ping bot in glitch by js(Java Script).
Lets Begin With Creating Bot.
• First you need to go in Discord Developer Portal.

• You will see this tab after you click Button

• Now go to slide bar and click on Bot option

• Click on Add Bot Button.

• Now Go to side bar again and click on Auth.
• After than you will see check option. Check on Bot then scroll down

•After scrolling down you will see link. Copy it and open new tap paste it and invite your bot in your server.

Lets Start Developing Bot.
• First you need to open glitch in your browser. Go to Glitch.com
• Now click on new Project
• After that you will see three option in tab, Choose Hello express.
• Now you will see these files, if you did things right.

• Go to server.js and paste this code.
const discord = require('discord.js'); const client = new discord.Client(); client.on('ready', message => { console.log('I am ready'); }); client.on('message',message => { if(message.content === '+ping') { message.channel.send('Hi, You pinged me?') } else if(message.isMemberMentioned(client.user)) { message.channel.send('How can i help you, btw my prefix is +') } }); client.login('TOKEN');
• Go to Developer portal again, and go to bot tab by scroll bar and copy token.
• Now come back in glitch and replace Your Token with TOKEN

• Time to install discord.js package
• Go to Tools Option which is located down
• Click on Logs after clicking on Tools

• Click on logs

• After clicking on console type npm install discord.js

• After this, Your bot is ready to go. Go to server where your bot is in and type the command which is +ping.
Video Support
SUPPORT
IF YOU HAD ANY PROBLEM RELATED TO GLITCH JOIN OUR SERVER FOR ANY SUPPORT – SUPPORT SERVER