aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Add on_server_create and on_server_delete events.Rapptz2015-09-032-54/+77
|
* WebSocket gateway now properly uses the auth headers.Rapptz2015-09-031-21/+21
|
* Permissions are now properties rather than functions.Rapptz2015-09-031-4/+113
| | | | | This allows you to set or retrieve specific bits through a higher level API to facilitate editing in the future.
* Sandbox some events that didn't get sandboxed.Rapptz2015-09-031-2/+2
|
* Fix issue with author changing typemegamit2015-09-021-1/+1
| | | When cycling through the attributes of the data json 'author' within 'message' which was previously a user object is overwritten with a dictionary. This causes an AttributeError to be thrown ( and silently swallowed... thanks except: pass) whenever any of its attributes are referenced in the form message.author.x. User data should change in this step and the user object should not be modified for any reason so its safe to skip updating it.
* Document exceptions and change conf.py version detection.v0.4.1Rapptz2015-08-283-4/+25
|