/
settings.py
61 lines (48 loc) · 1.32 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# -*- coding: utf-8 -*-
import os
DEBUG = False
PLUGINS = [
'slackbot.plugins',
]
ERRORS_TO = None
'''
Setup timeout for slacker API requests (e.g. uploading a file).
'''
TIMEOUT = 100
# API_TOKEN = '###token###'
'''
Setup a comma delimited list of aliases that the bot will respond to.
Example: if you set ALIASES='!,$' then a bot which would respond to:
'botname hello'
will now also respond to
'$ hello'
'''
ALIASES = ''
'''
If you use Slack Web API to send messages (with
send_webapi(text, as_user=False) or reply_webapi(text, as_user=False)),
you can customize the bot logo by providing Icon or Emoji. If you use Slack
RTM API to send messages (with send() or reply()), or if as_user is True
(default), the used icon comes from bot settings and Icon or Emoji has no
effect.
'''
# BOT_ICON = 'http://lorempixel.com/64/64/abstract/7/'
# BOT_EMOJI = ':godmode:'
'''Specify a different reply when the bot is messaged with no matching cmd'''
DEFAULT_REPLY = None
for key in os.environ:
if key[:9] == 'SLACKBOT_':
name = key[9:]
globals()[name] = os.environ[key]
try:
from slackbot_settings import *
except ImportError:
try:
from local_settings import *
except ImportError:
pass
# convert default_reply to DEFAULT_REPLY
try:
DEFAULT_REPLY = default_reply
except NameError:
pass