@@ -372,7 +372,7 @@ async def bans(self, interaction: discord.Interaction, user: str):
372372
373373 @dcs .command (description = _ ('Update your DCS installations' ))
374374 @app_commands .guild_only ()
375- @app_commands .check (utils .restricted )
375+ @app_commands .check (utils .restricted_check )
376376 @utils .app_has_role ('DCS Admin' )
377377 @app_commands .describe (warn_time = _ ("Time in seconds to warn users before shutdown" ))
378378 @app_commands .autocomplete (branch = get_dcs_branches )
@@ -452,7 +452,7 @@ async def update(self, interaction: discord.Interaction,
452452
453453 @dcs .command (description = _ ('Repair your DCS installations' ))
454454 @app_commands .guild_only ()
455- @app_commands .check (utils .restricted )
455+ @app_commands .check (utils .restricted_check )
456456 @utils .app_has_role ('DCS Admin' )
457457 @app_commands .describe (warn_time = _ ("Time in seconds to warn users before shutdown" ))
458458 async def repair (self , interaction : discord .Interaction ,
@@ -498,7 +498,7 @@ async def repair(self, interaction: discord.Interaction,
498498
499499 @dcs .command (name = 'install' , description = _ ('Install modules in your DCS server' ))
500500 @app_commands .guild_only ()
501- @app_commands .check (utils .restricted )
501+ @app_commands .check (utils .restricted_check )
502502 @utils .app_has_role ('Admin' )
503503 @app_commands .autocomplete (module = available_modules_autocomplete )
504504 async def _install (self , interaction : discord .Interaction ,
@@ -521,7 +521,7 @@ async def _install(self, interaction: discord.Interaction,
521521
522522 @dcs .command (name = 'uninstall' , description = _ ('Uninstall modules from your DCS server' ))
523523 @app_commands .guild_only ()
524- @app_commands .check (utils .restricted )
524+ @app_commands .check (utils .restricted_check )
525525 @utils .app_has_role ('Admin' )
526526 @app_commands .autocomplete (module = installed_modules_autocomplete )
527527 async def _uninstall (self , interaction : discord .Interaction ,
@@ -825,7 +825,7 @@ async def run_on_nodes(self, interaction: discord.Interaction, method: str, node
825825
826826 @node_group .command (description = _ ('Shuts a specific node down' ))
827827 @app_commands .guild_only ()
828- @app_commands .check (utils .restricted )
828+ @app_commands .check (utils .restricted_check )
829829 @utils .app_has_role ('Admin' )
830830 async def shutdown (self , interaction : discord .Interaction ,
831831 node : Optional [app_commands .Transform [Node , utils .NodeTransformer ]] = None ):
@@ -836,7 +836,7 @@ async def shutdown(self, interaction: discord.Interaction,
836836
837837 @node_group .command (description = _ ('Restarts a specific node' ))
838838 @app_commands .guild_only ()
839- @app_commands .check (utils .restricted )
839+ @app_commands .check (utils .restricted_check )
840840 @utils .app_has_role ('Admin' )
841841 async def restart (self , interaction : discord .Interaction ,
842842 node : Optional [app_commands .Transform [Node , utils .NodeTransformer ]] = None ):
@@ -932,7 +932,7 @@ async def _node_online(node_name: str):
932932
933933 @node_group .command (description = _ ('Upgrade DCSServerBot' ))
934934 @app_commands .guild_only ()
935- @app_commands .check (utils .restricted )
935+ @app_commands .check (utils .restricted_check )
936936 @utils .app_has_role ('Admin' )
937937 async def upgrade (self , interaction : discord .Interaction ,
938938 node : Optional [app_commands .Transform [Node , utils .NodeTransformer ]] = None ):
@@ -958,7 +958,7 @@ async def upgrade(self, interaction: discord.Interaction,
958958
959959 @node_group .command (description = _ ('Run a shell command on a node' ))
960960 @app_commands .guild_only ()
961- @app_commands .check (utils .restricted )
961+ @app_commands .check (utils .restricted_check )
962962 @utils .app_has_role ('Admin' )
963963 async def shell (self , interaction : discord .Interaction ,
964964 node : app_commands .Transform [Node , utils .NodeTransformer ],
@@ -982,7 +982,7 @@ async def shell(self, interaction: discord.Interaction,
982982
983983 @node_group .command (description = _ ("Add/create an instance\n " ))
984984 @app_commands .guild_only ()
985- @app_commands .check (utils .restricted )
985+ @app_commands .check (utils .restricted_check )
986986 @utils .app_has_role ('Admin' )
987987 @app_commands .autocomplete (name = utils .InstanceTransformer (unused = True ).autocomplete )
988988 @app_commands .describe (name = _ ("Either select an existing instance or enter the name of a new one" ))
@@ -1038,7 +1038,7 @@ async def add_instance(self, interaction: discord.Interaction,
10381038
10391039 @node_group .command (description = _ ("Delete an instance\n " ))
10401040 @app_commands .guild_only ()
1041- @app_commands .check (utils .restricted )
1041+ @app_commands .check (utils .restricted_check )
10421042 @utils .app_has_role ('Admin' )
10431043 async def delete_instance (self , interaction : discord .Interaction ,
10441044 node : app_commands .Transform [Node , utils .NodeTransformer ],
@@ -1076,7 +1076,7 @@ async def delete_instance(self, interaction: discord.Interaction,
10761076
10771077 @node_group .command (description = _ ("Rename an instance\n " ))
10781078 @app_commands .guild_only ()
1079- @app_commands .check (utils .restricted )
1079+ @app_commands .check (utils .restricted_check )
10801080 @utils .app_has_role ('Admin' )
10811081 async def rename_instance (self , interaction : discord .Interaction ,
10821082 node : app_commands .Transform [Node , utils .NodeTransformer ],
@@ -1119,7 +1119,7 @@ async def rename_instance(self, interaction: discord.Interaction,
11191119
11201120 @node_group .command (description = _ ("Shows CPU topology" ))
11211121 @app_commands .guild_only ()
1122- @app_commands .check (utils .restricted )
1122+ @app_commands .check (utils .restricted_check )
11231123 @app_commands .check (lambda interaction : sys .platform == 'win32' )
11241124 @utils .app_has_role ('Admin' )
11251125 async def cpuinfo (self , interaction : discord .Interaction ,
@@ -1133,7 +1133,7 @@ async def cpuinfo(self, interaction: discord.Interaction,
11331133
11341134 @plug .command (name = 'install' , description = _ ("Install Plugin" ))
11351135 @app_commands .guild_only ()
1136- @app_commands .check (utils .restricted )
1136+ @app_commands .check (utils .restricted_check )
11371137 @app_commands .autocomplete (plugin = installable_plugins )
11381138 @utils .app_has_role ('Admin' )
11391139 async def _install (self , interaction : discord .Interaction , plugin : str ):
@@ -1151,7 +1151,7 @@ async def _install(self, interaction: discord.Interaction, plugin: str):
11511151
11521152 @plug .command (name = 'uninstall' , description = _ ("Uninstall Plugin" ))
11531153 @app_commands .guild_only ()
1154- @app_commands .check (utils .restricted )
1154+ @app_commands .check (utils .restricted_check )
11551155 @app_commands .autocomplete (plugin = uninstallable_plugins )
11561156 @utils .app_has_role ('Admin' )
11571157 async def _uninstall (self , interaction : discord .Interaction , plugin : str ):
@@ -1169,7 +1169,7 @@ async def _uninstall(self, interaction: discord.Interaction, plugin: str):
11691169
11701170 @plug .command (description = _ ('Reload Plugin' ))
11711171 @app_commands .guild_only ()
1172- @app_commands .check (utils .restricted )
1172+ @app_commands .check (utils .restricted_check )
11731173 @utils .app_has_role ('Admin' )
11741174 @app_commands .autocomplete (plugin = plugins_autocomplete )
11751175 async def reload (self , interaction : discord .Interaction , plugin : Optional [str ]):
0 commit comments