30 |
channel = await <TextChannel> options.options.getChannel('channel'); |
channel = await <TextChannel> options.options.getChannel('channel'); |
31 |
} |
} |
32 |
|
|
33 |
if (options.options.getChannel('role')) { |
if (options.options.getRole('role')) { |
34 |
role = await <Role> options.options.getRole('role'); |
role = await <Role> options.options.getRole('role'); |
35 |
} |
} |
36 |
} |
} |
81 |
let error = null; |
let error = null; |
82 |
|
|
83 |
if (!result) { |
if (!result) { |
84 |
error = 'This channel wasn\'t locked. If you want to force unlock, run this command with `--force` option or select `True` if using slash commands.'; |
error = 'This channel wasn\'t locked' + (role.id === msg.guild!.id ? '' : ' for the given role') + '. If you want to force unlock, run this command with `--force` option or select `True` if using slash commands.'; |
85 |
} |
} |
86 |
|
|
87 |
if (error) { |
if (error) { |