made the prefix an env variable
This commit is contained in:
parent
02b6b7cfaa
commit
85cbc6fb01
2 changed files with 3 additions and 1 deletions
|
@ -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
|
3
main.py
3
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):
|
||||
|
|
Loading…
Reference in a new issue