From b8a9041e360da7b0f6990e1566b281d7b7957a9c Mon Sep 17 00:00:00 2001 From: ddorn Date: Mon, 1 Jun 2020 13:43:49 +0200 Subject: [PATCH] :sparkles: add nix env --- .envrc | 1 + shell.nix | 10 ++++++++++ src/cogs/misc.py | 3 ++- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .envrc create mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..4a4726a --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use_nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..6244933 --- /dev/null +++ b/shell.nix @@ -0,0 +1,10 @@ +{ pkgs? import {}, ... }: +let + pythonEnv = pkgs.poetry2nix.mkPoetryEnv { + projectDir = ./.; + }; +in pkgs.mkShell { + buildInputs = [ pythonEnv ]; + + PYTHONPATH = "."; +} diff --git a/src/cogs/misc.py b/src/cogs/misc.py index f988012..c052e3c 100644 --- a/src/cogs/misc.py +++ b/src/cogs/misc.py @@ -628,8 +628,9 @@ class MiscCog(Cog, name="Divers"): if joke.file: text += " - image non inclue - " + name = who.display_name if who else "Inconnu" embed.add_field( - name=f"{i} - {who.display_name} - {len(joke.likes)}", value=text + name=f"{i} - {name} - {len(joke.likes)}", value=text ) await ctx.send(embed=embed)