changed unix command
This commit is contained in:
parent
67625ca891
commit
7c0b21757e
1 changed files with 2 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
from redbot.core import commands, checks
|
from redbot.core import commands, checks
|
||||||
import discord
|
import discord
|
||||||
import requests
|
from datetime import datetime
|
||||||
|
|
||||||
class Galaxy(commands.Cog):
|
class Galaxy(commands.Cog):
|
||||||
"""Custom cog intended for use on the Galaxy discord server."""
|
"""Custom cog intended for use on the Galaxy discord server."""
|
||||||
|
@ -11,10 +11,7 @@ class Galaxy(commands.Cog):
|
||||||
@commands.command()
|
@commands.command()
|
||||||
async def unix(self, ctx):
|
async def unix(self, ctx):
|
||||||
"""Posts the current Unix timestamp."""
|
"""Posts the current Unix timestamp."""
|
||||||
URL = "http://worldtimeapi.org/api/timezone/Etc/UTC"
|
await ctx.send(datetime.utcnow())
|
||||||
r = requests.get(url = URL)
|
|
||||||
data = r.json()
|
|
||||||
await ctx.send(data)
|
|
||||||
|
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
|
|
Loading…
Reference in a new issue