diff --git a/CONFIGURATION.md b/CONFIGURATION.md index 11bfd2e..5409547 100644 --- a/CONFIGURATION.md +++ b/CONFIGURATION.md @@ -1,7 +1,6 @@ # Configuration Pingernos py offers three different ways to configure it, a config file, environment variables and a .env -If you wish to use the config file, just copy the [example.config.json](./example.config.json) to a new file called config.json in the root folder and modify the options in it. -If you wish to use environment variables, you must set the `use_json` variable in [getdata](./utils.py) to `False`. +If you wish to use the config file, you must set the `use_json` variable in [getdata](./utils.py) to `True` and copy the [example.config.json](./example.config.json) to a new file called config.json in the root folder and modify the options in it. If you wish to use a .env file, just copy the [example.env](./example.env) to a new file called .env in the root folder and modify the options in it, you can use environment variables and a .env file at the same time if you so desire. Environment variables use `SCREAMING_SNAKE_CASE`, the configuration file uses `PascalCase`. diff --git a/cogs/checkip.py b/cogs/checkip.py index b6f2f14..1035aa3 100644 --- a/cogs/checkip.py +++ b/cogs/checkip.py @@ -28,10 +28,10 @@ async def checkip(self, ctx, address = None): server = await JavaServer.async_lookup(address) stat = await server.async_status() if stat.version.name == "⚠ Error": - embed.description=f"**{nip}.aternos.me** is free to use!\nTo use it as your server address, head to **[the options of your server](https://aternos.org/options)**" + embed.description=f"**{address}** is free to use!\nTo use it as your server address, head to **[the options of your server](https://aternos.org/options)**" embed.colour = Utils.Colors.green else: - embed.description=f"**{nip}.aternos.me** is already taken!" + embed.description=f"**{address}** is already taken!" embed.colour = Utils.Colors.red await ctx.respond(embed=embed) diff --git a/cogs/setserver.py b/cogs/setserver.py index a61a719..06e25ed 100644 --- a/cogs/setserver.py +++ b/cogs/setserver.py @@ -1,14 +1,13 @@ -from discord.ext import commands, bridge +from discord.ext import commands#, bridge class SetServer(commands.Cog): def __init__(self, bot): self.bot = bot - @bridge.bridge_command(aliases=["set"], description="Set the default server to use if no argument is provided in the status command.") - async def setserver(self, ctx, server = None): - return await ctx.respond("We are working hard to add this command back. Please manually use the status command for now.") - # if server is None: - # return await ctx.respond("Please provide a server IP.") - # await ctx.defer() + #@bridge.bridge_command(aliases=["set"], description="Set the default server to use if no argument is provided in the status command.") + #async def setserver(self, ctx, server = None): + # if server is None: + # return await ctx.respond("Please provide a server IP.") + # await ctx.defer() #This is up to Miataboy to implement def setup(bot): diff --git a/utils.py b/utils.py index 1e0cf07..73be88a 100644 --- a/utils.py +++ b/utils.py @@ -24,7 +24,7 @@ class Colors: orange = 0xfaa61a @staticmethod def get_data() -> dict: - usejson = False #Set to False to use enviorment variables instead of config.json + usejson = False #Set to True to a config.json if usejson: try: with open('config.json', 'r', encoding="UTF-8") as file: