aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Use v3 of the Discord API.Rapptz2015-10-111-1/+1
|
* Clarify logging and on_error documentationHornwitser2015-10-062-17/+47
| | | | | | | | Change the description of on_error to reflect that exceptions are logged and not output by default. Add a note about not configuring logging causing exceptions to be silently ignored in handlers in the API. And add some more explanations and a simpler configuration example to the logging description.
* Set up logging module in examplesHornwitser2015-10-064-0/+16
| | | | | | | | Without setting up the logging module, a god number of error conditions and warnings will never be output by the library. This is a common pitfall to forget and it's not documented good enough the consequences of not setting up the logging module when developing applications with this library.
* Add handling of login failure in examplesHornwitser2015-10-064-0/+16
| | | | | | Check and handle login failure in the examples provided for using this library. This is a common error condition that should be handled by any script using this library.
* Make event based handlers first classHornwitser2015-10-061-33/+1
| | | | | | Change Client.event decorator to assign the event handler function to the instance it self and levarage dispatch to handle calling these event. Remove old _invoke_event method.
* Change behaviour of on_errorHornwitser2015-10-062-15/+24
| | | | | | | | | Change how the old style on_error event is called to match the new style on_error event. Both are now called in case an exception is raised in an user defined event handler, and will by default print the arguments of the event tha raised the exception and the traceback for the exception. In addition, overridding the on_error handler supresses this behaviour.
* Add client register APIHornwitser2015-10-062-0/+38
| | | | | | | When clicking on an invite link without having a Discord account it's possible to create an unclaimed account for joining the conversation quickly. Add register() method to Client that performs and invite based registration of an unclaimed account.
* Reconnect when WebSocket diesHornwitser2015-10-061-0/+15
| | | | | Check if the WebSocket connection was supposed to terminate and reconnect to the gateway if this is not the case.
* Make dispatch multithreading safeHornwitser2015-10-061-12/+14
| | | | | | | | | | Guard the execution of dispatch with a recursive thread lock. This is needed to make a thread safe way to send events to Client objects. Note that the only thread safe method is dispatch, everything else is unsafe to call from another thread, as the thead handling the Client object could be modifying arbitrary structures at any time. In addition this only keeps nasal demons away, and does not solve any of the difficult syncronization issues that might be present.
* Move socket and connection state out of ClientHornwitser2015-10-061-215/+278
| | | | | | | | | | Move the socket message handling and Discord connection state tracking out of the Client class. The WebSocket class handles the ws4py based WebSocket to Discord, maintains the keepalive and dispatches socket_<events> based on activity. The ConnectionSTate class maintains the state associated with the WebSocket connection with Discord. In a reconnect and switch gateway scenario this state can be kept for a faster and less disruptive recovery.
* Add new event systemHornwitser2015-10-061-16/+34
| | | | | | | | | | | | | | | | Add event system based on a public dispatch method in Client. The new event system bases itself on two types of events, internal event handlers and user defined event handlers. Internal event handlers begin with 'handle_', and user defined events begin with 'on_'. Events are dispatched with dispatch(event_name, *args). The Client class should be subclassed and the on_<event> handlers defined in it for responding to events. The handle_<event> handlers can the overridden to override the behaviour of the Client class, though this is not recommended. The subclassing method allows separation of the instance of the client and the code that handles it. (i.e. you don't need the instance of the client object to define event handlers for it). Though, the old method of using the event decorator from the instance will still be supported.
* Make reply example a bit more meaningful.Rapptz2015-10-051-1/+1
|
* Fix echo example to not infinitely loop.Rapptz2015-10-051-1/+2
|
* Fix bug with mentions not working.v0.6.3Rapptz2015-10-022-3/+3
|
* Check for 2xx range instead of specific status codes.Rapptz2015-10-021-20/+25
|
* Fix server attribute not being set in GUILD_MEMBER_ADD.v0.6.2Rapptz2015-10-022-3/+3
|
* Fix another logging errorRapptz2015-10-021-1/+1
|
* Fix an error with logging in the login method.v0.6.1Rapptz2015-09-272-3/+3
|
* Bump to version v0.6.0v0.6.0Rapptz2015-09-251-2/+2
|
* Refactor websocket creation to its own function.Rapptz2015-09-251-34/+36
|
* Add edit_channel.Rapptz2015-09-251-0/+31
|
* Listen to CHANNEL_UPDATE events and add on_channel_updateRapptz2015-09-253-0/+17
|
* Add support for channel topics.Rapptz2015-09-251-0/+4
|
* Move permission overwrite construction to the Channel constructor.Rapptz2015-09-252-28/+28
|
* PRESENCE_UPDATE now updates the user as well.Rapptz2015-09-251-1/+6
| | | | | This means that it calls on_member_update just like the GUILD_MEMBER_UPDATE event in an effort to keep some backwards compat.
* Most functions should now return something more meaningful.Rapptz2015-09-241-4/+21
| | | | | Basically a lot of the request functions now return a booleean indicating if the request was successful or not.
* Add TTS support for messages.Rapptz2015-09-201-1/+5
|
* accept_invite now works on some invite URLs.Rapptz2015-09-191-3/+17
|
* Remove duplicated create_channel function.Rapptz2015-09-191-24/+0
|
* Fix keep_alive running after logout()Hornwitser2015-09-191-15/+19
| | | | | | | | | | | | _keep_alive_handler would set up another keep alive after the first one by creating a new threading.Timer object, but Client would only keep track of the first timer object. Thus casing the keep alive to continue running after Client.logout calls cancel() on it's timer object, as it no longer references the actual timer object waiting for the keep alive. Fix by replacing _keep_alive_handler with a threading.Thread subclass that sends keep_alives of the given interval and exits when its stop event is set.
* Add support for logging.Rapptz2015-09-165-20/+91
|
* Document discord.utils.find functionRapptz2015-09-141-0/+6
|
* Add ability to edit or delete roles from a sever.Rapptz2015-09-131-0/+44
|
* Add utils.find helper function.Rapptz2015-09-133-13/+38
|
* Add get_default_role for servers to get the 'everyone' role.Rapptz2015-09-071-0/+6
|
* Fix KeyError with events.v0.5.1Rapptz2015-09-052-4/+4
|
* Documentation fixes and version bump.v0.5.0Rapptz2015-09-053-5/+5
|
* Add the ability to accept invites.Rapptz2015-09-052-1/+18
|
* Add on_error event for doing something about uncaught exceptions.Rapptz2015-09-052-3/+17
|
* Remove owner_id from Server and use owner instead.Rapptz2015-09-042-4/+9
| | | | owner will be the actual Member who owns the server.
* Add on_member_update event.Rapptz2015-09-042-0/+23
|
* Add support for creating invites.Rapptz2015-09-044-0/+121
|
* Refactor parse_time into its own utils file.Rapptz2015-09-044-19/+48
|
* Use kwargs if the number of arguments needed is too many.Rapptz2015-09-044-30/+39
|
* Add ability to delete channels.Rapptz2015-09-041-0/+11
|
* Add the ability to create channels.Rapptz2015-09-041-0/+25
|
* Add support for editing your profile.Rapptz2015-09-041-0/+30
|
* Store email in the client as an attribute.Rapptz2015-09-031-0/+6
|
* Update README.Rapptz2015-09-031-2/+7
|
* Add the ability to kick, ban and unban users from a server.Rapptz2015-09-031-0/+35
|