From 83e47b73c3f76131ae574cf7d44ff1128398fa02 Mon Sep 17 00:00:00 2001 From: Cookie <58516648+Cookie-CHR@users.noreply.github.com> Date: Mon, 21 Feb 2022 22:04:35 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20First=20sketch=20of=20new=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hope it works and doesn't break anything --- royalpack/commands/diobot.py | 81 ++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 royalpack/commands/diobot.py diff --git a/royalpack/commands/diobot.py b/royalpack/commands/diobot.py new file mode 100644 index 00000000..25a472a2 --- /dev/null +++ b/royalpack/commands/diobot.py @@ -0,0 +1,81 @@ +import royalnet.engineer as engi +import royalpack.bolts as rb +import datetime +import random + + +WHO = [ + # A chi sarà diretto l'insulto + "Dio", + "Zio", + "Gesù", + "Cristo", + "Maria", + "Madonna", + "Eva", + "Adamo", + "Rettore", + "Steffo", + "Bot", + "Telegram", + "Discord", +] +WHAT = [ + # l'aggettivo per descrivere il soggetto + # Non deve essere per forza un insulto, anche qualche neutro è bene accetto e dà quel po' di random in più + "santə", + "grandissimə", + "porcə", + "cane", + "capra", + "maialə", + "infame (per te solo le lame)", + "grassə", + "galleggiante", + "tuamammicə", + "marzianə", + "canguro nella landa dei soffitti bassi", + "scalzə nella valle dei chiodi", + "tirchiə", + "poliedricə", + "palindromə", + "pantagruelicə", + "stellare", + "novax", + "intollerante al lattosio", + "rygatonə", + "puzzolente", + "saturə", + "saccente", + "ciambella", + "sfigmomanometro", + "buonə", + "boia", + "[getting bored already]", +] + + +@rb.capture_errors +@engi.TeleportingConversation +async def phrase(*, _msg: engi.Message, **__): + """ + Il bot è molto arrabbiato e vuole creare bestemmie complesse! + """ + + author = await _msg.sender + + h = hash(datetime.datetime.now()) + + message = random.Random(x=h).sample(WHO, 1)[0] + for i in range (random.randint(1,5)): + message += " " + message += random.Random(x=h).sample(WHAT, 1)[0] + message += "!" + + await _msg.reply(text=message) + + +# Objects exported by this module +__all__ = ( + "phrase", +) \ No newline at end of file