Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

If you are reading this on GitHub, you may consider switching to the docs to benefit Sphinx internal links to Python objects: https://lg-rez.readthedocs.io/fr/2.2.0/changelog.html

2.4.4 - 2022-05-27

Fixed

  • features.sync.process_mort() boudoir transfer selected dead player;

  • Small formatting problem with !cancel.

2.4.3 - 2022-05-26

Fixed

  • features.sync.process_mort() crashed if dead player was gerant of boudoirs, disallowing sync of dead players;

  • !planif crashed for dates in the past;

  • !mp crashed if combined names were > 32 characters long;

  • !refill crashed if only one action was refillable;

  • blocs.tools.mention_MJ() always returned a role mention.

2.4.2 - 2022-05-01

Fixed

  • server_structure.json was not included in package data;

  • Minimal Python version was not updated (must be >=3.10 since 2.4).

2.4.1 - 2022-04-17

Fixed

  • Fix dependency conflicts;

  • ReadTheDocs could not compile due to multiple problems;

  • Missed doc for new module blocs.structure.

2.4.0 - 2022-04-17

Added

  • Server automatic setup (guild, channels, roles, emojis…):

  • Remind to enable Dashboard backup Google Apps trigger in !cparti;

  • Put role name in player’s private chan topic on role sync;

  • New subcommands !boudoir find and !boudoir help;

  • New command !mp to easily create a boudoir with some other player;

  • New command !cfini to automatically delete tasks at game end;

  • New command !nextroll.

Changed

  • Boudoirs are now transferred to most ancient member when owner dies;

  • A cross mark is now added to boudoir name when moved to cemetery;

  • !refill: now ask to chose action (if > 1) instead of refilling all;

  • !lore: better handle of players mentions (1 to 4 words);

  • !planif: now planif to tomorrow if past date (rather that instant);

  • !cancel: now directly cancels (no confirmation), but show command to type to re-planif task;

  • features.gestion_actions.add_action() now creates action only if not already existing (changed signature: now takes action parameters);

  • Bumped packages dependencies.

Fixed

2.3.2 - 2021-11-11

Changed

  • When a player is removed from / added to a boudoir, the boudoir is automatically sent to / from the boudoirs cemetery;

  • !roll now has limitations to avoid bot overloading by huge rolls; new special values ludopathe and tavernier.

Fixed

  • Automatic archiving of boudoirs when a player dies was not working as intended.

2.3.1 - 2021-11-10

Changed

Fixed

  • Joueurs could be added several times to boudoirs (several invites);

  • Some !boudoir options parameters were mandatory where they should not;

  • One-command limitation was not working with private commands outside private chans.

2.3.0 - 2021-11-06

Added

  • New subcommand !boudoir ping;

  • New admin console to execute code/commands from the shell running the bot (BETA: direct commands execution) using new module blocs.console;

  • New indicative messages about the stop keyword;

  • New property bdd.Camp.embed() (like bdd.Role.embed()).

Changed

  • Command !roles separated inro !roles and new command !camps to address some names overlapping issues and for more clarity.

Fixed

  • Help message was not accurate for some subcommands errors;

  • Adding IA reactions could produce API 400 errors (empty messages).

2.2.2 - 2021-11-01

Changed

Fixed

  • References to tools could not be used in reactions evaluations.

  • Bot activity was sometimes lost when errors occured.

  • Messages reactions caused fatal errors in some cases.

2.2.1 - 2021-10-24

Fixed

  • Critical error in features.sync.transtype() caused by SQLAlchemy internals changes between 1.3.x and 1.4.x.

  • Minor fixes in some commands docstrings.

2.2.0 - 2021-10-06

Added

Changed

  • Extended to Python 3.10

  • Bumped all requirements to their latest version

Fixed

  • Diverse documentation fixes.

2.1.4 - 2021-07-10

Changed

  • !lore can now replace @role_slug (config.Role attributes only) with role mention;

  • !doas can now act for players that left the server (limited range);

  • Database host and name is now printed at bot startup;

  • .gitignore now ignores all start_bot*.py files.

Fixed

2.1.3 - 2021-04-26

Changed

  • !boudoir: invite and expulse now take only one name as a full argument, other various improvements;

  • !sync: role sync message now hides role slug.

Fixed

2.1.2 - 2021-04-23

Changed

  • !annoncemort can now prepair several embeds and post them at once;

  • !addIA: new fast-add syntax and duplicate tirggers security check.

Fixed

  • Error when using !menu before the game has started;

  • « stop » messages were detected by every waiting functions, even if an other chennel; this is solved by new chan keyword argument to blocs.tools.wait_for_message(). Dependant functions were modified consequently; while optionnal, omitting this argument may lead to undetected « stop » messages.

2.1.1 - 2021-04-15

Fixed

  • Critical error (importing non-requied package) in __main__.py;

  • Bad order in inscription messages if chambre and additional step.

2.1.0 - 2021-04-13

Added

Changed

  • Updated existing data classes attributes to link to new tables;

  • Made bdd.Action.base nullable and added bdd.Action.vote optionnal attributes to handle votes in a cleaner way (with instance initialization integrity check);

  • Updated features.open_close.recup_joueurs(), !open, !close and !remind;

  • features.gestion_actions.delete_action() now updates bdd.Action.active insteade of deleting the instance;

  • features.voter_agir.export_vote() signature changed;

  • !plot now uses new actions system instead of loading votes from the Gsheet:

    • removed config options tdb_votecond_column, tdb_votantcond_column, tdb_votemaire_column and tdb_votantmaire_column;

    • it now automatically computes votes additions and modifications (Corbeau / Intrigant), using new config options config.ajout_vote_baseaction, config.n_ajouts_votes, config.modif_vote_baseaction;

  • !fillroles now synchronise bdd.BaseCiblage too (see config.max_ciblages_per_action) and post camps descriptions;

  • Moved !addhere and !purge from features.annexe to new module features.chans;

  • Updated some string columns max lengths;

  • Made __str__\ ` implementation specific for :class:.bdd.Role\ ``, :class:.bdd.Camp, :class:.bdd.BaseActionand :class:.bdd.Joueur`.

Removed

  • Tables columns bdd.Joueur._vote_condamne, bdd.Joueur._vote_maire, bdd.Joueur._vote_loups, bdd.Action._decision, bdd.BaseAction.changement_cible;

  • .blocs.webhook module.

Fixed

  • features.voter_agir.export_vote() (!vote* et !action): used hard-written sheet names istead of config.db_votecond_sheet, config.db_votemaire_sheet, config.db_voteloups_sheet and config.db_actions_sheet;

  • Documentation errors & typos.

2.0.0 - 2021-03-24

Major refactorings

Data management

Global namespace

New config namespace module for:

Consequences:

Also added

Also changed

Also removed

1.2.0 - 2020-12-18

Added

  • Commands:

    • !vivants: new aliases !joueurs and !vivant / !morts: new aliases !mort.

    • !post (in features.communication.Communication) to send a message to a specific channel.

    • !panik (in bot.Special) to instantly kill the bot.

    • !actions (in features.informations.Informations) to see and edit players actions [beta].

    • !quiest and !rolede (in features.informations.Informations) to see players with a given role and vice versa.

    • !reactfals (alias !rf, in features.IA.GestionIA) using new function features.IA.fetch_tenor.

    • !xkcd (in features.annexe.Annexe).

  • Bot behavior:

    • New IA rule: « A ou B » ==> « B » (features.IA.trigger_a_ou_b).

    • !plot cond: thumbnail of camp.

    • !open cond: send post on #haros and wipes.

    • New liveness checking system: new method LGBot.i_am_alive writes every 60s current UTC time to a "alive.log" (set LGBot.config["output_liveness"] to True to enable)

  • API usage:

    • Inscription: customize default chambre with LGBot.config["chambre_mj"].

    • blocs.tools.yes_no: new additionnal option to add aditionnal emojis.

Changed

  • Commands:

    • !send can now accept a player name (send to private chan).

    • !plot cond now shows faction (emoji) of killed player.

    • !annoncemort now announces if killed player is living-dead.

    • !sync now asks for confirmation before applying modifications.

  • Bot behavior:

    • Calling a command when already in a command now tries to stop running command and run afterwards instead of aborting.

    • Actions by emojis: only trigger in private chans.

    • Now sends a reminder every morning to always-usable actions.

  • API usage:

    • Renamed features.IA.tenor in features.IA.trigger_gif (consistency).

    • features.sync: better management of modification with new class TDBModif and of exceptions with new specific function validate_sync.

    • tools.bdd_tools.find_nearest: standardized first word comparison with match_first_word option.

    • !shell: now using (new) blocs.realshell module (based on (new dependency) asyncode module) instead of (removed) blocs.pseudoshell.

  • Other minor improvements.

Fixed

  • Fixed critical bug when changing role (through !sync).

  • features.taches: fixed critical bug when too much tasks at the same times (Discord’s webhooks rate limits).

  • Inscription: fixed critical bug when > 50 players.

  • Some docstrings corrections.

  • Other minor bugs.

1.1.0 - 2020-11-03

Added

  • New command !annoncemort (in new module features.communication).

  • Added LGBot.config to permit easier bot customization.

    • Customize inscription with LGBot.config["demande_chambre"] and ["debut_saison"].

  • !help now shows bot version and commands outside of cogs.

  • !open cond/maire now wipes CandidHaros.

  • !refill now opens back permanent actions with new charges.

  • Documentation now covers every public classes, functions and commands.

Changed

  • Made some functions private (leading _).

  • Changed data attributes with leading underscores (like Joueurs._chan_id) with trailing underscores (Joueurs.chan_id_).

  • Data column Joueurs.chambre is now nullable.

  • !fals can now be used in non-private channels.

  • blocs.bdd_tools.find_nearest is no longer a coroutine.

  • Some refactoring:

    • features.informations.emoji_camp moved to blocs.tools.emoji_camp.

    • !plot moved from features.actions_publiques to features.communication.

    • !send and !embed moved from features.annexe to features.communication.

    • !fillroles moved from features.remplissage_bdd (deleted) to features.communication.

Removed

  • Deleted command !droptable.

  • Deleted module features.remplissage_bdd.

Fixed

  • Issue with bot intents: proprer access to member list.

  • Improved handling of BDD disconnections.

  • Critical bug with !stop and voting commands.

  • !plot now creates ./figures folder if not existing.

  • blocs.tools.wait_for_react_clic now handles correctly custom emojis.

  • Configuration Assistant Tool: escape \ns in LGREZ_GCP_CREDENTIALS.

  • Other minor bug fixes and improvements.

1.0.3 - 2020-10-22

Added

  • Created this changelog

  • Added module and submodules docstrings and meta informations.

  • Created Sphinx documentation (beta) on lg-rez.readthedocs.io.

Changed

  • README improvements (badges!) and corrections.

  • Rewriting of bot.LGBot class and methods docstrings.

  • More PyPI classifiers.

Fixed

  • Relative links in PyPI project description now redirect to files on GitHub (not to a 404 page).

1.0.2 - 2020-10-20

Fixed

  • Critical bug fix.

1.0.1 - 2020-10-20

Initial release.