Allow running as webhook
This commit is contained in:
parent
18ff1ad84e
commit
e35bf55b53
@ -3,6 +3,6 @@
|
|||||||
__author__ = "Davide Testa"
|
__author__ = "Davide Testa"
|
||||||
__email__ = "davide@davte.it"
|
__email__ = "davide@davte.it"
|
||||||
__license__ = "GNU General Public License v3.0"
|
__license__ = "GNU General Public License v3.0"
|
||||||
__version__ = "1.0.5"
|
__version__ = "1.0.6"
|
||||||
__maintainer__ = "Davide Testa"
|
__maintainer__ = "Davide Testa"
|
||||||
__contact__ = "t.me/davte"
|
__contact__ = "t.me/davte"
|
||||||
|
@ -70,6 +70,10 @@ if __name__ == '__main__':
|
|||||||
from .data.config import local_host, port
|
from .data.config import local_host, port
|
||||||
except ImportError:
|
except ImportError:
|
||||||
local_host, port = '127.0.0.1', 3000
|
local_host, port = '127.0.0.1', 3000
|
||||||
|
try:
|
||||||
|
from .data.config import hostname, certificate
|
||||||
|
except ImportError:
|
||||||
|
hostname, certificate = '', None
|
||||||
log_file = f"{path}/data/{log_file_name}"
|
log_file = f"{path}/data/{log_file_name}"
|
||||||
errors_file = f"{path}/data/{errors_file_name}"
|
errors_file = f"{path}/data/{errors_file_name}"
|
||||||
|
|
||||||
@ -100,7 +104,8 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
# Instantiate bot
|
# Instantiate bot
|
||||||
bot = davtelepot.bot.Bot(token=bot_token,
|
bot = davtelepot.bot.Bot(token=bot_token,
|
||||||
database_url='ciclopibot/data/ciclopi.db')
|
database_url='ciclopibot/data/ciclopi.db',
|
||||||
|
hostname=hostname, certificate=certificate)
|
||||||
# Assign commands to bot
|
# Assign commands to bot
|
||||||
bot.set_unknown_command_message(
|
bot.set_unknown_command_message(
|
||||||
"Comando sconosciuto!\n"
|
"Comando sconosciuto!\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user