Coder Social home page Coder Social logo

discord-aidobot's Introduction

Discord++ example bot, EchoEchoEcho

Community & Support Some incredibly nice people here!

Discord++ Discord Server

How to Get Started Let's get it sta-arted! Let's get it started in here!

Install Prerequisites

Install Git

  • If you want to use Git in the command line, run sudo apt install git
  • If you're less terminal-inclined, you can install a Git GUI wrapper. There's a nice list here.
    • I would personally recommend GitKraken. The free version has everyhting you need, (although their conflict resolver for Pro is nice,) and you can also get Pro free with GitHub Education!

AND Install C++

  1. Install a C++ compiler
    • the typical standard is gcc, you can install it with sudo apt install gcc
    • clang is an alternative that I feel has better error statements, you can install it with sudo apt install clang
  2. Install CMake with sudo apt install cmake

AND Install Libraries

  • Debian-based (Ubuntu) sudo apt install build-essential libboost-all-dev libssl-dev libcrypto++-dev libcurl4-openssl-dev
  • Fedora/RHEL-based sudo dnf install openssl-devel boost-devel cryptopp-devel cryptopp

OR Install Everything at Once

sup apt install git clang cmake build-essential libboost-all-dev libssl-dev libcrypto++-dev libcurl4-openssl-dev

Set Up Repository

Fork Echo Optional, I guess

  • Click the 'Fork' button in the upper-right of the repo's page
  • If you're in an organization, elect the where you want the fork to go
  • Click on your new 'Settings' tab, and rename your new repo

Clone the Code

Run git clone --recursive https://github.com/discordpp/echo-bot.git in your desired directory. If you made a fork, replace discordpp and echo-bot ass applicable.

Register a Bot

  1. Go to Discord's Developer Portal 'Application' page, it will prompt you to sign in By the way, do you have 2FA enabled? It's a really good idea, especially with bots on your account
  2. Click 'New Application', and enter a name for your bot
  3. Click on 'Bot' under 'Settings' on the right, click 'Add Bot', and then 'Yes, do it!'
    • Make note of the 'Copy' button under 'Token', we'll get back to this later
    • Also, come back and click the 'regenerate' button if anyone ever gets a hold of your bot's token
    • If you want to give your bot an avatar, I'd recommend doing it both on the 'General Information' landing page and here on the 'Bot' page, it makes things less confusing if you ever need to come back.

Add your Bot to a Server

  1. Copy https://discordapp.com/api/oauth2/authorize?client_id=[ID]&scope=bot&permissions=[permissions] to somewhere, such as notepad
  2. Go back to the 'General Information' page of your application
  3. Click 'Copy' under 'Client ID', and paste it into your URL, taking care to replace the word and brackets
  4. Go to the 'Bot' page
  5. Select the permissions you want your bot to have from under 'Bot Permissions'
    • You probably want at least 'Send Messages', 2048
  6. Click the 'Copy' button under 'Permissions Integer', and paste it in your URL, make sure you get the brackets like before
  7. Paste the URL into a web btowser, select a server to add it to, and click 'Authorize'

Build your Bot

  1. Create a build directory (folder) with mkdir build
  2. Enter the folder with cd build
  3. Go back to your Application's 'bot' page from before, and copy the token. Run echo Bot [token] > token.dat, replacing the brackets and the word token
  4. Build the makefiles with cmake ../
  5. Build the bot with make
  6. Run the bot with ./echo_bot
    • You can change the executable name by modifying the project command in CMakeLists.txt
  7. ???
  8. Profit! Mention your bot in a scope it can read & write in, it should echo back your message.

Contributing

  • Echo is pretty simple and probably doesn't need much, but if you have a suggestion or spot an issue, make a pull request on Github!
  • Also, this repo needs better jokes.

discord-aidobot's People

Contributors

aidoboy avatar undarkaido avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.