mirror of
https://github.com/NoiTheCat/WorldTime.git
synced 2024-11-21 22:34:36 +00:00
Update DM message; switch to AutoShardedClient
This commit is contained in:
parent
2441746d3b
commit
dbec6309a8
2 changed files with 3 additions and 3 deletions
|
@ -9,7 +9,7 @@ import settings
|
||||||
from userdb import UserDatabase
|
from userdb import UserDatabase
|
||||||
from commands import WtCommands
|
from commands import WtCommands
|
||||||
|
|
||||||
class WorldTime(discord.Client):
|
class WorldTime(discord.AutoShardedClient):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
self.userdb = UserDatabase(settings.PgConnectionString)
|
self.userdb = UserDatabase(settings.PgConnectionString)
|
||||||
|
@ -37,7 +37,7 @@ class WorldTime(discord.Client):
|
||||||
|
|
||||||
async def respond_dm(self, message):
|
async def respond_dm(self, message):
|
||||||
logPrint('Incoming DM', '{0}: {1}'.format(message.author, message.content.replace('\n', '\\n')))
|
logPrint('Incoming DM', '{0}: {1}'.format(message.author, message.content.replace('\n', '\\n')))
|
||||||
await message.channel.send('''I don't work over DM. :frowning: Only in a server.''')
|
await message.channel.send('''I don't work over DM. Refer to the `tz.help` command when in a server.''')
|
||||||
|
|
||||||
# ----------------
|
# ----------------
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import pytz
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
# Bot's current version (as a string), for use in the help command
|
# Bot's current version (as a string), for use in the help command
|
||||||
BotVersion = "1.3.0"
|
BotVersion = "1.3.1"
|
||||||
|
|
||||||
# For case-insensitive time zone lookup, map lowercase tzdata entries with
|
# For case-insensitive time zone lookup, map lowercase tzdata entries with
|
||||||
# entires with proper case. pytz is case sensitive.
|
# entires with proper case. pytz is case sensitive.
|
||||||
|
|
Loading…
Reference in a new issue