added unix command
This commit is contained in:
parent
b128366eef
commit
67625ca891
1 changed files with 10 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
from redbot.core import commands, checks
|
from redbot.core import commands, checks
|
||||||
import discord
|
import discord
|
||||||
|
import requests
|
||||||
|
|
||||||
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."""
|
||||||
|
@ -7,6 +8,15 @@ class Galaxy(commands.Cog):
|
||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
|
|
||||||
|
@commands.command()
|
||||||
|
async def unix(self, ctx):
|
||||||
|
"""Posts the current Unix timestamp."""
|
||||||
|
URL = "http://worldtimeapi.org/api/timezone/Etc/UTC"
|
||||||
|
r = requests.get(url = URL)
|
||||||
|
data = r.json()
|
||||||
|
await ctx.send(data)
|
||||||
|
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
async def warehouse(self, ctx: commands.Context, lvlfrom: int = 1, lvlto: int = 38):
|
async def warehouse(self, ctx: commands.Context, lvlfrom: int = 1, lvlto: int = 38):
|
||||||
"""Calculates the total cost to upgrade your warehouse from a level to a level."""
|
"""Calculates the total cost to upgrade your warehouse from a level to a level."""
|
||||||
|
|
Loading…
Reference in a new issue