1 |
# Locking Channels |
2 |
|
3 |
{% hint style="warning" %} |
4 |
This page is partially outdated, and therefore not everything described in this page may work with the latest versions of the bot. Please give us some time and we'll update these pages. |
5 |
{% endhint %} |
6 |
|
7 |
You can lock channels using `-lock` command. This sets a permission override to the target channel that denies `SEND_MESSAGES` permission for `@everyone` role. |
8 |
|
9 |
{% hint style="warning" %} |
10 |
If other roles have `SEND_MESSAGES` permission allowed then members having them could bypass the channel lock. You should take care about this. |
11 |
{% endhint %} |
12 |
|
13 |
**Legacy Command** |
14 |
|
15 |
``` |
16 |
-lock [ChannelID|ChannelMention] |
17 |
``` |
18 |
|
19 |
**Slash Command** |
20 |
|
21 |
``` |
22 |
/lock [Channel] |
23 |
``` |
24 |
|
25 |
{% hint style="info" %} |
26 |
If the channel is not specified then the system will lock the current channel. |
27 |
{% endhint %} |
28 |
|
29 |
#### Examples |
30 |
|
31 |
``` |
32 |
-lock |
33 |
-lock 347382275362482 |
34 |
-lock #general |
35 |
``` |
36 |
|
37 |
## Locking Channels in Bulk |
38 |
|
39 |
**Legacy Command** |
40 |
|
41 |
``` |
42 |
-lockall <...ChannelIDs|ChannelMentions> [--raid] |
43 |
``` |
44 |
|
45 |
**Slash Command** |
46 |
|
47 |
``` |
48 |
/lockall <...ChannelIDs> [Role] [Raid] |
49 |
``` |
50 |
|
51 |
* `Role`: The channel will be locked for this role. Defaults to `@everyone`. |
52 |
* `Raid`, `--raid`: Select and lock all Raid-protected channels. |
53 |
|
54 |
#### Examples |
55 |
|
56 |
``` |
57 |
-lockall --raid |
58 |
-lockall 347382275362482 |
59 |
-lockall #general |
60 |
``` |
61 |
|
62 |
## Unlocking Channels |
63 |
|
64 |
You can unlock channels back using `-unlock` command. This sets a permission override to the target channel that reverts the `SEND_MESSAGES` permission for `@everyone` role as it was before. |
65 |
|
66 |
**Legacy Command** |
67 |
|
68 |
``` |
69 |
-unlock [ChannelID|ChannelMention] |
70 |
``` |
71 |
|
72 |
**Slash Command** |
73 |
|
74 |
``` |
75 |
/unlock [Channel] |
76 |
``` |
77 |
|
78 |
{% hint style="info" %} |
79 |
If the channel is not specified then the system will unlock the current channel. |
80 |
{% endhint %} |
81 |
|
82 |
#### Examples |
83 |
|
84 |
``` |
85 |
-unlock |
86 |
-unlock 347382275362482 |
87 |
-unlock #general |
88 |
``` |
89 |
|
90 |
## Unlocking Channels in Bulk |
91 |
|
92 |
**Legacy Command** |
93 |
|
94 |
``` |
95 |
-unlockall <...ChannelIDs|ChannelMentions> [--raid] |
96 |
``` |
97 |
|
98 |
**Slash Command** |
99 |
|
100 |
``` |
101 |
/unlockall <...Channels> [Role] [Raid] |
102 |
``` |
103 |
|
104 |
* `Role`: The channel will be unlocked for this role. Defaults to `@everyone`. |
105 |
* `Raid`, `--raid`: Select and unlock all Raid-protected channels. |
106 |
|
107 |
#### Examples |
108 |
|
109 |
``` |
110 |
-unlockall --raid |
111 |
-unlockall 347382275362482 |
112 |
-unlockall #general |
113 |
``` |