All Projects → CodingTrain → Discord-Bot-Choo-Choo

CodingTrain / Discord-Bot-Choo-Choo

Licence: MIT License
Coding Train Example Discord Bot

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Discord-Bot-Choo-Choo

Welcome-Bot
A cool multi-purpose discord bot that solves all your problems. I have features such as Moderation, ModLog, Welcome & Goodbye logs, Fun, Music
Stars: ✭ 73 (+108.57%)
Mutual labels:  discordjs, discord-bot, discord-js, discordbot
Discord-Tools
VSCode extension allowing the integration of a Discord chat, bot templates, snippets, themes and more!
Stars: ✭ 91 (+160%)
Mutual labels:  discordjs, discord-bot, discord-js, discordbot
discord-voice
⏲️ A complete framework to facilitate the tracking of user voice time using discord.js
Stars: ✭ 33 (-5.71%)
Mutual labels:  discordjs, discord-bot, discord-js, discordbot
cytrus-re
A multipurpose Discord bot!
Stars: ✭ 16 (-54.29%)
Mutual labels:  discord, discordjs, discord-bot, discord-js
suggestions-bot
A Discord bot designed to build better communities by encouraging a positive and constructive relationship between community and staff.
Stars: ✭ 22 (-37.14%)
Mutual labels:  discordjs, discord-bot, discord-js, discordbot
partner-bot
Automates partnerships in the big community of discord.
Stars: ✭ 119 (+240%)
Mutual labels:  discordjs, discord-bot, discord-js, discordbot
sharedsharder
Shard your discord.js bot across devices!
Stars: ✭ 18 (-48.57%)
Mutual labels:  discordjs, discord-bot, discord-js, discordbot
LenoxBot
🖥️ LenoxBot is a Discord bot that offers many cool new features to your Discord server!
Stars: ✭ 218 (+522.86%)
Mutual labels:  discordjs, discord-bot, discord-js, discordbot
SparkV
🤖⚡ | The most POWERFUL multipurpose chat/meme bot that will boost the activity in your server.
Stars: ✭ 24 (-31.43%)
Mutual labels:  discordjs, discord-bot, discord-js, discordbot
Discord-BOT-Dashboard
This version is outdated, please check out Discord BOT Dashboard v2
Stars: ✭ 32 (-8.57%)
Mutual labels:  discordjs, discord-bot, discord-js, discordbot
Discord-Reposter
Bot for reposting Discord messages (work in progress)
Stars: ✭ 62 (+77.14%)
Mutual labels:  discordjs, discord-bot, discord-js, discordbot
mass-dm-discord
A MassDM selfbot which is working in 2021. Only for educational purposes 🥱🚀
Stars: ✭ 87 (+148.57%)
Mutual labels:  discordjs, discord-bot, discord-js, discordbot
Discord-Bot-TypeScript-Template
Discord bot - A discord.js bot template written with TypeScript.
Stars: ✭ 86 (+145.71%)
Mutual labels:  discordjs, discord-bot, discord-js, discordbot
Kato-Bot
discord bot
Stars: ✭ 51 (+45.71%)
Mutual labels:  discordjs, discord-bot, discord-js
ALi
ALi a powerful Discord bot that includes Utility, Fun, Music, Moderation, and much more! (Beta)
Stars: ✭ 97 (+177.14%)
Mutual labels:  discordjs, discord-bot, discord-js
NSFW-Bot
NSFW Bot is an open-source discord bot that has nsfw commands with the nekobot.xyz api.
Stars: ✭ 43 (+22.86%)
Mutual labels:  discord-bot, discord-js, discordbot
TundraBot
All-in-one Discord bot
Stars: ✭ 49 (+40%)
Mutual labels:  discordjs, discord-bot, discord-js
Komugari
A simple, multi-functional Discord bot written in Discord.js
Stars: ✭ 39 (+11.43%)
Mutual labels:  discord-bot, discord-js, discordbot
Green-bot
🎧 Green-bot is a powerfull discord music bot used by 10M users and more than 50,000 servers
Stars: ✭ 103 (+194.29%)
Mutual labels:  discord, discordjs, discord-bot
AntiScam-Bot
Discord bot written on discord.js, deletes messages with scam links.
Stars: ✭ 16 (-54.29%)
Mutual labels:  discordjs, discord-bot, discord-js

Choo Choo Discord Bot!

Discord Bot Tutorial

🚂🌈💖🤖 All aboard! Coding Train Tutorial Videos 🚂🌈💖🤖

Steps to create new bot

  1. Create node project and install discord.js module.
$ npm init
$ npm install discord.js
  1. Create an application - optionally set name, description, avatar.

  2. Select Bot from left navigation and "Add Bot" - set name and icon.

  3. Add bot to the A2Z server with the url: https://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&scope=bot

  4. Write the code!

Login to bot account:

const Discord = require('discord.js');
const client = new Discord.Client();
client.login('YOUR BOT TOKEN');

Callback for when the bot is connected and ready:

client.once('ready', () => {
  console.log('Ready!');
});

Callback for when a message is posted:

client.on('message', gotMessage);

function gotMessage(msg) {
  console.log(msg.content);
}
  1. Run the bot!
$ node index.js

Limit to one server and one channel

  1. Enable developer mode in Discord (Settings->Appearance->Enable Developer Mode).
  2. Copy server ID.
  3. Copy channel ID.
const serverID = 'SERVER ID';
const channelID = 'CHANNEL ID';

client.on('message', gotMessage);

function gotMessage(msg) {
  // Only for this server and this channel
  if (msg.guild.id === serverID && msg.channel.id === channelID) {
    // Reply to the message ping!
    if (msg.content === 'ping') {
      msg.channel.send('pong');
    }
  }
}

Store token and other secrets in .env file.

  1. Install dotenv package.
$ npm install dotenv
  1. Create .env file:
SERVERID=123456789
CHANNELID=123456789
TOKEN=123456789
  1. Load environment variables using dotenv and .env:
require('dotenv').config();
const serverID = process.env.SERVERID;
const channelID = process.env.CHANNELID;
const TOKEN = process.env.TOKEN;
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].