Browse Source

Missed reversions (git is a pain)

pull/129/head
“elderlabs” 7 years ago
parent
commit
d44ca44035
  1. 3
      disco/util/serializer.py
  2. 2
      docs/bot_tutorial/building_block_listeners.md
  3. 2
      tests/types/user.py

3
disco/util/serializer.py

@ -31,9 +31,8 @@ class Serializer(object):
@classmethod
def loads(cls, fmt, raw):
import yaml
loads, _ = getattr(cls, fmt)()
return loads(raw, Loader=yaml.FullLoader)
return loads(raw)
@classmethod
def dumps(cls, fmt, raw):

2
docs/bot_tutorial/building_block_listeners.md

@ -9,7 +9,7 @@ To start off with, lets create a listener attached to our plugin that fires when
```py
@Plugin.listen('MessageCreate')
def on_message_create(self, event):
self.log.debug('Got message: {}'.format(event.message))
self.log.debug('Got message: %s', event.message)
```
Ok, but what if we want to make a listener which welcomes new users to our server? Well thats also easy:

2
tests/types/user.py

@ -13,7 +13,7 @@ class TestChannel(TestCase):
bot=False)
self.assertEqual(
u.avatar_url, 'https://media.discordapp.net/avatars/12345/1234567890abcdefghijkl.webp?size=1024'
u.avatar_url, 'https://cdn.discordapp.com/avatars/12345/1234567890abcdefghijkl.webp?size=1024'
)
def test_user_default_avatar(self):

Loading…
Cancel
Save