Added streak leaderboard
This commit is contained in:
28
cogs/info.py
Normal file
28
cogs/info.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
from mcstatus import MinecraftServer
|
||||
|
||||
class ServerInfo(commands.Cog):
|
||||
def __init__(self, client):
|
||||
self.client = client
|
||||
|
||||
@commands.command(name="info")
|
||||
async def info(self, ctx):
|
||||
port = "25201"
|
||||
ip = "81.82.224.207"
|
||||
server = MinecraftServer.lookup(f"{ip}:{port}")
|
||||
# List of colours for the amount of servers that are online
|
||||
|
||||
embed = discord.Embed()
|
||||
embed.set_author(name="Info")
|
||||
embed.colour = discord.Colour.orange()
|
||||
embed.add_field(name="Ip", value=f"play.worldcraft.us", inline=False)
|
||||
embed.add_field(name="Dynmap", value=f"https://map.worldcraft.us/", inline=False)
|
||||
embed.add_field(name="Online", value=f"There are **{server.status().players.online}** players online!", inline=False)
|
||||
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
|
||||
|
||||
def setup(client):
|
||||
client.add_cog(ServerInfo(client))
|
||||
Reference in New Issue
Block a user