changed unix command

This commit is contained in:
Seaswimmer 2023-02-28 03:38:42 -05:00
parent 67625ca891
commit 7c0b21757e

View file

@ -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()