diff --git a/discordbot/__init__.py b/discordbot/__init__.py index e0255f2..f62e780 100644 --- a/discordbot/__init__.py +++ b/discordbot/__init__.py @@ -12,7 +12,7 @@ from protondb import searhProtonDb class DiscordBot(discord.Client): async def on_ready(self): - logging.info(f'Logged in as {self.user} (ID: {self.user.id})') + logging.info(f'Connecté en tant que {self.user} (ID: {self.user.id})') for c in self.get_all_channels() : logging.info(f'{c.id} {c.name}') @@ -25,7 +25,7 @@ class DiscordBot(discord.Client): if len(humeurs)>0 : humeur = random.choice(humeurs) if humeur != None: - logging.info(f'changement de status {humeur.text}') + logging.info(f'Changement de statut : {humeur.text}') await self.change_presence(status = discord.Status.online, activity = discord.CustomActivity(humeur.text)) # 10 minutes TODO à rendre configurable await asyncio.sleep(10*60) @@ -33,7 +33,7 @@ class DiscordBot(discord.Client): async def updateHumbleBundle(self): while not self.is_closed(): await checkHumbleBundleAndNotify(self) - # toute les 30 minutes + # toutes les 30 minutes await asyncio.sleep(30*60) def begin(self) : @@ -41,7 +41,7 @@ class DiscordBot(discord.Client): if token : self.run(token.value) else : - logging.error('pas de token on ne lance pas discord') + logging.error('Pas de token, on ne lance pas Discord') intents = discord.Intents.default() intents.message_content = True diff --git a/protondb/__init__.py b/protondb/__init__.py index d165593..8b4c963 100644 --- a/protondb/__init__.py +++ b/protondb/__init__.py @@ -54,10 +54,10 @@ def searhProtonDb(search_name:str): 'name' : name, 'tier' : tier }) - logging.info(f'found {name}({id} : {tier}') + logging.info(f'Trouvé {name}({id}) : {tier}') except Exception as e: logging.error(f'error on {name}({id}): {e}') else: - logging.info(f'{name}({id} ne contient pas {search_name})') + logging.info(f'{name}({id}) ne contient pas {search_name}') return results diff --git a/run-web.py b/run-web.py index 354d024..b865860 100644 --- a/run-web.py +++ b/run-web.py @@ -8,17 +8,17 @@ from twitchbot import twitchBot def start_server(): - logging.info("Start Web Serveur") + logging.info("Démarrage du serveur web") from waitress import serve serve(webapp, host="0.0.0.0", port=5000) def start_discord_bot(): - logging.info("Start Discord Bot") + logging.info("Démarrage du bot Discord") with webapp.app_context(): bot.begin() def start_twitch_bot(): - logging.info("Start Twitch Bot") + logging.info("Démarrage du bot Twitch") with webapp.app_context(): twitchBot.begin() diff --git a/twitchbot/__init__.py b/twitchbot/__init__.py index 963c1d7..ea1fa01 100644 --- a/twitchbot/__init__.py +++ b/twitchbot/__init__.py @@ -13,14 +13,14 @@ from webapp import webapp USER_SCOPE = [AuthScope.CHAT_READ, AuthScope.CHAT_EDIT] async def _onReady(ready_event: EventData): - logging.info('Twitch bot ready') + logging.info('Bot Twitch prêt') with webapp.app_context(): await ready_event.chat.join_room(ConfigurationHelper().getValue('twitch_channel')) async def _onMessage(msg: ChatMessage): - logging.info(f'in {msg.room.name}, {msg.user.name} said: {msg.text}') + logging.info(f'Dans {msg.room.name}, {msg.user.name} a dit : {msg.text}') -# commande qui repond "bonjour" a "!hello" +# commande qui répond "bonjour" à "!hello" async def _helloCommand(msg: ChatMessage): await msg.reply(f'Bonjour {msg.user.name}') @@ -43,12 +43,12 @@ class TwitchBot() : self.chat.register_command('hello', _helloCommand) self.chat.start() else: - logging.info("Twitch is not configured") + logging.info("Twitch n'est pas configuré") def begin(self): asyncio.run(self._connect()) - # je sais pas encore comment appeller ca + # je ne sais pas encore comment appeler ça async def _close(self): self.chat.stop() await self.twitch.close() diff --git a/webapp/configurations.py b/webapp/configurations.py index 5578e3e..691629a 100644 --- a/webapp/configurations.py +++ b/webapp/configurations.py @@ -17,7 +17,7 @@ def openConfigurations(): def updateConfiguration(): for key in request.form : ConfigurationHelper().createOrUpdate(key, request.form.get(key)) - # Je fait ca car html n'envoi pas le parametre de checkbox quand il est décoché + # Je fais ça car HTML n'envoie pas le paramètre de checkbox quand il est décoché if (request.form.get("humble_bundle_channel") != None and request.form.get("humble_bundle_enable") == None) : ConfigurationHelper().createOrUpdate('humble_bundle_enable', False) if (request.form.get("proton_db_api_id") != None and request.form.get("proton_db_enable_enable") == None) : diff --git a/webapp/templates/protondb.html b/webapp/templates/protondb.html index 35620d0..319329e 100644 --- a/webapp/templates/protondb.html +++ b/webapp/templates/protondb.html @@ -2,6 +2,7 @@ {% block content %}

Proton DB

+

ProtonDB évalue la compatibilité des jeux Windows sur Linux via Steam Play. Les alias permettent de simplifier les recherches (ex: "GTA" → "Grand Theft Auto").

Game alias