tasklmka.blogg.se

Discord client
Discord client













discord client

  • Send a message directly to a friend or call them up with our voice chat feature.
  • Discord servers are organized into topic-based channels where you can collaborate, share, have meetings, or just talk to friends about your day without clogging up a group chat.
  • Whether you’re part of a school club, a gaming group, a worldwide art community, or just a handful of friends who want to spend time together, Discord makes it easy to talk every day, and hang out more often. Where you can stay close and have fun over text, voice, and video chat. We can type "meme" and the bot will fetch a meme from an API and send us a random meme!įor best practice, bot commands usually start with an exclamation mark so let's make it "!meme" instead to instruct the bot for a meme.įor the API, we can use this simple one by jaychandra6.Discord is where you can make a home for your communities and friends. Step 6: Writing your first bot commandĪ bot that just replies "Pong!" whenever you type ping is not very useful, isn't it? Let's take it up a notch by asking the bot for an image. Great, now if we run the command below, our bot should go online: node index.js Remember the token we copied in Step 1? Create an. Import the discord.js package and create a new client like so: require('dotenv').config() //initialize dotenvĬonst Discord = require('discord.js') //import discord.jsĬonst client = new Discord.Client() //create new clientĬonsole.log(`Logged in as $!`) Ĭlient.login(_TOKEN) //login bot using token

    discord client

    The first thing we need to do to code our discord bot is to create a discord bot client and log our bot in. If you see the bot installed in your server, it is currently offline. This will create an index.js file, where our bot functions will be written at.

    discord client

    In our project directory, run: touch index.js















    Discord client