permissions.rst 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. ===========
  2. Permissions
  3. ===========
  4. There are two types of permissions - channel permissions and role permissions. They are represented by their individual classes, but both extend the same abstract permission class.
  5. Properties
  6. ==========
  7. ===================== ==== ======================
  8. name type description
  9. ===================== ==== ======================
  10. bitwise int bitwise representation
  11. create_instant_invite bool
  12. manage_channels bool
  13. view_channel bool
  14. manage_roles bool
  15. ===================== ==== ======================
  16. The rest of the properties are listed under each permission type, all are type of ``bool``.
  17. Methods
  18. =======
  19. Get all valid permissions
  20. -------------------------
  21. Returns a list of valid permissions, in key value form. Static method.
  22. .. code:: php
  23. var_dump(ChannelPermission::getPermissions());
  24. // [
  25. // 'priority_speaker' => 8,
  26. // // ...
  27. // ]
  28. Channel Permission
  29. ==================
  30. Represents permissions for text, voice, and stage instance channels.
  31. Text Channel Permissions
  32. ------------------------
  33. - ``create_instant_invite``
  34. - ``manage_channels``
  35. - ``view_channel``
  36. - ``manage_roles``
  37. - ``add_reactions``
  38. - ``send_messages``
  39. - ``send_tts_messages``
  40. - ``manage_messages``
  41. - ``embed_links``
  42. - ``attach_files``
  43. - ``read_message_history``
  44. - ``mention_everyone``
  45. - ``use_external_emojis``
  46. - ``manage_webhooks``
  47. - ``use_application_commands``
  48. - ``manage_threads``
  49. - ``create_public_threads``
  50. - ``create_private_threads``
  51. - ``use_external_stickers``
  52. - ``send_messages_in_threads``
  53. Voice Channel Permissions
  54. -------------------------
  55. - ``create_instant_invite``
  56. - ``manage_channels``
  57. - ``view_channel``
  58. - ``manage_roles``
  59. - ``priority_speaker``
  60. - ``stream``
  61. - ``connect``
  62. - ``speak``
  63. - ``mute_members``
  64. - ``deafen_members``
  65. - ``move_members``
  66. - ``use_vad``
  67. - ``manage_events``
  68. - ``use_embedded_activities`` was ``start_embedded_activities``
  69. Stage Instance Channel Permissions
  70. ----------------------------------
  71. - ``create_instant_invite``
  72. - ``manage_channels``
  73. - ``view_channel``
  74. - ``manage_roles``
  75. - ``connect``
  76. - ``mute_members``
  77. - ``deafen_members``
  78. - ``move_members``
  79. - ``request_to_speak``
  80. - ``manage_events``
  81. Role Permissions
  82. ================
  83. Represents permissions for roles.
  84. Permissions
  85. -----------
  86. - ``create_instant_invite``
  87. - ``manage_channels``
  88. - ``view_channel``
  89. - ``manage_roles``
  90. - ``kick_members``
  91. - ``ban_members``
  92. - ``administrator``
  93. - ``manage_guild``
  94. - ``view_audit_log``
  95. - ``view_guild_insights``
  96. - ``change_nickname``
  97. - ``manage_nicknames``
  98. - ``manage_emojis_and_stickers``
  99. - ``moderate_members``