mirror of https://github.com/stijndcl/didier
				
				
				
			Inspire command (fixes #40), disable Launch
							parent
							
								
									66ec275188
								
							
						
					
					
						commit
						6568cfdcce
					
				|  | @ -8,6 +8,7 @@ import pytz | ||||||
| import requests | import requests | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | # Temporarily disabled because of API (setup @ bottom) | ||||||
| class Launch(commands.Cog): | class Launch(commands.Cog): | ||||||
|     def __init__(self, client): |     def __init__(self, client): | ||||||
|         self.client = client |         self.client = client | ||||||
|  | @ -50,5 +51,5 @@ class Launch(commands.Cog): | ||||||
|             datetime.fromtimestamp(int(d) + 7200, pytz.timezone("Europe/Brussels")).strftime('%B %d %Y om %H:%M:%S')) |             datetime.fromtimestamp(int(d) + 7200, pytz.timezone("Europe/Brussels")).strftime('%B %d %Y om %H:%M:%S')) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def setup(client): | # def setup(client): | ||||||
|     client.add_cog(Launch(client)) | #     client.add_cog(Launch(client)) | ||||||
|  |  | ||||||
|  | @ -6,6 +6,7 @@ from discord.ext import commands | ||||||
| from enums.help_categories import Category | from enums.help_categories import Category | ||||||
| from functions import checks, clap, mock, sunrise, timeFormatters | from functions import checks, clap, mock, sunrise, timeFormatters | ||||||
| import pytz | import pytz | ||||||
|  | from requests import get | ||||||
| import time | import time | ||||||
| import urllib.parse | import urllib.parse | ||||||
| 
 | 
 | ||||||
|  | @ -101,7 +102,7 @@ class Oneliners(commands.Cog): | ||||||
| 
 | 
 | ||||||
|     @commands.command(name="Todo", aliases=["List", "Td"]) |     @commands.command(name="Todo", aliases=["List", "Td"]) | ||||||
|     @help.Category(category=Category.Didier) |     @help.Category(category=Category.Didier) | ||||||
|     async def todo(self, ctx, *args): |     async def todo(self, ctx): | ||||||
|         await ctx.send("https://trello.com/b/PdtsAJea/didier-to-do-list") |         await ctx.send("https://trello.com/b/PdtsAJea/didier-to-do-list") | ||||||
| 
 | 
 | ||||||
|     @commands.command(name="LMGTFY", aliases=["Dsfr"], usage="[Query]") |     @commands.command(name="LMGTFY", aliases=["Dsfr"], usage="[Query]") | ||||||
|  | @ -130,7 +131,7 @@ class Oneliners(commands.Cog): | ||||||
|         await ctx.send("Shut, it already is.") |         await ctx.send("Shut, it already is.") | ||||||
| 
 | 
 | ||||||
|     @commands.command() |     @commands.command() | ||||||
|     async def sc(self, ctx, *args): |     async def sc(self, ctx): | ||||||
|         await ctx.send("http://take-a-screenshot.org/") |         await ctx.send("http://take-a-screenshot.org/") | ||||||
| 
 | 
 | ||||||
|     @commands.command(aliases=["os", "sauce", "src"]) |     @commands.command(aliases=["os", "sauce", "src"]) | ||||||
|  | @ -144,9 +145,19 @@ class Oneliners(commands.Cog): | ||||||
|         await ctx.send(":sunny:: **{}**\n:crescent_moon:: **{}**".format(s.sunrise(), s.sunset())) |         await ctx.send(":sunny:: **{}**\n:crescent_moon:: **{}**".format(s.sunrise(), s.sunset())) | ||||||
| 
 | 
 | ||||||
|     @commands.command(name="Tias", aliases=["TryIt"]) |     @commands.command(name="Tias", aliases=["TryIt"]) | ||||||
|     async def tias(self, ctx, *args): |     async def tias(self, ctx): | ||||||
|         await ctx.send("***Try it and see***") |         await ctx.send("***Try it and see***") | ||||||
| 
 | 
 | ||||||
