From 01597eef71868ac3733b8a3616018c9df3607d20 Mon Sep 17 00:00:00 2001 From: CMDR furrycat Date: Thu, 27 Oct 2016 21:40:23 +0100 Subject: [PATCH] Typos. --- plugin/announcements/announcements.py | 8 ++++---- plugin/feeds/feeds.py | 9 ++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/plugin/announcements/announcements.py b/plugin/announcements/announcements.py index 8a070c3..269e12d 100644 --- a/plugin/announcements/announcements.py +++ b/plugin/announcements/announcements.py @@ -72,7 +72,7 @@ class Announcements(DBConnection): def handle_command(self, message, command, raw): if command not in self.valid_commands(): return PluginCommand.ignored - yield from self.manage_announcements(message, command, raw) + yield from self.manage_announcements(message, raw) return PluginCommand.exclusive @asyncio.coroutine @@ -379,7 +379,7 @@ class Announcements(DBConnection): if announcement['voice_id']: text += ' voice <#{}>'.format(announcement['voice_id']) if announcement['sound']: - text += ' play "{}"'.format(announcement['sound']) + text += ' sound "{}"'.format(announcement['sound']) if abs(announcement['probability']) < 1.0: text += ' probability {}'.format(abs(announcement['probability'])) @@ -389,7 +389,7 @@ class Announcements(DBConnection): if announcement['message']: lines.append(announcement['message']) - yield from bot.say(message.channel, '\n'.join(lines)) + yield from bot.say_many(message.channel, lines) # Map a database key to a syntax parameter. def announcement_key(self, k): @@ -691,7 +691,7 @@ class Announcements(DBConnection): yield from cat.yelp(message.channel) @asyncio.coroutine - def manage_announcements(self, message, command, raw): + def manage_announcements(self, message, raw): m = re.match(r'announce(?:ment)?\s+(.+)', raw, re.IGNORECASE | re.DOTALL) if m is None: yield from self.list_announcements(message) diff --git a/plugin/feeds/feeds.py b/plugin/feeds/feeds.py index 7fba7ac..9c4a9ed 100644 --- a/plugin/feeds/feeds.py +++ b/plugin/feeds/feeds.py @@ -244,7 +244,7 @@ class Feeds(DBConnection): else: feed = None - # Anyone on the server can show details of an announcement. + # Anyone on the server can show details of a feed. if command == 'show': if feed is not None: server = client.get_server(feed['server_id']) @@ -313,7 +313,7 @@ class Feeds(DBConnection): text += "--link_json '{}'".format(feed['link_json']) lines.append(text) - yield from bot.say(message.channel, '\n'.join(lines)) + yield from bot.say_many(message.channel, lines) @asyncio.coroutine def parse_feed(self, message, args, editing = False): @@ -424,7 +424,6 @@ class Feeds(DBConnection): yield from bot.say(message.channel, 'Missing title!') return None - return parsed @asyncio.coroutine @@ -565,12 +564,12 @@ class Feeds(DBConnection): elif command == 'list': lines = [ 'List all feeds, one `ID` per line. You can use the `ID` in other commands.', - "When listing IDs to a public channel I won't show IDs for feeds that are for channels on another server. Send `announce list` to me in a private message to see them.", + "When listing IDs to a public channel I won't show IDs for feeds that are for channels on another server. Send `feed list` to me in a private message to see them.", ] elif command == 'show': lines = [ 'Show the feed with the given ID.', - '```announcement show ID```', + '```feed show ID```', 'I will tell you the details in a format which you could copy and paste to create a new feed.', ] elif command in ['pause', 'resume']: -- 2.7.4