From 85cbc6fb01f9960234cdb487e707ffe346ee707a Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh <102361830+SeaswimmerTheFsh@users.noreply.github.com> Date: Mon, 19 Jun 2023 16:47:48 -0400 Subject: [PATCH] made the prefix an env variable --- .env.example | 1 + main.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 855cb2f..cc6e6a4 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,4 @@ TOKEN=token-goes-here +PREFIX=! # Only change the API URL if you're using a selfhosted Revolt instance. API_URL=https://api.revolt.chat \ No newline at end of file diff --git a/main.py b/main.py index a29e5cd..7ef1944 100644 --- a/main.py +++ b/main.py @@ -8,10 +8,11 @@ from revolt.ext import commands load_dotenv() token = os.getenv('TOKEN') api_url = os.getenv('API_URL') +prefix = os.getenv('PREFIX') class Client(commands.CommandsClient): async def get_prefix(self, message: revolt.Message): - return "." + return prefix @commands.command() async def ping(self, ctx: commands.Context):