commit
9c8aab50e7
@ -26,6 +26,7 @@ Commands and aliases | Description | Usage
|
|||||||
`.removeallroles` `.rar` | Removes all roles from a mentioned user. **Requires ManageRoles server permission.** | `.rar @User`
|
`.removeallroles` `.rar` | Removes all roles from a mentioned user. **Requires ManageRoles server permission.** | `.rar @User`
|
||||||
`.createrole` `.cr` | Creates a role with a given name. **Requires ManageRoles server permission.** | `.cr Awesome Role`
|
`.createrole` `.cr` | Creates a role with a given name. **Requires ManageRoles server permission.** | `.cr Awesome Role`
|
||||||
`.rolecolor` `.rc` | Set a role's color to the hex or 0-255 rgb color value provided. **Requires ManageRoles server permission.** | `.rc Admin 255 200 100` or `.rc Admin ffba55`
|
`.rolecolor` `.rc` | Set a role's color to the hex or 0-255 rgb color value provided. **Requires ManageRoles server permission.** | `.rc Admin 255 200 100` or `.rc Admin ffba55`
|
||||||
|
`.rolehoist` `.rh` | Set whether the role should be displayed separately in the sidebar **Requires ManageRoles server permission.** | `.rh Guests true` or `.rolehoist "Space Wizards" true`
|
||||||
`.deafen` `.deaf` | Deafens mentioned user or users. **Requires DeafenMembers server permission.** | `.deaf "@Someguy"` or `.deaf "@Someguy" "@Someguy"`
|
`.deafen` `.deaf` | Deafens mentioned user or users. **Requires DeafenMembers server permission.** | `.deaf "@Someguy"` or `.deaf "@Someguy" "@Someguy"`
|
||||||
`.undeafen` `.undef` | Undeafens mentioned user or users. **Requires DeafenMembers server permission.** | `.undef "@Someguy"` or `.undef "@Someguy" "@Someguy"`
|
`.undeafen` `.undef` | Undeafens mentioned user or users. **Requires DeafenMembers server permission.** | `.undef "@Someguy"` or `.undef "@Someguy" "@Someguy"`
|
||||||
`.delvoichanl` `.dvch` | Deletes a voice channel with a given name. **Requires ManageChannels server permission.** | `.dvch VoiceChannelName`
|
`.delvoichanl` `.dvch` | Deletes a voice channel with a given name. **Requires ManageChannels server permission.** | `.dvch VoiceChannelName`
|
||||||
|
@ -12,6 +12,7 @@ using NadekoBot.Services.Database.Models;
|
|||||||
using static NadekoBot.Modules.Permissions.Permissions;
|
using static NadekoBot.Modules.Permissions.Permissions;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using NLog;
|
using NLog;
|
||||||
|
using NadekoBot.Modules.Permissions;
|
||||||
|
|
||||||
namespace NadekoBot.Modules.Administration
|
namespace NadekoBot.Modules.Administration
|
||||||
{
|
{
|
||||||
@ -196,6 +197,19 @@ namespace NadekoBot.Modules.Administration
|
|||||||
await ReplyConfirmLocalized("cr", Format.Bold(r.Name)).ConfigureAwait(false);
|
await ReplyConfirmLocalized("cr", Format.Bold(r.Name)).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
|
[RequireContext(ContextType.Guild)]
|
||||||
|
[RequireUserPermission(GuildPermission.ManageRoles)]
|
||||||
|
[RequireBotPermission(GuildPermission.ManageRoles)]
|
||||||
|
public async Task RoleHoist(string roleSearchName, PermissionAction targetState)
|
||||||
|
{
|
||||||
|
var roleName = roleSearchName.ToUpperInvariant();
|
||||||
|
var role = Context.Guild.Roles.FirstOrDefault(r => r.Name.ToUpperInvariant() == roleName);
|
||||||
|
|
||||||
|
await role.ModifyAsync(r => r.Hoist = targetState.Value).ConfigureAwait(false);
|
||||||
|
await ReplyConfirmLocalized("rh", Format.Bold(role.Name), Format.Bold(targetState.Value.ToString())).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
[NadekoCommand, Usage, Description, Aliases]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[RequireUserPermission(GuildPermission.ManageRoles)]
|
[RequireUserPermission(GuildPermission.ManageRoles)]
|
||||||
|
27
src/NadekoBot/Resources/CommandStrings.Designer.cs
generated
27
src/NadekoBot/Resources/CommandStrings.Designer.cs
generated
@ -6593,6 +6593,33 @@ namespace NadekoBot.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to rolehoist rh.
|
||||||
|
/// </summary>
|
||||||
|
public static string rolehoist_cmd {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("rolehoist_cmd", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Toggles if this role is displayed in the sidebar or not.
|
||||||
|
/// </summary>
|
||||||
|
public static string rolehoist_desc {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("rolehoist_desc", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to `{0}rh Guests true` or `{0}rh "Space Wizards" true.
|
||||||
|
/// </summary>
|
||||||
|
public static string rolehoist_usage {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("rolehoist_usage", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to rolemdl rm.
|
/// Looks up a localized string similar to rolemdl rm.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -3366,4 +3366,13 @@
|
|||||||
<data name="time_usage" xml:space="preserve">
|
<data name="time_usage" xml:space="preserve">
|
||||||
<value>`{0}time London, UK`</value>
|
<value>`{0}time London, UK`</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="rolehoist_cmd" xml:space="preserve">
|
||||||
|
<value>rolehoist rh</value>
|
||||||
|
</data>
|
||||||
|
<data name="rolehoist_desc" xml:space="preserve">
|
||||||
|
<value>Toggles if this role is displayed in the sidebar or not</value>
|
||||||
|
</data>
|
||||||
|
<data name="rolehoist_usage" xml:space="preserve">
|
||||||
|
<value>`{0}rh Guests true` or `{0}rh "Space Wizards" true</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@ -1168,6 +1168,15 @@ namespace NadekoBot.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Set the display of guild role {0} to {1}..
|
||||||
|
/// </summary>
|
||||||
|
public static string administration_rh {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("administration_rh", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Role {0} as been added to the list..
|
/// Looks up a localized string similar to Role {0} as been added to the list..
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -2406,4 +2406,7 @@ Owner ID: {2}</value>
|
|||||||
<value>Time in {0} is {1} - {2}</value>
|
<value>Time in {0} is {1} - {2}</value>
|
||||||
<comment>Time in London, UK is 15:30 - Time Zone Name</comment>
|
<comment>Time in London, UK is 15:30 - Time Zone Name</comment>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="administration_rh" xml:space="preserve">
|
||||||
|
<value>Set the display of guild role {0} to {1}.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
Loading…
Reference in New Issue
Block a user