mirror of
https://github.com/allthingslinux/tux.git
synced 2024-10-02 16:43:12 +00:00
perm system part 1
This commit is contained in:
parent
a445431c73
commit
f323f1a35d
5 changed files with 12 additions and 43 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -157,3 +157,4 @@ prisma/database.db
|
|||
# private key for github
|
||||
github-private-key.pem
|
||||
/debug.csv
|
||||
config/settings.json
|
||||
|
|
|
@ -82,11 +82,15 @@ Tux is a Discord bot for the All Things Linux Discord server. It is designed to
|
|||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
7. Run the sync command in the server to sync the slash command tree.
|
||||
7. Copy the `config/settings.json.example` file to `config/settings.json` and fill in the required values
|
||||
```bash
|
||||
cp config/settings.json.example config/settings.json
|
||||
```
|
||||
8. Run the sync command in the server to sync the slash command tree.
|
||||
```
|
||||
{prefix}dev sync <server id>
|
||||
```
|
||||
8. Review all useful CLI commands by visiting the [useful CLI commands](docs/CLI.md) file.
|
||||
9. Review all useful CLI commands by visiting the [useful CLI commands](docs/CLI.md) file.
|
||||
|
||||
|
||||
## License
|
||||
|
|
|
@ -10,47 +10,12 @@
|
|||
"OWNER": 123456789012345679,
|
||||
"TESTING": 123456789012345679
|
||||
},
|
||||
"PERMISSION_LEVELS": {
|
||||
"0": [
|
||||
"USER_IDS": {
|
||||
"SYSADMINS": [
|
||||
123456789012345679,
|
||||
123456789012345679
|
||||
],
|
||||
"1": [
|
||||
123456789012345679,
|
||||
123456789012345679
|
||||
],
|
||||
"2": [
|
||||
123456789012345679,
|
||||
123456789012345679
|
||||
],
|
||||
"3": [
|
||||
123456789012345679,
|
||||
123456789012345679
|
||||
],
|
||||
"4": [
|
||||
123456789012345679,
|
||||
123456789012345679
|
||||
],
|
||||
"5": [
|
||||
123456789012345679,
|
||||
123456789012345679
|
||||
],
|
||||
"6": [
|
||||
123456789012345679,
|
||||
123456789012345679
|
||||
],
|
||||
"7": [
|
||||
123456789012345679,
|
||||
123456789012345679
|
||||
],
|
||||
"8": [
|
||||
123456789012345679,
|
||||
123456789012345679
|
||||
],
|
||||
"9": [
|
||||
123456789012345679,
|
||||
123456789012345679
|
||||
]
|
||||
"BOT_OWNER": 123456789012345679
|
||||
},
|
||||
"TEMPVC_CATEGORY_ID": 1235096247442870292,
|
||||
"TEMPVC_CHANNEL_ID": 1235096247442870292,
|
|
@ -59,8 +59,6 @@ model GuildConfig {
|
|||
perm_level_5_role_id BigInt?
|
||||
perm_level_6_role_id BigInt?
|
||||
perm_level_7_role_id BigInt?
|
||||
perm_level_8_role_id BigInt?
|
||||
perm_level_9_role_id BigInt?
|
||||
base_staff_role_id BigInt?
|
||||
base_member_role_id BigInt?
|
||||
jail_role_id BigInt?
|
||||
|
|
|
@ -15,7 +15,8 @@ config = json.loads(config_file.read_text())
|
|||
class Constants:
|
||||
# Permission constants
|
||||
ROLES: Final[dict[str, int]] = config["ROLES"]
|
||||
BOT_OWNER_ID: Final[int] = int(os.getenv("BOT_OWNER_ID", 0))
|
||||
BOT_OWNER_ID: Final[int] = config["USER_IDS"]["BOT_OWNER"]
|
||||
SYSADMIN_IDS: Final[list[int]] = config["USER_IDS"]["SYSADMINS"]
|
||||
|
||||
# Production env constants
|
||||
PROD_TOKEN: Final[str] = os.getenv("PROD_TOKEN", "")
|
||||
|
|
Loading…
Reference in a new issue