File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -269,8 +269,8 @@ This is an example of how a single permission will look when represented as a js
269269 " permission" : True
270270 }
271271
272- Now, let take a look simple example. The slash command decorator have a permissions parameter Where
273- it takes in a dictionary. The key being the guild to apply permissions on, and value being the list
272+ Now, let take a look at an example. The slash command decorator have a permissions parameter where
273+ it takes in a dictionary. The key being the guild id to apply permissions on, and value being the list
274274of permissions to apply. For each permission, we can use the handy ``create_permission `` method to
275275build the permission json explain above.
276276
@@ -293,12 +293,13 @@ role with id ``99999999`` and disallowing user with id ``88888888`` from running
293293 async def test (ctx ):
294294 await ctx.send(content = " Hello World!" )
295295
296- Alternatively you can use the ``@slash.permission `` decorator to define your guild permissions for the command.
296+ Alternatively, you can use the ``@slash.permission `` decorator to define your guild permissions for the
297+ command as show in the following example:
297298
298299.. code-block :: python
299300
300301 from discord_slash.utils.manage_commands import create_permission
301- from discord_slash.model import SubcommandApplicationPermissionType
302+ from discord_slash.model import SlashCommandPermissionType
302303
303304 @slash.slash (name = " test" ,
304305 description = " This is just a test command, nothing more." )
You can’t perform that action at this time.
0 commit comments