Corona updates
This commit is contained in:
+15
@@ -120,6 +120,21 @@ class Shitpost(object):
|
|||||||
print("No permission to delete message")
|
print("No permission to delete message")
|
||||||
yield from ctx.channel.send(ctx.author.mention + ' ' + str(message))
|
yield from ctx.channel.send(ctx.author.mention + ' ' + str(message))
|
||||||
|
|
||||||
|
@commands.command(pass_context=True, hidden=False)
|
||||||
|
@asyncio.coroutine
|
||||||
|
def corona(self, ctx):
|
||||||
|
params = (
|
||||||
|
('minimal/', 'true'),
|
||||||
|
('format/', 'json')
|
||||||
|
)
|
||||||
|
response = requests.get('https://corona-stats.online/NL/?format=json&source=2')
|
||||||
|
answer = json.loads(response.content)
|
||||||
|
answer = answer["data"]
|
||||||
|
message = "Volgens mij zijn er in Nederland " + str(answer[0]["cases"]) + " bevestigde gevallen "
|
||||||
|
message += "en " + str(answer[0]["deaths"]) + " dooies 💀, en liggen er "
|
||||||
|
message += str(answer[0]["critical"]) + " mensen op de IC. "
|
||||||
|
yield from ctx.channel.send(ctx.author.mention + ' ' + str(message))
|
||||||
|
|
||||||
@commands.command(pass_context=True, hidden=False)
|
@commands.command(pass_context=True, hidden=False)
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def viertwintig(self, ctx):
|
def viertwintig(self, ctx):
|
||||||
|
|||||||
Reference in New Issue
Block a user