|  |     @commands.command(name="Inspire") | ||||||
|  |     @help.Category(Category.Other) | ||||||
|  |     async def inspire(self, ctx): | ||||||
|  |         image = get("http://inspirobot.me/api?generate=true") | ||||||
|  | 
 | ||||||
|  |         if image.status_code == 200: | ||||||
|  |             await ctx.send(image.text) | ||||||
|  |         else: | ||||||
|  |             await ctx.send("Uh oh API down.") | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| def setup(client): | def setup(client): | ||||||
|     client.add_cog(Oneliners(client)) |     client.add_cog(Oneliners(client)) | ||||||
|  |  | ||||||
|  | @ -46,12 +46,12 @@ | ||||||
|   "hangman start": "Start een nieuwe Hangman game indien er nog geen bezig is. Indien je geen woord opgeeft, wordt er een willekeurig woord gekozen.\n**Indien je wel een woord opgeeft, werkt dit enkel in DM.**", |   "hangman start": "Start een nieuwe Hangman game indien er nog geen bezig is. Indien je geen woord opgeeft, wordt er een willekeurig woord gekozen.\n**Indien je wel een woord opgeeft, werkt dit enkel in DM.**", | ||||||
|   "hangman guess": "Probeer het woord te raden.", |   "hangman guess": "Probeer het woord te raden.", | ||||||
|   "claim": "Claim [Aantal] Didier Dinks uit je profit.\nIndien je geen aantal opgeeft (of \"all\"), claim je alles, inclusief je investering.", |   "claim": "Claim [Aantal] Didier Dinks uit je profit.\nIndien je geen aantal opgeeft (of \"all\"), claim je alles, inclusief je investering.", | ||||||
|  |   "inspire": "Generate quotes via [InspiroBot](https://inspirobot.me/).", | ||||||
|   "inventory": "Bekijk de items in jouw inventory.", |   "inventory": "Bekijk de items in jouw inventory.", | ||||||
|   "invest": "Investeer [Aantal] Didier Dinks in jouw Didier Bank om rente te vergaren.", |   "invest": "Investeer [Aantal] Didier Dinks in jouw Didier Bank om rente te vergaren.", | ||||||
|   "jpl": "Informatie over de Jupiler Pro League.", |   "jpl": "Informatie over de Jupiler Pro League.", | ||||||
|   "jpl matches": "Bekijk de wedstrijden die gespeeld worden op [Week]. Default naar de huidige speeldag.", |   "jpl matches": "Bekijk de wedstrijden die gespeeld worden op [Week]. Default naar de huidige speeldag.", | ||||||
|   "jpl table": "De huidige stand van het klassement.", |   "jpl table": "De huidige stand van het klassement.", | ||||||
|   "launch": "Tijdstip van de volgende SpaceX lancering.", |  | ||||||
|   "leaderboard": "Bekijk de Top 10 van [Categorie].\nIndien je geen categorie opgeeft krijg je een lijst van categorieën.", |   "leaderboard": "Bekijk de Top 10 van [Categorie].\nIndien je geen categorie opgeeft krijg je een lijst van categorieën.", | ||||||
|   "les": "Bekijk het lessenrooster voor [Dag] in het [Jaargang]-de jaar.\nIndien je geen dag opgeeft, is dit standaard vandaag. De jaargang is standaard 2.\nLes Morgen/Overmorgen werkt ook.", |   "les": "Bekijk het lessenrooster voor [Dag] in het [Jaargang]-de jaar.\nIndien je geen dag opgeeft, is dit standaard vandaag. De jaargang is standaard 2.\nLes Morgen/Overmorgen werkt ook.", | ||||||
|   "lmgtfy": "Stuur iemand een LMGTFY link wanneer ze je een domme vraag stellen in plaats van het zelf op te zoeken.\nQueries met spaties moeten **niet** tussen aanhalingstekens staan.", |   "lmgtfy": "Stuur iemand een LMGTFY link wanneer ze je een domme vraag stellen in plaats van het zelf op te zoeken.\nQueries met spaties moeten **niet** tussen aanhalingstekens staan.", | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue