Browse Source

Added docstring to open_dm()

Added docstring explaining usage with an example
pull/95/head
Jaimyn Mayer 7 years ago
committed by GitHub
parent
commit
a0c3bc62d7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      disco/types/user.py

7
disco/types/user.py

@ -46,6 +46,13 @@ class User(SlottedModel, with_equality('id'), with_hash('id')):
return '<@{}>'.format(self.id)
def open_dm(self):
"""
Opens a dm channel to allow the bot to dm users. See `client.api.users_me_dms_create()` for more information.
Example: `user.open_dm().send_message('Hi there!')`
Returns
-------
`disco.types.channel`
"""
return self.client.api.users_me_dms_create(self.id)
def __str__(self):

Loading…
Cancel
Save