From 97f930a2f28e3758199ab5a79ca7bd75e6027b02 Mon Sep 17 00:00:00 2001
From: dnns01 <mail@dnns01.de>
Date: Fri, 25 Sep 2020 18:52:37 +0200
Subject: [PATCH] Added !motivation command, that chooses random a text from a
 list to motivate somebody

---
 fernuni-bot.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/fernuni-bot.py b/fernuni-bot.py
index cd6346a..8b4ac4f 100644
--- a/fernuni-bot.py
+++ b/fernuni-bot.py
@@ -1,5 +1,6 @@
 import json
 import os
+import random
 import re
 
 import discord
@@ -102,6 +103,15 @@ async def send_dm(user, message, embed=None):
         await user.dm_channel.send(message, embed=embed)
 
 
+@bot.command(name="motivation")
+async def cmd_motivation(ctx):
+    texts = ["Leb' deinen Traum, denn er wird wahr. Geh deinen Weg, stelle dich der Gefahr...",
+             "Alles was wichtig ist wirst du erkennen wenn die Zeit gekommen ist."]
+
+    text = random.choice(texts)
+    await ctx.send(text)
+
+
 @bot.command(name="sinn")
 async def cmd_sinn(ctx):
     await ctx.send("42 :robot:")
-- 
GitLab