We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
.at without an argument gives TypeError
```
<embolalia> .at
<Sopel> TypeError: expected string or buffer (file "/opt/rh/python33/root/usr/lib/python3.3/site-packages/sopel/modules/remind.py", line 165, in at)
```

.at without an argument gives TypeError
```
<embolalia> .at
<Sopel> TypeError: expected string or buffer (file "/opt/rh/python33/root/usr/lib/python3.3/site-packages/sopel/modules/remind.py", line 165, in at)
```


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `sopel/modules/remind.py`
Content:
```
1 # coding=utf8
2 """
3 remind.py - Sopel Reminder Module
4 Copyright 2011, Sean B. Palmer, inamidst.com
5 Licensed under the Eiffel Forum License 2.
6 
7 http://sopel.chat
8 """
9 from __future__ import unicode_literals
10 
11 import os
12 import re
13 import time
14 import threading
15 import collections
16 import codecs
17 from datetime import datetime
18 from sopel.module import commands, example, NOLIMIT
19 import sopel.tools
20 from sopel.tools.time import get_timezone, format_time
21 
22 try:
23     import pytz
24 except:
25     pytz = None
26 
27 
28 def filename(self):
29     name = self.nick + '-' + self.config.core.host + '.reminders.db'
30     return os.path.join(self.config.core.homedir, name)
31 
32 
33 def load_database(name):
34     data = {}
35     if os.path.isfile(name):
36         f = codecs.open(name, 'r', encoding='utf-8')
37         for line in f:
38             unixtime, channel, nick, message = line.split('\t')
39             message = message.rstrip('\n')
40             t = int(float(unixtime))  # WTFs going on here?
41             reminder = (channel, nick, message)
42             try:
43                 data[t].append(reminder)
44             except KeyError:
45                 data[t] = [reminder]
46         f.close()
47     return data
48 
49 
50 def dump_database(name, data):
51     f = codecs.open(name, 'w', encoding='utf-8')
52     for unixtime, reminders in sopel.tools.iteritems(data):
53         for channel, nick, message in reminders:
54             f.write('%s\t%s\t%s\t%s\n' % (unixtime, channel, nick, message))
55     f.close()
56 
57 
58 def setup(bot):
59     bot.rfn = filename(bot)
60     bot.rdb = load_database(bot.rfn)
61 
62     def monitor(bot):
63         time.sleep(5)
64         while True:
65             now = int(time.time())
66             unixtimes = [int(key) for key in bot.rdb]
67             oldtimes = [t for t in unixtimes if t <= now]
68             if oldtimes:
69                 for oldtime in oldtimes:
70                     for (channel, nick, message) in bot.rdb[oldtime]:
71                         if message:
72                             bot.msg(channel, nick + ': ' + message)
73                         else:
74                             bot.msg(channel, nick + '!')
75                     del bot.rdb[oldtime]
76                 dump_database(bot.rfn, bot.rdb)
77             time.sleep(2.5)
78 
79     targs = (bot,)
80     t = threading.Thread(target=monitor, args=targs)
81     t.start()
82 
83 scaling = collections.OrderedDict([
84     ('years', 365.25 * 24 * 3600),
85     ('year', 365.25 * 24 * 3600),
86     ('yrs', 365.25 * 24 * 3600),
87     ('y', 365.25 * 24 * 3600),
88 
89     ('months', 29.53059 * 24 * 3600),
90     ('month', 29.53059 * 24 * 3600),
91     ('mo', 29.53059 * 24 * 3600),
92 
93     ('weeks', 7 * 24 * 3600),
94     ('week', 7 * 24 * 3600),
95     ('wks', 7 * 24 * 3600),
96     ('wk', 7 * 24 * 3600),
97     ('w', 7 * 24 * 3600),
98 
99     ('days', 24 * 3600),
100     ('day', 24 * 3600),
101     ('d', 24 * 3600),
102 
103     ('hours', 3600),
104     ('hour', 3600),
105     ('hrs', 3600),
106     ('hr', 3600),
107     ('h', 3600),
108 
109     ('minutes', 60),
110     ('minute', 60),
111     ('mins', 60),
112     ('min', 60),
113     ('m', 60),
114 
115     ('seconds', 1),
116     ('second', 1),
117     ('secs', 1),
118     ('sec', 1),
119     ('s', 1),
120 ])
121 
122 periods = '|'.join(scaling.keys())
123 
124 
125 @commands('in')
126 @example('.in 3h45m Go to class')
127 def remind(bot, trigger):
128     """Gives you a reminder in the given amount of time."""
129     duration = 0
130     message = filter(None, re.split('(\d+(?:\.\d+)? ?(?:(?i)' + periods + ')) ?',
131                                     trigger.group(2))[1:])
132     reminder = ''
133     stop = False
134     for piece in message:
135         grp = re.match('(\d+(?:\.\d+)?) ?(.*) ?', piece)
136         if grp and not stop:
137             length = float(grp.group(1))
138             factor = scaling.get(grp.group(2).lower(), 60)
139             duration += length * factor
140         else:
141             reminder = reminder + piece
142             stop = True
143     if duration == 0:
144         return bot.reply("Sorry, didn't understand the input.")
145 
146     if duration % 1:
147         duration = int(duration) + 1
148     else:
149         duration = int(duration)
150     timezone = get_timezone(
151         bot.db, bot.config, None, trigger.nick, trigger.sender)
152     create_reminder(bot, trigger, duration, reminder, timezone)
153 
154 
155 @commands('at')
156 @example('.at 13:47 Do your homework!')
157 def at(bot, trigger):
158     """
159     Gives you a reminder at the given time. Takes hh:mm:ssTimezone
160     message. Timezone is any timezone Sopel takes elsewhere; the best choices
161     are those from the tzdb; a list of valid options is available at
162     http://dft.ba/-tz . The seconds and timezone are optional.
163     """
164     regex = re.compile(r'(\d+):(\d+)(?::(\d+))?([^\s\d]+)? (.*)')
165     match = regex.match(trigger.group(2))
166     if not match:
167         bot.reply("Sorry, but I didn't understand your input.")
168         return NOLIMIT
169     hour, minute, second, tz, message = match.groups()
170     if not second:
171         second = '0'
172 
173     if pytz:
174         timezone = get_timezone(bot.db, bot.config, tz,
175                                 trigger.nick, trigger.sender)
176         if not timezone:
177             timezone = 'UTC'
178         now = datetime.now(pytz.timezone(timezone))
179         at_time = datetime(now.year, now.month, now.day,
180                            int(hour), int(minute), int(second),
181                            tzinfo=now.tzinfo)
182         timediff = at_time - now
183     else:
184         if tz and tz.upper() != 'UTC':
185             bot.reply("I don't have timzeone support installed.")
186             return NOLIMIT
187         now = datetime.now()
188         at_time = datetime(now.year, now.month, now.day,
189                            int(hour), int(minute), int(second))
190         timediff = at_time - now
191 
192     duration = timediff.seconds
193 
194     if duration < 0:
195         duration += 86400
196     create_reminder(bot, trigger, duration, message, 'UTC')
197 
198 
199 def create_reminder(bot, trigger, duration, message, tz):
200     t = int(time.time()) + duration
201     reminder = (trigger.sender, trigger.nick, message)
202     try:
203         bot.rdb[t].append(reminder)
204     except KeyError:
205         bot.rdb[t] = [reminder]
206 
207     dump_database(bot.rfn, bot.rdb)
208 
209     if duration >= 60:
210         remind_at = datetime.utcfromtimestamp(t)
211         timef = format_time(bot.db, bot.config, tz, trigger.nick,
212                             trigger.sender, remind_at)
213 
214         bot.reply('Okay, will remind at %s' % timef)
215     else:
216         bot.reply('Okay, will remind in %s secs' % duration)
217
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/sopel/modules/remind.py b/sopel/modules/remind.py
--- a/sopel/modules/remind.py
+++ b/sopel/modules/remind.py
@@ -126,6 +126,12 @@
 @example('.in 3h45m Go to class')
 def remind(bot, trigger):
     """Gives you a reminder in the given amount of time."""
+    if not trigger.group(2):
+        bot.say("Missing arguments for reminder command.")
+        return NOLIMIT
+    if trigger.group(3) and not trigger.group(4):
+        bot.say("No message given for reminder.")
+        return NOLIMIT
     duration = 0
     message = filter(None, re.split('(\d+(?:\.\d+)? ?(?:(?i)' + periods + ')) ?',
                                     trigger.group(2))[1:])
@@ -161,6 +167,12 @@
     are those from the tzdb; a list of valid options is available at
     http://dft.ba/-tz . The seconds and timezone are optional.
     """
+    if not trigger.group(2):
+        bot.say("No arguments given for reminder command.")
+        return NOLIMIT
+    if trigger.group(3) and not trigger.group(4):
+        bot.say("No message given for reminder.")
+        return NOLIMIT
     regex = re.compile(r'(\d+):(\d+)(?::(\d+))?([^\s\d]+)? (.*)')
     match = regex.match(trigger.group(2))
     if not match:

{"golden_diff": "diff --git a/sopel/modules/remind.py b/sopel/modules/remind.py\n--- a/sopel/modules/remind.py\n+++ b/sopel/modules/remind.py\n@@ -126,6 +126,12 @@\n @example('.in 3h45m Go to class')\n def remind(bot, trigger):\n     \"\"\"Gives you a reminder in the given amount of time.\"\"\"\n+    if not trigger.group(2):\n+        bot.say(\"Missing arguments for reminder command.\")\n+        return NOLIMIT\n+    if trigger.group(3) and not trigger.group(4):\n+        bot.say(\"No message given for reminder.\")\n+        return NOLIMIT\n     duration = 0\n     message = filter(None, re.split('(\\d+(?:\\.\\d+)? ?(?:(?i)' + periods + ')) ?',\n                                     trigger.group(2))[1:])\n@@ -161,6 +167,12 @@\n     are those from the tzdb; a list of valid options is available at\n     http://dft.ba/-tz . The seconds and timezone are optional.\n     \"\"\"\n+    if not trigger.group(2):\n+        bot.say(\"No arguments given for reminder command.\")\n+        return NOLIMIT\n+    if trigger.group(3) and not trigger.group(4):\n+        bot.say(\"No message given for reminder.\")\n+        return NOLIMIT\n     regex = re.compile(r'(\\d+):(\\d+)(?::(\\d+))?([^\\s\\d]+)? (.*)')\n     match = regex.match(trigger.group(2))\n     if not match:\n", "issue": ".at without an argument gives TypeError\n```\n<embolalia> .at\n<Sopel> TypeError: expected string or buffer (file \"/opt/rh/python33/root/usr/lib/python3.3/site-packages/sopel/modules/remind.py\", line 165, in at)\n```\n\n.at without an argument gives TypeError\n```\n<embolalia> .at\n<Sopel> TypeError: expected string or buffer (file \"/opt/rh/python33/root/usr/lib/python3.3/site-packages/sopel/modules/remind.py\", line 165, in at)\n```\n\n", "before_files": [{"content": "# coding=utf8\n\"\"\"\nremind.py - Sopel Reminder Module\nCopyright 2011, Sean B. Palmer, inamidst.com\nLicensed under the Eiffel Forum License 2.\n\nhttp://sopel.chat\n\"\"\"\nfrom __future__ import unicode_literals\n\nimport os\nimport re\nimport time\nimport threading\nimport collections\nimport codecs\nfrom datetime import datetime\nfrom sopel.module import commands, example, NOLIMIT\nimport sopel.tools\nfrom sopel.tools.time import get_timezone, format_time\n\ntry:\n    import pytz\nexcept:\n    pytz = None\n\n\ndef filename(self):\n    name = self.nick + '-' + self.config.core.host + '.reminders.db'\n    return os.path.join(self.config.core.homedir, name)\n\n\ndef load_database(name):\n    data = {}\n    if os.path.isfile(name):\n        f = codecs.open(name, 'r', encoding='utf-8')\n        for line in f:\n            unixtime, channel, nick, message = line.split('\\t')\n            message = message.rstrip('\\n')\n            t = int(float(unixtime))  # WTFs going on here?\n            reminder = (channel, nick, message)\n            try:\n                data[t].append(reminder)\n            except KeyError:\n                data[t] = [reminder]\n        f.close()\n    return data\n\n\ndef dump_database(name, data):\n    f = codecs.open(name, 'w', encoding='utf-8')\n    for unixtime, reminders in sopel.tools.iteritems(data):\n        for channel, nick, message in reminders:\n            f.write('%s\\t%s\\t%s\\t%s\\n' % (unixtime, channel, nick, message))\n    f.close()\n\n\ndef setup(bot):\n    bot.rfn = filename(bot)\n    bot.rdb = load_database(bot.rfn)\n\n    def monitor(bot):\n        time.sleep(5)\n        while True:\n            now = int(time.time())\n            unixtimes = [int(key) for key in bot.rdb]\n            oldtimes = [t for t in unixtimes if t <= now]\n            if oldtimes:\n                for oldtime in oldtimes:\n                    for (channel, nick, message) in bot.rdb[oldtime]:\n                        if message:\n                            bot.msg(channel, nick + ': ' + message)\n                        else:\n                            bot.msg(channel, nick + '!')\n                    del bot.rdb[oldtime]\n                dump_database(bot.rfn, bot.rdb)\n            time.sleep(2.5)\n\n    targs = (bot,)\n    t = threading.Thread(target=monitor, args=targs)\n    t.start()\n\nscaling = collections.OrderedDict([\n    ('years', 365.25 * 24 * 3600),\n    ('year', 365.25 * 24 * 3600),\n    ('yrs', 365.25 * 24 * 3600),\n    ('y', 365.25 * 24 * 3600),\n\n    ('months', 29.53059 * 24 * 3600),\n    ('month', 29.53059 * 24 * 3600),\n    ('mo', 29.53059 * 24 * 3600),\n\n    ('weeks', 7 * 24 * 3600),\n    ('week', 7 * 24 * 3600),\n    ('wks', 7 * 24 * 3600),\n    ('wk', 7 * 24 * 3600),\n    ('w', 7 * 24 * 3600),\n\n    ('days', 24 * 3600),\n    ('day', 24 * 3600),\n    ('d', 24 * 3600),\n\n    ('hours', 3600),\n    ('hour', 3600),\n    ('hrs', 3600),\n    ('hr', 3600),\n    ('h', 3600),\n\n    ('minutes', 60),\n    ('minute', 60),\n    ('mins', 60),\n    ('min', 60),\n    ('m', 60),\n\n    ('seconds', 1),\n    ('second', 1),\n    ('secs', 1),\n    ('sec', 1),\n    ('s', 1),\n])\n\nperiods = '|'.join(scaling.keys())\n\n\n@commands('in')\n@example('.in 3h45m Go to class')\ndef remind(bot, trigger):\n    \"\"\"Gives you a reminder in the given amount of time.\"\"\"\n    duration = 0\n    message = filter(None, re.split('(\\d+(?:\\.\\d+)? ?(?:(?i)' + periods + ')) ?',\n                                    trigger.group(2))[1:])\n    reminder = ''\n    stop = False\n    for piece in message:\n        grp = re.match('(\\d+(?:\\.\\d+)?) ?(.*) ?', piece)\n        if grp and not stop:\n            length = float(grp.group(1))\n            factor = scaling.get(grp.group(2).lower(), 60)\n            duration += length * factor\n        else:\n            reminder = reminder + piece\n            stop = True\n    if duration == 0:\n        return bot.reply(\"Sorry, didn't understand the input.\")\n\n    if duration % 1:\n        duration = int(duration) + 1\n    else:\n        duration = int(duration)\n    timezone = get_timezone(\n        bot.db, bot.config, None, trigger.nick, trigger.sender)\n    create_reminder(bot, trigger, duration, reminder, timezone)\n\n\n@commands('at')\n@example('.at 13:47 Do your homework!')\ndef at(bot, trigger):\n    \"\"\"\n    Gives you a reminder at the given time. Takes hh:mm:ssTimezone\n    message. Timezone is any timezone Sopel takes elsewhere; the best choices\n    are those from the tzdb; a list of valid options is available at\n    http://dft.ba/-tz . The seconds and timezone are optional.\n    \"\"\"\n    regex = re.compile(r'(\\d+):(\\d+)(?::(\\d+))?([^\\s\\d]+)? (.*)')\n    match = regex.match(trigger.group(2))\n    if not match:\n        bot.reply(\"Sorry, but I didn't understand your input.\")\n        return NOLIMIT\n    hour, minute, second, tz, message = match.groups()\n    if not second:\n        second = '0'\n\n    if pytz:\n        timezone = get_timezone(bot.db, bot.config, tz,\n                                trigger.nick, trigger.sender)\n        if not timezone:\n            timezone = 'UTC'\n        now = datetime.now(pytz.timezone(timezone))\n        at_time = datetime(now.year, now.month, now.day,\n                           int(hour), int(minute), int(second),\n                           tzinfo=now.tzinfo)\n        timediff = at_time - now\n    else:\n        if tz and tz.upper() != 'UTC':\n            bot.reply(\"I don't have timzeone support installed.\")\n            return NOLIMIT\n        now = datetime.now()\n        at_time = datetime(now.year, now.month, now.day,\n                           int(hour), int(minute), int(second))\n        timediff = at_time - now\n\n    duration = timediff.seconds\n\n    if duration < 0:\n        duration += 86400\n    create_reminder(bot, trigger, duration, message, 'UTC')\n\n\ndef create_reminder(bot, trigger, duration, message, tz):\n    t = int(time.time()) + duration\n    reminder = (trigger.sender, trigger.nick, message)\n    try:\n        bot.rdb[t].append(reminder)\n    except KeyError:\n        bot.rdb[t] = [reminder]\n\n    dump_database(bot.rfn, bot.rdb)\n\n    if duration >= 60:\n        remind_at = datetime.utcfromtimestamp(t)\n        timef = format_time(bot.db, bot.config, tz, trigger.nick,\n                            trigger.sender, remind_at)\n\n        bot.reply('Okay, will remind at %s' % timef)\n    else:\n        bot.reply('Okay, will remind in %s secs' % duration)\n", "path": "sopel/modules/remind.py"}], "after_files": [{"content": "# coding=utf8\n\"\"\"\nremind.py - Sopel Reminder Module\nCopyright 2011, Sean B. Palmer, inamidst.com\nLicensed under the Eiffel Forum License 2.\n\nhttp://sopel.chat\n\"\"\"\nfrom __future__ import unicode_literals\n\nimport os\nimport re\nimport time\nimport threading\nimport collections\nimport codecs\nfrom datetime import datetime\nfrom sopel.module import commands, example, NOLIMIT\nimport sopel.tools\nfrom sopel.tools.time import get_timezone, format_time\n\ntry:\n    import pytz\nexcept:\n    pytz = None\n\n\ndef filename(self):\n    name = self.nick + '-' + self.config.core.host + '.reminders.db'\n    return os.path.join(self.config.core.homedir, name)\n\n\ndef load_database(name):\n    data = {}\n    if os.path.isfile(name):\n        f = codecs.open(name, 'r', encoding='utf-8')\n        for line in f:\n            unixtime, channel, nick, message = line.split('\\t')\n            message = message.rstrip('\\n')\n            t = int(float(unixtime))  # WTFs going on here?\n            reminder = (channel, nick, message)\n            try:\n                data[t].append(reminder)\n            except KeyError:\n                data[t] = [reminder]\n        f.close()\n    return data\n\n\ndef dump_database(name, data):\n    f = codecs.open(name, 'w', encoding='utf-8')\n    for unixtime, reminders in sopel.tools.iteritems(data):\n        for channel, nick, message in reminders:\n            f.write('%s\\t%s\\t%s\\t%s\\n' % (unixtime, channel, nick, message))\n    f.close()\n\n\ndef setup(bot):\n    bot.rfn = filename(bot)\n    bot.rdb = load_database(bot.rfn)\n\n    def monitor(bot):\n        time.sleep(5)\n        while True:\n            now = int(time.time())\n            unixtimes = [int(key) for key in bot.rdb]\n            oldtimes = [t for t in unixtimes if t <= now]\n            if oldtimes:\n                for oldtime in oldtimes:\n                    for (channel, nick, message) in bot.rdb[oldtime]:\n                        if message:\n                            bot.msg(channel, nick + ': ' + message)\n                        else:\n                            bot.msg(channel, nick + '!')\n                    del bot.rdb[oldtime]\n                dump_database(bot.rfn, bot.rdb)\n            time.sleep(2.5)\n\n    targs = (bot,)\n    t = threading.Thread(target=monitor, args=targs)\n    t.start()\n\nscaling = collections.OrderedDict([\n    ('years', 365.25 * 24 * 3600),\n    ('year', 365.25 * 24 * 3600),\n    ('yrs', 365.25 * 24 * 3600),\n    ('y', 365.25 * 24 * 3600),\n\n    ('months', 29.53059 * 24 * 3600),\n    ('month', 29.53059 * 24 * 3600),\n    ('mo', 29.53059 * 24 * 3600),\n\n    ('weeks', 7 * 24 * 3600),\n    ('week', 7 * 24 * 3600),\n    ('wks', 7 * 24 * 3600),\n    ('wk', 7 * 24 * 3600),\n    ('w', 7 * 24 * 3600),\n\n    ('days', 24 * 3600),\n    ('day', 24 * 3600),\n    ('d', 24 * 3600),\n\n    ('hours', 3600),\n    ('hour', 3600),\n    ('hrs', 3600),\n    ('hr', 3600),\n    ('h', 3600),\n\n    ('minutes', 60),\n    ('minute', 60),\n    ('mins', 60),\n    ('min', 60),\n    ('m', 60),\n\n    ('seconds', 1),\n    ('second', 1),\n    ('secs', 1),\n    ('sec', 1),\n    ('s', 1),\n])\n\nperiods = '|'.join(scaling.keys())\n\n\n@commands('in')\n@example('.in 3h45m Go to class')\ndef remind(bot, trigger):\n    \"\"\"Gives you a reminder in the given amount of time.\"\"\"\n    if not trigger.group(2):\n        bot.say(\"Missing arguments for reminder command.\")\n        return NOLIMIT\n    if trigger.group(3) and not trigger.group(4):\n        bot.say(\"No message given for reminder.\")\n        return NOLIMIT\n    duration = 0\n    message = filter(None, re.split('(\\d+(?:\\.\\d+)? ?(?:(?i)' + periods + ')) ?',\n                                    trigger.group(2))[1:])\n    reminder = ''\n    stop = False\n    for piece in message:\n        grp = re.match('(\\d+(?:\\.\\d+)?) ?(.*) ?', piece)\n        if grp and not stop:\n            length = float(grp.group(1))\n            factor = scaling.get(grp.group(2).lower(), 60)\n            duration += length * factor\n        else:\n            reminder = reminder + piece\n            stop = True\n    if duration == 0:\n        return bot.reply(\"Sorry, didn't understand the input.\")\n\n    if duration % 1:\n        duration = int(duration) + 1\n    else:\n        duration = int(duration)\n    timezone = get_timezone(\n        bot.db, bot.config, None, trigger.nick, trigger.sender)\n    create_reminder(bot, trigger, duration, reminder, timezone)\n\n\n@commands('at')\n@example('.at 13:47 Do your homework!')\ndef at(bot, trigger):\n    \"\"\"\n    Gives you a reminder at the given time. Takes hh:mm:ssTimezone\n    message. Timezone is any timezone Sopel takes elsewhere; the best choices\n    are those from the tzdb; a list of valid options is available at\n    http://dft.ba/-tz . The seconds and timezone are optional.\n    \"\"\"\n    if not trigger.group(2):\n        bot.say(\"No arguments given for reminder command.\")\n        return NOLIMIT\n    if trigger.group(3) and not trigger.group(4):\n        bot.say(\"No message given for reminder.\")\n        return NOLIMIT\n    regex = re.compile(r'(\\d+):(\\d+)(?::(\\d+))?([^\\s\\d]+)? (.*)')\n    match = regex.match(trigger.group(2))\n    if not match:\n        bot.reply(\"Sorry, but I didn't understand your input.\")\n        return NOLIMIT\n    hour, minute, second, tz, message = match.groups()\n    if not second:\n        second = '0'\n\n    if pytz:\n        timezone = get_timezone(bot.db, bot.config, tz,\n                                trigger.nick, trigger.sender)\n        if not timezone:\n            timezone = 'UTC'\n        now = datetime.now(pytz.timezone(timezone))\n        at_time = datetime(now.year, now.month, now.day,\n                           int(hour), int(minute), int(second),\n                           tzinfo=now.tzinfo)\n        timediff = at_time - now\n    else:\n        if tz and tz.upper() != 'UTC':\n            bot.reply(\"I don't have timzeone support installed.\")\n            return NOLIMIT\n        now = datetime.now()\n        at_time = datetime(now.year, now.month, now.day,\n                           int(hour), int(minute), int(second))\n        timediff = at_time - now\n\n    duration = timediff.seconds\n\n    if duration < 0:\n        duration += 86400\n    create_reminder(bot, trigger, duration, message, 'UTC')\n\n\ndef create_reminder(bot, trigger, duration, message, tz):\n    t = int(time.time()) + duration\n    reminder = (trigger.sender, trigger.nick, message)\n    try:\n        bot.rdb[t].append(reminder)\n    except KeyError:\n        bot.rdb[t] = [reminder]\n\n    dump_database(bot.rfn, bot.rdb)\n\n    if duration >= 60:\n        remind_at = datetime.utcfromtimestamp(t)\n        timef = format_time(bot.db, bot.config, tz, trigger.nick,\n                            trigger.sender, remind_at)\n\n        bot.reply('Okay, will remind at %s' % timef)\n    else:\n        bot.reply('Okay, will remind in %s secs' % duration)\n", "path": "sopel/modules/remind.py"}]}