diff --git a/data/jokes b/data/jokes index 7643ed6..b898a66 100644 --- a/data/jokes +++ b/data/jokes @@ -6,80 +6,63 @@ - Mais c'est faux ! - Oui mais c'est rapide ! ``` - - -Q: Why did the chicken cross the mobius strip? -A: || To get to the same side. || - - +--- +Why did the chicken cross the mobius strip? +|| To get to the same side. || +--- C’est un bol et une tasse qui sont devant un évier : Je n’ai pas envie de plonger, dit le bol, à chaque fois je bois la tasse. C’est vrai, répond la tasse, tu n’as jamais eu de bol ! - - +--- Ce matin, j’ai voulu faire une blague sur le Super U, mais elle n’a pas Supermarché - - +--- J’ai fait une blague à mes vêtements. Ils étaient pliés - - +--- T’as deux poussins, t’en veux qu’un tu fais quoi ? || T’en pousses un || - - +--- Que fait un crocodile quand il rencontre un autre crocodile ? || Il l’accoste || - - +--- C'est un type qui rentre dans un bar et qui dit "Salut les gars ! C'est moi !" et en fait... c'était pas lui ! - - +--- C'est un schtroumpf il tombe et il se fait un bleu - - +--- Pourquoi les policiers n'ont pas d'acné ? ||Car ils ont la peau lisse.|| - - +--- C'est l'histoire d'un pingouin qui respirait par les fesses. Un jour, il s'assoit, et il **meurt**. - - +--- Un tétârd se réveille. Il croyait qu'il était tôt mais en fait il était tard. - - +--- Que fait un chien qui tombe dans la mer rouge ? ||Plouf|| - - +--- Recette pour cuire des carottes : -Prenez 9 carottes -Enlevez-en une -Et voilà les carottes sont cuites - - +--- Savez vous pourquoi il y a tant de célibataires à Dijon ? ||Car l'amour tarde à Dijon.|| - - +--- Pourquoi Napoléon n'a jamais déménagé ? ||Parce qu'il avait un Bonaparte|| - - +--- Qu'est-ce qu'un lapide ? ||Un tlain qui va tlès tlès vite|| - - +--- Qu'est-ce qu'un canife ? ||Un petit fien.|| - - +--- Qu'est-ce qu'une duche ? ||Une douche sans eau.|| - - +--- Pourquoi Michael va ouvrir la porte ? Parce que ||Jackson|| - - +--- Napoléon rentre dans un bar en disant: "J'ai vaincu!" "Je n'ai que dix-neufs chaises désolé" +--- +What is yellow, normed, and complete ? +||A bananach space|| \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 92f8bbf..2122b7c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -109,6 +109,17 @@ optional = false python-versions = ">=3.5" version = "4.7.5" +[[package]] +category = "main" +description = "Cross-platform lib for process and system monitoring in Python." +name = "psutil" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "5.7.0" + +[package.extras] +enum = ["enum34"] + [[package]] category = "main" description = "YAML parser and emitter for Python" @@ -147,7 +158,7 @@ idna = ">=2.0" multidict = ">=4.0" [metadata] -content-hash = "290c4d1821ff75607bc72026a3530752235431e29b064e7ebc5ac897ce6a5565" +content-hash = "efedf2c9dc8d78ca138823f3be2425eded9010c7edecc695e3ddc6ede8df5c94" python-versions = "^3.6" [metadata.files] @@ -211,6 +222,19 @@ multidict = [ {file = "multidict-4.7.5-cp38-cp38-win_amd64.whl", hash = "sha256:544fae9261232a97102e27a926019100a9db75bec7b37feedd74b3aa82f29969"}, {file = "multidict-4.7.5.tar.gz", hash = "sha256:aee283c49601fa4c13adc64c09c978838a7e812f85377ae130a24d7198c0331e"}, ] +psutil = [ + {file = "psutil-5.7.0-cp27-none-win32.whl", hash = "sha256:298af2f14b635c3c7118fd9183843f4e73e681bb6f01e12284d4d70d48a60953"}, + {file = "psutil-5.7.0-cp27-none-win_amd64.whl", hash = "sha256:75e22717d4dbc7ca529ec5063000b2b294fc9a367f9c9ede1f65846c7955fd38"}, + {file = "psutil-5.7.0-cp35-cp35m-win32.whl", hash = "sha256:f344ca230dd8e8d5eee16827596f1c22ec0876127c28e800d7ae20ed44c4b310"}, + {file = "psutil-5.7.0-cp35-cp35m-win_amd64.whl", hash = "sha256:e2d0c5b07c6fe5a87fa27b7855017edb0d52ee73b71e6ee368fae268605cc3f5"}, + {file = "psutil-5.7.0-cp36-cp36m-win32.whl", hash = "sha256:a02f4ac50d4a23253b68233b07e7cdb567bd025b982d5cf0ee78296990c22d9e"}, + {file = "psutil-5.7.0-cp36-cp36m-win_amd64.whl", hash = "sha256:1413f4158eb50e110777c4f15d7c759521703bd6beb58926f1d562da40180058"}, + {file = "psutil-5.7.0-cp37-cp37m-win32.whl", hash = "sha256:d008ddc00c6906ec80040d26dc2d3e3962109e40ad07fd8a12d0284ce5e0e4f8"}, + {file = "psutil-5.7.0-cp37-cp37m-win_amd64.whl", hash = "sha256:73f35ab66c6c7a9ce82ba44b1e9b1050be2a80cd4dcc3352cc108656b115c74f"}, + {file = "psutil-5.7.0-cp38-cp38-win32.whl", hash = "sha256:60b86f327c198561f101a92be1995f9ae0399736b6eced8f24af41ec64fb88d4"}, + {file = "psutil-5.7.0-cp38-cp38-win_amd64.whl", hash = "sha256:d84029b190c8a66a946e28b4d3934d2ca1528ec94764b180f7d6ea57b0e75e26"}, + {file = "psutil-5.7.0.tar.gz", hash = "sha256:685ec16ca14d079455892f25bd124df26ff9137664af445563c1bd36629b5e0e"}, +] pyyaml = [ {file = "PyYAML-5.3.1-cp27-cp27m-win32.whl", hash = "sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f"}, {file = "PyYAML-5.3.1-cp27-cp27m-win_amd64.whl", hash = "sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76"}, diff --git a/pyproject.toml b/pyproject.toml index a7c5cd5..6b258cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,7 @@ authors = ["ddorn "] python = "^3.6" discord = "^1.0.1" pyyaml = "^5.0.0" +psutil = "^5.7.0" [tool.poetry.dev-dependencies] diff --git a/src/cogs/misc.py b/src/cogs/misc.py index 187ab0f..60d8c71 100644 --- a/src/cogs/misc.py +++ b/src/cogs/misc.py @@ -48,7 +48,7 @@ class MiscCog(Cog, name="Divers"): async def joke_cmd(self, ctx): await ctx.message.delete() with open(File.JOKES) as f: - jokes = f.read().split("\n\n\n") + jokes = f.read().split("---") msg = random.choice(jokes) message: discord.Message = await ctx.send(msg) diff --git a/src/constants.py b/src/constants.py index 58cde80..3c8aba5 100644 --- a/src/constants.py +++ b/src/constants.py @@ -12,7 +12,6 @@ __all__ = [ "DIEGO", "TOURNOIS", "EMBED_COLOR", - "START_TIME", "File", "Emoji", ] @@ -29,7 +28,6 @@ if TOKEN is None: print() quit(1) -START_TIME = time() GUILD = "690934836696973404" DIEGO = "Diego" # Mon display name TEAMS_CHANNEL_CATEGORY = "Channels d'équipes" diff --git a/src/utils.py b/src/utils.py index 6c44400..bd7fb52 100644 --- a/src/utils.py +++ b/src/utils.py @@ -1,3 +1,4 @@ +import psutil from discord import Message from discord.ext.commands import Context, Bot @@ -16,5 +17,9 @@ async def send_and_bin(bot: Bot, ctx: Context, msg=None, *, embed=None): await msg +def start_time(): + return psutil.Process().create_time() + + def setup(bot): bot.send_and_bin = send_and_bin