From a0c3bc62d70529701e8e7bff4919330b458c0358 Mon Sep 17 00:00:00 2001 From: Jaimyn Mayer Date: Fri, 4 May 2018 00:43:29 +1000 Subject: [PATCH] Added docstring to open_dm() Added docstring explaining usage with an example --- disco/types/user.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/disco/types/user.py b/disco/types/user.py index b35dc47..634b055 100644 --- a/disco/types/user.py +++ b/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):