aboutsummaryrefslogtreecommitdiff
path: root/discord/client.py
Commit message (Collapse)AuthorAgeFilesLines
* Explicitly mark event handlers privateRapptz2018-08-091-2/+2
|
* Fix dumb typo in the warning.Rapptz2018-07-241-2/+3
|
* Add a warning for self-bots in Client.loginRapptz2018-07-241-0/+6
| | | | Closes #1449
* Add clarification about creating guildsKot2018-07-241-2/+2
|
* [docs] discord/client: remove reference to async_eventbmintz2018-07-191-9/+2
|
* Remove remaining asyncio.coroutine calls.bmintz2018-07-051-7/+0
| | | | Also remove Client.async_event
* Remove dead package references.Rapptz2018-06-101-1/+1
|
* Drop support for Python 3.4 and make minimum version 3.5.2.Rapptz2018-06-101-75/+53
|
* Fixes various documentation errors/inconsistenciesSteve C2018-05-181-1/+4
| | | | Mostly dealing with permissions, also fixes Raw Events inclusion.
* Convert Client.activity back to an Activity-like objectRapptz2018-03-061-2/+2
|
* Missing import for _ActivityTag inside ClientRapptz2018-03-061-0/+1
|
* Add ability to change the activity used when logging in at runtime.Rapptz2018-03-051-0/+14
|
* Split Game object to separate Activity subtypes for Rich Presences.Rapptz2018-03-051-19/+20
| | | | | | | | | | | This is a massive breaking change. * All references to "game" have been renamed to "activity" * Activity objects contain a majority of the rich presence information * Game and Streaming are subtypes for memory optimisation purposes for the more common cases. * Introduce a more specialised read-only type, Spotify, for the official Spotify integration to make it easier to use.
* Add intersphinxTobotimus2018-01-061-12/+10
|
* Proper variable name in Client.clear.Rapptz2017-12-201-1/+1
|
* Add Client.clear to clear the bot's internal state to a clean slate.Rapptz2017-12-161-0/+12
| | | | In case you want to have some external restart loop.
* Fix AppInfo.id being a stringReinaSakuraba2017-10-021-1/+1
|
* Changed discord.Client.event to debug log success instead of info log.espeonofespeonage2017-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is suggested to prevent spamming the console unnecesarilly. Info should be used to output information to the user that is important, but not a warning or an error. If I am bundling a bot as a modular package then it doesn't really make sense to spam their console with every time a coroutine is subscribed to, as it likely will not mean anything to the user. If they are interested in this, it would make more sense to just to enable debugging first. I have made this change, as I am writing a wrapper for this library for a private project, and that will handle dispatching events, thus, I do not need a prompt for each event that is subscribed to in this module outside of DEBUG. Currently, with logging set to INFO, I am getting 47 lines reading: INFO:discord.client:coroutine has successfully been registered as an event ...being output as my bot starts, and without having to disable INFO logging altogether, I am currently having to temporarily change the verbosity of the logger as the events are initialised, which is not desirable as it could potentially cover up any other INFO messages that would be useful to have output. Using a filter seems like a bit of a hacky workaround. If this isn't acceptable then another alternative would be to add a parameter to the constructor of discord.Client to enable or disable printing this information.
* Add an example for on_reaction_add waiting.Rapptz2017-09-181-0/+19
| | | | | Apparently people would rather read examples than the actual documentation.
* Add webhook support.Rapptz2017-08-211-0/+24
| | | | | | | Allows for usage of either `requests` and `aiohttp` when used in "Standalone" mode. Fixes #704
* Add Client.latency, AutoShardedClient.latency and latencies.Rapptz2017-08-151-0/+9
| | | | | | This should allow an easier way to query the Discord protocol gateway latency, defined by the difference HEARTBEAT_ACK between and the last sent HEARTBEAT.
* Fix the proxy support for aiohttp>=1.4.PapyrusThePlant2017-08-111-3/+8
|
* Add heartbeat_timeout to the Client options.Rapptz2017-08-081-0/+5
| | | | | | | This setting configures how long before a timeout event is emitted internally and disconnects the websocket. Since some users were experiencing issues with the gateway not responding, this should help mitigate the issue for those with poor PCs.
* Add documentation examples for AsyncIterator and change_presence.Gorialis2017-08-081-0/+5
|
* accept_invite() doesn't exist on rewriteJuan2017-07-251-3/+0
|
* Don't re-raise in Client.connect if it's a clean close code.Rapptz2017-07-141-0/+3
|
* Implement a LRU cache for private channels.Rapptz2017-07-041-1/+7
| | | | | | Another fix related to the discord issue[1]. [1]: https://github.com/hammerandchisel/discord-api-docs/issues/184
* Add support for user flags in Profile.Rapptz2017-06-301-2/+3
|
* Defer logging formatting until the logger is actually called.Rapptz2017-06-091-2/+2
| | | | | This would cause unnecessary format calls even if you didn't have logging enabled.
* Don't expose Client.messagesRapptz2017-05-261-12/+1
| | | | | | | Not entirely sure why it was exposed in the first place. Most uses with it essentially boiled down to mis-usage when they meant to use the /messages endpoint (via Client.logs_from or Messageable.history) or complaining about the partial data woes that came from it.
* Log when a KeyboardInterrupt is met in Client.runRapptz2017-05-251-1/+1
|
* Allow setting a presence upon logging in.Rapptz2017-05-201-0/+4
|
* Rewrite Client.run yet again.Rapptz2017-05-201-16/+32
| | | | This time it should definitely fix #545.
* Re-raise exceptions from Client.start in Client.run.Rapptz2017-05-201-15/+18
|
* Re-implement how Client.run is done by using run_forever instead.Rapptz2017-05-201-4/+18
|
* Only do loop cleanup in finally block when on windows.Rapptz2017-05-201-2/+4
| | | | Should also fix #545.
* Check if we're closing the event loop before using it.Rapptz2017-05-201-1/+5
| | | | Should fix #545.
* Kill remaining references to discord.Channel in documentation.Rapptz2017-05-191-3/+3
|
* Rename internal ConnectionState attribute to have an underscore.Rapptz2017-05-161-23/+23
| | | | | | Some people like to use that variable name apparently. See #568 and #569.
* Client.get_user_info uses int for IDs not str.Rapptz2017-05-151-1/+1
| | | | Realistically both will work but let's not say that.
* Add back Client.create_guild.Rapptz2017-05-091-1/+47
|
* Replace hasattr with try except in chunker.Rapptz2017-05-051-2/+2
|
* Change some format usage to use %-formatting.Rapptz2017-05-041-1/+1
| | | | | Minor speed increase when we're not doing excessive attribute access or any type of formatting.
* Add Client.get_emoji to get an Emoji from an ID.Rapptz2017-04-301-0/+4
|
* Fix some linting errors.Rapptz2017-04-221-1/+1
|
* Timeout when doing initial connection.Rapptz2017-04-221-6/+7
|
* Remove unused imports.Rapptz2017-04-181-7/+2
|
* Properly cleanup of VoiceClients in cache.Rapptz2017-04-181-3/+1
|
* Re-implement voice sending.Rapptz2017-04-181-3/+5
| | | | | | | | | | | | | | | | | | | | This is a complete redesign of the old voice code. A list of major changes is as follows: * The voice websocket will now automatically reconnect with exponential back-off just like the regular Client does. * Removal of the stream player concept. * Audio now gracefully pauses and resumes when a disconnect is found. * Introduce a discord.AudioSource concept to abstract streams * Flatten previous stream player functionality with the VoiceClient, e.g. player.stop() is now voice_client.stop() * With the above re-coupling this means you no longer have to store players anywhere. * The after function now requires a single parameter, the error, if any existed. This will typically be None. A lot of this design is experimental.
* Remove unnecessary shielding.Rapptz2017-03-251-1/+1
| | | | | This was causing the exception to be suppressed and print 'NoneType' instead.