From e9a284fa99750aa603475cf4895f41bb7875bab1 Mon Sep 17 00:00:00 2001 From: Myned Date: Thu, 3 Mar 2022 23:54:38 -0600 Subject: [PATCH] Add config to register owner commands in one guild --- README.md | 1 + commands/master.py | 2 +- config.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6bb0fe3..54f5259 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ Run to create `config.toml`\ The file will automatically generate if it does not exist ``` guilds = [] # guild IDs to register commands, empty for global +master = 0 # guild ID to register owner commands client = 0 # bot application ID token = "" # bot token activity = "" # bot status diff --git a/commands/master.py b/commands/master.py index 2aec682..2723f78 100644 --- a/commands/master.py +++ b/commands/master.py @@ -5,7 +5,7 @@ import lightbulb import config as c -plugin = lightbulb.Plugin("master") +plugin = lightbulb.Plugin("master", default_enabled_guilds=c.config["master"]) @plugin.command diff --git a/config.py b/config.py index 111b456..b7ffc2a 100644 --- a/config.py +++ b/config.py @@ -6,6 +6,7 @@ ACTIVITY = hikari.ActivityType.LISTENING ERROR = "```❗ An internal error has occurred. This has been reported to my master. 🐺```" CONFIG = """\ guilds = [] # guild IDs to register commands, empty for global +master = 0 # guild ID to register owner commands client = 0 # bot application ID token = "" # bot token activity = "" # bot status