Code Monkey home page Code Monkey logo

discordpp's Introduction

Discord++

A Modularized C++ Library for the Discord API

GitHub starsDiscord

Links

Dependencies

Required

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 send function to create std::shared_ptrs 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
  • Plugin: Native provides extensions to the default call , callJson, and callFile methods specific to different endpoints as well as native C++ objects for Discord's JSON structures
  • You can find more plugins on the #discordpp-plugin tag

Usage

See the Wiki for setup and configuration

discordpp's People

Contributors

17steen avatar aidoboy avatar arves100 avatar braxton avatar danielbatterystapler avatar green-avocado avatar harrrson avatar niansa avatar notunlikethewaves avatar supsm avatar swisschili avatar undarkaido avatar zeroxs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

discordpp's Issues

Bot crashes after empty `/gateway/bot` payload instead of retrying

Discord Servers did not respond to 1 heartbeat within 41250ms but we're letting this one slip.
Discord Servers did not respond to 2 heartbeats  within 41250ms; aborting connection.
Reconnecting because "Discord did not acknowledge too many heartbeats" ...
Fetching gateway...
read: Host not found (authoritative) /gateway/bot with no body
 Failed.

Add colors

Currently the output is a bit bland. I've created a pull request to add a little bit of color to the output.

Tested on

- linux 4.20.0 x86 g++ 8.2.1 # # #21 

Bot occasionally fails to connect

It throws this error:

wss://gateway-1.discord.gg/3
[2016-03-28 13:42:37] [fail] WebSocket Connection Unknown - "" /3 0 websocketpp.transport:9 Timer Expired
[2016-03-28 13:42:37] [info] Error getting remote endpoint: system:9 (Bad file descriptor)
[2016-03-28 13:42:37] [error] handle_connect error: Timer Expired
[2016-03-28 13:42:37] [info] asio async_shutdown error: asio.ssl:336462100 (uninitialized)

GUILD_PRESENCES intent loops the connection

If you use the intent GUILD_PRESENCES the echo bot starts looping the connection to discord. After the first heartbeat it says the following:
"Sending: Client: Closed connection with status code 4014
Reconnecting because "The stream closed" ...
Fetching gateway...
Done." and the next heartbeat it says the following:
"Discord Servers notified of an invalid session ID.
Reconnecting because "The session is invalid" ...
Fetching gateway...
Done."
This keeps alternating until you kill the bot, see the screenshot below. I hope this was enough information and reproducible, for more questions you can reach me on discord SenpaiR6#1717
Screenshot_2021-05-27_11-06-22

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.