DiscordPP / Discordpp
A Modularized C++ Library for the Discord API
Stars: ✭ 111
Programming Languages
cpp
1120 projects
Labels
Projects that are alternatives of or similar to Discordpp
Coward
🐔 Coward is a Deno module for easy interaction with the Discord API.
Stars: ✭ 65 (-41.44%)
Mutual labels: discord-api, discord
Discljord
A Clojure wrapper library for the Discord API, with full API coverage (except voice, for now), and high scalability
Stars: ✭ 111 (+0%)
Mutual labels: discord-api, discord
Dimscord
A Discord Bot & REST Library for Nim.
Stars: ✭ 67 (-39.64%)
Mutual labels: discord-api, discord
Serenity
A Rust library for the Discord API.
Stars: ✭ 1,387 (+1149.55%)
Mutual labels: discord-api, discord
Discord.js Menu
💬 Easily create Discord.js v12 embed menus with reactions and unlimited customizable pages.
Stars: ✭ 89 (-19.82%)
Mutual labels: discord-api, discord
Smorebot
SmoreBot is a fun, lightweight, multipurpose bot packed with features.
Stars: ✭ 51 (-54.05%)
Mutual labels: discord-api, discord
Discordrpcvs
An extension for Visual Studio 2017 that enables Discord Rich Presence.
Stars: ✭ 77 (-30.63%)
Mutual labels: discord-api, discord
Discpp
Simplified, but feature rich Discord API wrapper written in modern C++.
Stars: ✭ 31 (-72.07%)
Mutual labels: discord-api, discord
Client
A Typescript NodeJS library to interact with Discord's API, both Rest and Gateway.
Stars: ✭ 84 (-24.32%)
Mutual labels: discord-api, discord
Nino
🔨 Advanced and cute moderation discord bot as an entry of Discord's Hack Week!
Stars: ✭ 78 (-29.73%)
Mutual labels: discord-api, discord
Discord Global Mutual
Get the list of people that you have shared servers with
Stars: ✭ 39 (-64.86%)
Mutual labels: discord-api, discord
Music Bot
Simple music bot with a full-blown queue system that is easy to understand
Stars: ✭ 102 (-8.11%)
Mutual labels: discord-api, discord
Discord4j
Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.
Stars: ✭ 973 (+776.58%)
Mutual labels: discord-api, discord
Modmail
A feature rich discord Modmail bot
Stars: ✭ 957 (+762.16%)
Mutual labels: discord-api, discord
Basicbot
A basic example of a Discord Bot written in Python. (discord.py)
Stars: ✭ 73 (-34.23%)
Mutual labels: discord-api, discord
Deku
Multi-purpose discord bot built with discord.js
Stars: ✭ 13 (-88.29%)
Mutual labels: discord-api, discord
Bot
A Discord bot for all your needs. With memes, utilities, moderation & more, Fire is the only bot you'll need.
Stars: ✭ 79 (-28.83%)
Mutual labels: discord-api, discord
Discord Rich Presence Tool
A C++/Qt program that lets you fill in your own custom Discord Rich Presence information for games and activities away from the PC.
Stars: ✭ 91 (-18.02%)
Mutual labels: discord-api, discord
Discord++ (it's cool)
A Modularized C++ Library for the Discord API
This library is not a hacked Discord mobile app that will give you free Nitro. Free Nitro does not exist, and any YouTube video saying otherwise is attempting either to get you to install malware or to collect ad revenue off of you.
Links
Dependencies
Required
- Boost
- A Discord++ REST module
-
REST: Beast
- Requires OpenSSL
-
REST: Beast
- A Discord++ WebSocket module
-
WebSocket: Beast
- Currently out of date
- WebSocket: Simple-WebSocket-Server
-
WebSocket: Beast
Included (Git submodules)
Recommended Plugins
-
Plugin: RateLimit handes rate limiting
- Without this plugin, Discord++ exits when encountering a rate limit for your safety
-
Plugin: Overload provides overloads for the websocket and REST
call
andsend
functions to createstd::shared_ptr
s for you and provides some sane defaults when you don't need all their arguments. -
Plugin: Responder provides a simple interface for detecting commands in the form of a character and a string, e.g.
!help
- You can find more plugins on the #discordpp-plugin tag
Usage
Templates This is way easier
-
Echo Bot
- Contains detailed setup instructions
- Branches often track development of new features
- Feel free to submit your own templates as a PR
The insructions that follow are out of date, please use Echo as a template
Manual
- Download:
- Download Discord++, a Discord++ REST module, a Discord++ Websocket module, and any plugins you want.
-
git submodule add <repository> [<path>]
is a nice way to havegit
still track the remote repositiories- After adding the submodules you want, use
git submodule update --init --recursive
to initialize them.
- After adding the submodules you want, use
-
- Place them all in a subdirectory of your project. (I use
lib/
)
- In CMake:
- Add
ADD_SUBDIRECTORY(<relative path>)
for Discord++ and each module. e.g.
add_subdirectory(lib/discordpp)
add_subdirectory(lib/rest-curlpp)
add_subdirectory(lib/websocket-websocketpp)
- Add
discordpp
and each module to yourINCLUDE_DIRECTORIES
command.
INCLUDE_DIRECTORIES( ${discordpp_SOURCE_DIR} ${discordpp-rest-curlpp_SOURCE_DIR} ${discordpp-websocket-websocketpp_SOURCE_DIR})
- In your code:
- Include
discordpp/bot.hh
and the header file from each submodule. e.g.
#include <discordpp/bot.hh>
#include <discordpp/rest-curlpp.hh>
#include <discordpp/websocket-websocketpp.hh>
- Create a Bot object. e.g.
auto bot = std::make_shared<DppBot>();
- For this example, I declared a
DppBot
alias just after the#include
statements
using DppBot =
dpp::WebsocketBeast<
dpp::RestBeast<
dpp::Bot
>
>;
- Add responses to events with
handlers.insert
e.g.
bot->handlers.insert(
{
"MESSAGE_CREATE",
[&bot](json msg){
//Do Stuff
}
}
);
- Create a
std::shared_ptr<boost::asio::io_context>
- e.g.
auto aioc = std::make_shared<asio::io_context>();
- e.g.
- Initialize the bot object and any plugins that require it e.g.
bot->initBot(6, token, aioc)
. The token should be in the formBot <token>
where you replace<token>
with your token. - Run the bot:
bot->run();
(This will also run the io_context)
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].