File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,13 @@ async def _send_category_options(
167167 select_group_options : defaultdict [SelectGroup , list [disnake .SelectOption ]] = defaultdict (list )
168168 positioning = {}
169169 for attr , meta in tuple (category_options .items ()):
170+ if not await can_guild_set_config_option (
171+ self .bot ,
172+ metadata = category_options [attr ],
173+ guild_id = inter .guild_id , # type: ignore
174+ ):
175+ continue
176+
170177 if meta .select_option :
171178 default = bool (current_config and getattr (current_config , attr ))
172179 name = get_localised_response (inter , "{data}" , data = meta .name )
@@ -222,6 +229,12 @@ async def _send_category_options(
222229 meta = category_options [attr ]
223230 if not meta .modal :
224231 continue
232+ if not await can_guild_set_config_option (
233+ self .bot ,
234+ metadata = category_options [attr ],
235+ guild_id = inter .guild_id , # type: ignore
236+ ):
237+ continue
225238 if current_config :
226239 current = getattr (current_config , attr )
227240 else :
You can’t perform that action at this time.
0 commit comments