Selaa lähdekoodia

Capitalise replies in everything else in one commit because Earwig

tags/v0.1^2
Justin Yulli Kim 12 vuotta sitten
vanhempi
commit
c7675b2bbf
6 muutettua tiedostoa jossa 15 lisäystä ja 15 poistoa
  1. +1
    -1
      earwigbot/commands/registration.py
  2. +3
    -3
      earwigbot/commands/remind.py
  3. +2
    -2
      earwigbot/commands/rights.py
  4. +1
    -1
      earwigbot/commands/test.py
  5. +6
    -6
      earwigbot/commands/threads.py
  6. +2
    -2
      earwigbot/commands/time.py

+ 1
- 1
earwigbot/commands/registration.py Näytä tiedosto

@@ -42,7 +42,7 @@ class Registration(Command):
try:
reg = user.registration
except exceptions.UserNotFoundError:
msg = "the user \x0302{0}\x0F does not exist."
msg = "The user \x0302{0}\x0F does not exist."
self.reply(data, msg.format(name))
return



+ 3
- 3
earwigbot/commands/remind.py Näytä tiedosto

@@ -32,19 +32,19 @@ class Remind(Command):

def process(self, data):
if not data.args:
msg = "please specify a time (in seconds) and a message in the following format: !remind <time> <msg>."
msg = "Please specify a time (in seconds) and a message in the following format: !remind <time> <msg>."
self.reply(data, msg)
return

try:
wait = int(data.args[0])
except ValueError:
msg = "the time must be given as an integer, in seconds."
msg = "The time must be given as an integer, in seconds."
self.reply(data, msg)
return
message = ' '.join(data.args[1:])
if not message:
msg = "what message do you want me to give you when time is up?"
msg = "What message do you want me to give you when time is up?"
self.reply(data, msg)
return



+ 2
- 2
earwigbot/commands/rights.py Näytä tiedosto

@@ -40,7 +40,7 @@ class Rights(Command):
try:
rights = user.groups
except exceptions.UserNotFoundError:
msg = "the user \x0302{0}\x0F does not exist."
msg = "The user \x0302{0}\x0F does not exist."
self.reply(data, msg.format(name))
return

@@ -48,5 +48,5 @@ class Rights(Command):
rights.remove("*") # Remove the '*' group given to everyone
except ValueError:
pass
msg = "the rights for \x0302{0}\x0F are {1}."
msg = "The rights for \x0302{0}\x0F are {1}."
self.reply(data, msg.format(name, ', '.join(rights)))

+ 1
- 1
earwigbot/commands/test.py Näytä tiedosto

@@ -34,4 +34,4 @@ class Test(Command):
if hey:
self.say(data.chan, "Hey {0}!".format(user))
else:
self.say(data.chan, "'sup {0}?".format(user))
self.say(data.chan, "'Sup {0}?".format(user))

+ 6
- 6
earwigbot/commands/threads.py Näytä tiedosto

@@ -33,7 +33,7 @@ class Threads(Command):
def process(self, data):
self.data = data
if data.host not in self.config.irc["permissions"]["owners"]:
msg = "you must be a bot owner to use this command."
msg = "You must be a bot owner to use this command."
self.reply(data, msg)
return

@@ -41,7 +41,7 @@ class Threads(Command):
if data.command == "tasklist":
self.do_list()
else:
msg = "no arguments provided. Maybe you wanted '!{0} list', '!{0} start', or '!{0} listall'?"
msg = "No arguments provided. Maybe you wanted '!{0} list', '!{0} start', or '!{0} listall'?"
self.reply(data, msg.format(data.command))
return

@@ -55,7 +55,7 @@ class Threads(Command):
self.do_listall()

else: # They asked us to do something we don't know
msg = "unknown argument: \x0303{0}\x0F.".format(data.args[0])
msg = "Unknown argument: \x0303{0}\x0F.".format(data.args[0])
self.reply(data, msg)

def do_list(self):
@@ -128,16 +128,16 @@ class Threads(Command):
try:
task_name = data.args[1]
except IndexError: # No task name given
self.reply(data, "what task do you want me to start?")
self.reply(data, "What task do you want me to start?")
return

if task_name not in [task.name for task in self.bot.tasks]:
# This task does not exist or hasn't been loaded:
msg = "task could not be found; either it doesn't exist, or it wasn't loaded correctly."
msg = "Task could not be found; either it doesn't exist, or it wasn't loaded correctly."
self.reply(data, msg.format(task_name))
return

data.kwargs["fromIRC"] = True
self.bot.tasks.start(task_name, **data.kwargs)
msg = "task \x0302{0}\x0F started.".format(task_name)
msg = "Task \x0302{0}\x0F started.".format(task_name)
self.reply(data, msg)

+ 2
- 2
earwigbot/commands/time.py Näytä tiedosto

@@ -56,13 +56,13 @@ class Time(Command):

def do_time(self, data, timezone):
if not pytz:
msg = "this command requires the 'pytz' module: http://pytz.sourceforge.net/"
msg = "This command requires the 'pytz' module: http://pytz.sourceforge.net/"
self.reply(data, msg)
return
try:
tzinfo = pytz.timezone(timezone)
except pytz.exceptions.UnknownTimeZoneError:
self.reply(data, "unknown timezone: {0}.".format(timezone))
self.reply(data, "Unknown timezone: {0}.".format(timezone))
return
now = pytz.utc.localize(datetime.utcnow()).astimezone(tzinfo)
self.reply(data, now.strftime("%Y-%m-%d %H:%M:%S %Z"))

Ladataan…
Peruuta
Tallenna