See the Wiki for setup and configuration
- 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.
An example Discord++ bot
Home Page: https://discord.gg/4stCdkDHw6
License: MIT License
See the Wiki for setup and configuration
Build your Bot
Create a build directory (folder) with mkdir build
Enter the folder with cd build
Go back to your Application's 'bot' page from before, and copy the token. Run echo Bot [token] > token.dat, replacing [token] with your bot's token. Alternatively, you can set the ECHO_BOT_TOKEN environment variable to Bot [token].
Build the makefiles with cmake ../
If you are using vcpkg then run cmake -DCMAKE_TOOLCHAIN_FILE="your vcpkg.cmake folder" ../
Build the bot with make (if you are using Visual Studio open echo_bot.sln and build from there)
Run the bot with ./echo_bot
You can change the executable name by modifying the project command in CMakeLists.txt
???
Profit! Mention your bot in a scope it can read & write in, it should echo back your message.
I need help to do this step.
I am getting compilation error.
cat /etc/issue
Ubuntu 18.04.3 LTS \n \l
[ 50%] Building CXX object CMakeFiles/echo_bot.dir/main.cc.o
In file included from /home/anton/prj/echo-bot/main.cc:9:0:
/home/anton/prj/echo-bot/lib/websocket-beast/discordpp/websocket-beast.hh: In instantiation of ‘void discordpp::WebsocketBeast<BASE>::runctd() [with BASE = discordpp::RestBeast<discordpp::Bot>]’:
/home/anton/prj/echo-bot/main.cc:129:1: required from here
/home/anton/prj/echo-bot/lib/websocket-beast/discordpp/websocket-beast.hh:54:32: error: no matching function for call to ‘discordpp::WebsocketBeast<discordpp::RestBeast<discordpp::Bot> >::call(const char [4], const char [13])’
json gateway = call("GET", "/gateway/bot");
~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/anton/prj/echo-bot/main.cc:8:0:
/home/anton/prj/echo-bot/lib/rest-beast/discordpp/rest-beast.hh:29:22: note: candidate: discordpp::json discordpp::RestBeast<BASE>::call(boost::beast::http::verb, std::__cxx11::string, discordpp::json) [with BASE = discordpp::Bot; discordpp::json = nlohmann::basic_json<>; std::__cxx11::string = std::__cxx11::basic_string<char>]
virtual json call(http::verb requestType, std::string targetURL, json body) {
^~~~
/home/anton/prj/echo-bot/lib/rest-beast/discordpp/rest-beast.hh:29:22: note: candidate expects 3 arguments, 2 provided
/home/anton/prj/echo-bot/lib/rest-beast/discordpp/rest-beast.hh:128:22: note: candidate: discordpp::json discordpp::RestBeast<BASE>::call(std::__cxx11::string, std::__cxx11::string, discordpp::json) [with BASE = discordpp::Bot; discordpp::json = nlohmann::basic_json<>; std::__cxx11::string = std::__cxx11::basic_string<char>]
virtual json call(std::string requestType, std::string targetURL, json body) override {
^~~~
/home/anton/prj/echo-bot/lib/rest-beast/discordpp/rest-beast.hh:128:22: note: candidate expects 3 arguments, 2 provided
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.