mirror of
https://github.com/skylanix/MamieHenriette.git
synced 2026-02-06 14:50:34 +01:00
le bot se connect et repond à \!hello
This commit is contained in:
14
run-web.py
14
run-web.py
@@ -2,9 +2,9 @@ import locale
|
||||
import logging
|
||||
import threading
|
||||
|
||||
from discordbot import bot
|
||||
from webapp import webapp
|
||||
# from twitchbot import twitchBot
|
||||
from discordbot import bot
|
||||
from twitchbot import twitchBot
|
||||
|
||||
|
||||
def start_server():
|
||||
@@ -17,10 +17,10 @@ def start_discord_bot():
|
||||
with webapp.app_context():
|
||||
bot.begin()
|
||||
|
||||
# def start_twitch_bot():
|
||||
# logging.info("Start Twitch Bot")
|
||||
# with webapp.app_context():
|
||||
# twitchBot.begin()
|
||||
def start_twitch_bot():
|
||||
logging.info("Start Twitch Bot")
|
||||
with webapp.app_context():
|
||||
twitchBot.begin()
|
||||
|
||||
if __name__ == '__main__':
|
||||
locale.setlocale(locale.LC_TIME, 'fr_FR.UTF-8')
|
||||
@@ -28,7 +28,7 @@ if __name__ == '__main__':
|
||||
jobs = []
|
||||
jobs.append(threading.Thread(target=start_discord_bot))
|
||||
jobs.append(threading.Thread(target=start_server))
|
||||
# jobs.append(threading.Thread(target=start_twitch_bot))
|
||||
jobs.append(threading.Thread(target=start_twitch_bot))
|
||||
|
||||
for job in jobs: job.start()
|
||||
for job in jobs: job.join()
|
||||
|
||||
Reference in New Issue
Block a user