mirror of
https://github.com/wlinator/luminara.git
synced 2024-10-02 18:03:12 +00:00
Check for the prefix in the database (per guild)
This commit is contained in:
parent
dfa80e4954
commit
777f006c9e
2 changed files with 1 additions and 27 deletions
|
@ -1,26 +0,0 @@
|
|||
ALTER TABLE XP
|
||||
ADD COLUMN guild_id BIGINT NOT NULL;
|
||||
|
||||
CREATE TABLE guild_config (
|
||||
guild_id BIGINT NOT NULL,
|
||||
birthday_channel_id BIGINT,
|
||||
command_channel_id BIGINT, /* NULL: users can do XP & Currency commands everywhere. */
|
||||
intro_channel_id BIGINT,
|
||||
welcome_channel_id BIGINT,
|
||||
level_channel_id BIGINT, /* level-up messages, if NULL the level-up message will be shown in current msg channel*/
|
||||
level_message TEXT, /* if NOT NULL and LEVEL_TYPE = 2, this can be a custom level up message. */
|
||||
level_message_type TINYINT(1) NOT NULL DEFAULT 1, /* 0: no level up messages, 1: levels.en-US.json, 2: generic message */
|
||||
PRIMARY KEY (guild_id)
|
||||
);
|
||||
|
||||
CREATE TABLE blacklist_user (
|
||||
user_id BIGINT NOT NULL,
|
||||
reason TEXT,
|
||||
timestamp TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||
active BOOLEAN DEFAULT TRUE,
|
||||
PRIMARY KEY (user_id)
|
||||
);
|
||||
|
||||
UPDATE XP
|
||||
SET guild_id = 719227135151046699
|
||||
WHERE guild_id IS NULL;
|
2
main.py
2
main.py
|
@ -24,7 +24,7 @@ def get_prefix(bot, message):
|
|||
|
||||
client = bridge.Bot(
|
||||
owner_id=os.getenv('OWNER_ID'),
|
||||
command_prefix='!',
|
||||
command_prefix=get_prefix,
|
||||
intents=discord.Intents.all(),
|
||||
status=discord.Status.online
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue