4
4
from discord import app_commands
5
5
from discord .ext import commands
6
6
7
- import tux .utils .checks as checks
8
7
from tux .database .controllers import DatabaseController
9
8
from tux .ui .views .config import ConfigSetChannels , ConfigSetPrivateLogs , ConfigSetPublicLogs
10
9
10
+ # TODO: Add onboarding setup to ensure all required channels, logs, and roles are set up
11
+ # TODO: Figure out how to handle using our custom checks because the current checks would result in a lock out
12
+ # TODO: Add a command to reset the guild config to default values
13
+
11
14
12
15
class Config (commands .Cog ):
13
16
def __init__ (self , bot : commands .Bot ) -> None :
14
17
self .bot = bot
15
18
self .db = DatabaseController ().guild_config
16
19
17
20
@app_commands .command (name = "config_set_logs" )
18
- @app_commands .describe (category = "Which category of logs to configure" )
21
+ @app_commands .describe (setting = "Which category of logs to configure" )
19
22
@app_commands .guild_only ()
20
- @checks .ac_has_pl (7 )
23
+ # @checks.ac_has_pl(7)
24
+ @app_commands .checks .has_permissions (administrator = True )
21
25
async def config_set_logs (
22
26
self ,
23
27
interaction : discord .Interaction ,
@@ -44,7 +48,8 @@ async def config_set_logs(
44
48
45
49
@app_commands .command (name = "config_set_channels" )
46
50
@app_commands .guild_only ()
47
- @checks .ac_has_pl (7 )
51
+ # @checks.ac_has_pl(7)
52
+ @app_commands .checks .has_permissions (administrator = True )
48
53
async def config_set_channels (
49
54
self ,
50
55
interaction : discord .Interaction ,
@@ -76,7 +81,8 @@ async def config_set_channels(
76
81
],
77
82
)
78
83
@app_commands .guild_only ()
79
- @checks .ac_has_pl (7 )
84
+ # @checks.ac_has_pl(7)
85
+ @app_commands .checks .has_permissions (administrator = True )
80
86
async def config_set_roles (
81
87
self ,
82
88
interaction : discord .Interaction ,
@@ -112,7 +118,8 @@ async def config_set_roles(
112
118
113
119
@app_commands .command (name = "config_get_roles" )
114
120
@app_commands .guild_only ()
115
- @checks .ac_has_pl (7 )
121
+ # @checks.ac_has_pl(7)
122
+ @app_commands .checks .has_permissions (administrator = True )
116
123
async def config_get_roles (
117
124
self ,
118
125
interaction : discord .Interaction ,
0 commit comments