prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  [announce] Send confirmation to caller after all channels announced
  When Sopel is in many channels, announces are likely to be rate-limited. This makes it hard to know, for example, when it's safe to shut down the bot if announce is being used to broadcast an upgrade notice.
  
  It's an easy fix, and I'll open a PR for it tomorrow if there are no objections.
  
  I am as-yet undecided whether it's best to use `bot.reply()` or `bot.notice()` for this (or even `bot.msg()` via PM to the caller), but I'll think about it between now and when I open the PR, and it can always be changed before merging.
  
  
  </issue>
  <code>
  [start of sopel/modules/announce.py]
  1 # coding=utf-8
  2 """
  3 announce.py - Send a message to all channels
  4 Copyright © 2013, Elad Alfassa, <elad@fedoraproject.org>
  5 Licensed under the Eiffel Forum License 2.
  6 
  7 """
  8 from __future__ import unicode_literals, absolute_import, print_function, division
  9 
  10 from sopel.module import commands, example
  11 
  12 
  13 @commands('announce')
  14 @example('.announce Some important message here')
  15 def announce(bot, trigger):
  16     """
  17     Send an announcement to all channels the bot is in
  18     """
  19     if not trigger.admin:
  20         bot.reply('Sorry, I can\'t let you do that')
  21         return
  22     for channel in bot.channels:
  23         bot.msg(channel, '[ANNOUNCEMENT] %s' % trigger.group(2))
  24
  [end of sopel/modules/announce.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/sopel/modules/announce.py b/sopel/modules/announce.py
  --- a/sopel/modules/announce.py
  +++ b/sopel/modules/announce.py
  @@ -21,3 +21,4 @@
           return
       for channel in bot.channels:
           bot.msg(channel, '[ANNOUNCEMENT] %s' % trigger.group(2))
  +    bot.reply('Announce complete.')
  
verification_info: {"golden_diff": "diff --git a/sopel/modules/announce.py b/sopel/modules/announce.py\n--- a/sopel/modules/announce.py\n+++ b/sopel/modules/announce.py\n@@ -21,3 +21,4 @@\n         return\n     for channel in bot.channels:\n         bot.msg(channel, '[ANNOUNCEMENT] %s' % trigger.group(2))\n+    bot.reply('Announce complete.')\n", "issue": "[announce] Send confirmation to caller after all channels announced\nWhen Sopel is in many channels, announces are likely to be rate-limited. This makes it hard to know, for example, when it's safe to shut down the bot if announce is being used to broadcast an upgrade notice.\n\nIt's an easy fix, and I'll open a PR for it tomorrow if there are no objections.\n\nI am as-yet undecided whether it's best to use `bot.reply()` or `bot.notice()` for this (or even `bot.msg()` via PM to the caller), but I'll think about it between now and when I open the PR, and it can always be changed before merging.\n\n", "before_files": [{"content": "# coding=utf-8\n\"\"\"\nannounce.py - Send a message to all channels\nCopyright \u00a9 2013, Elad Alfassa, <elad@fedoraproject.org>\nLicensed under the Eiffel Forum License 2.\n\n\"\"\"\nfrom __future__ import unicode_literals, absolute_import, print_function, division\n\nfrom sopel.module import commands, example\n\n\n@commands('announce')\n@example('.announce Some important message here')\ndef announce(bot, trigger):\n    \"\"\"\n    Send an announcement to all channels the bot is in\n    \"\"\"\n    if not trigger.admin:\n        bot.reply('Sorry, I can\\'t let you do that')\n        return\n    for channel in bot.channels:\n        bot.msg(channel, '[ANNOUNCEMENT] %s' % trigger.group(2))\n", "path": "sopel/modules/announce.py"}]}