.unmute renamed to .voiceunmute

This commit is contained in:
Kwoth 2016-10-19 08:09:25 +02:00
parent 9c22ee7b96
commit b18b805f4d
3 changed files with 35 additions and 41 deletions

View File

@ -468,18 +468,12 @@ namespace NadekoBot.Modules.Administration
[NadekoCommand, Usage, Description, Aliases] [NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)] [RequireContext(ContextType.Guild)]
[RequirePermission(GuildPermission.MuteMembers)] [RequirePermission(GuildPermission.MuteMembers)]
public async Task Unmute(IUserMessage umsg, params IGuildUser[] users) public async Task VoiceUnmute(IUserMessage umsg, IGuildUser user)
{ {
var channel = (ITextChannel)umsg.Channel; var channel = (ITextChannel)umsg.Channel;
if (!users.Any())
return;
try try
{ {
foreach (var u in users) await user.ModifyAsync(usr => usr.Mute = false).ConfigureAwait(false);
{
await u.ModifyAsync(usr => usr.Mute = false).ConfigureAwait(false);
}
await channel.SendMessageAsync("Unmute successful").ConfigureAwait(false); await channel.SendMessageAsync("Unmute successful").ConfigureAwait(false);
} }
catch catch

View File

@ -7187,33 +7187,6 @@ namespace NadekoBot.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to unmute.
/// </summary>
public static string unmute_cmd {
get {
return ResourceManager.GetString("unmute_cmd", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Unmutes mentioned user or users. .
/// </summary>
public static string unmute_desc {
get {
return ResourceManager.GetString("unmute_desc", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to `.unmute &quot;@Someguy&quot;` or `.unmute &quot;@Someguy&quot; &quot;@Someguy&quot;`.
/// </summary>
public static string unmute_usage {
get {
return ResourceManager.GetString("unmute_usage", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to unstuck. /// Looks up a localized string similar to unstuck.
/// </summary> /// </summary>
@ -7619,6 +7592,33 @@ namespace NadekoBot.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to voiceunmute.
/// </summary>
public static string voiceunmute_cmd {
get {
return ResourceManager.GetString("voiceunmute_cmd", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Gives a previously voice-muted user a permission to speak. .
/// </summary>
public static string voiceunmute_desc {
get {
return ResourceManager.GetString("voiceunmute_desc", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to `.unmute @Someguy`.
/// </summary>
public static string voiceunmute_usage {
get {
return ResourceManager.GetString("voiceunmute_usage", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to volume vol. /// Looks up a localized string similar to volume vol.
/// </summary> /// </summary>

View File

@ -621,14 +621,14 @@
<data name="mute_usage" xml:space="preserve"> <data name="mute_usage" xml:space="preserve">
<value>`.mute @Someone`</value> <value>`.mute @Someone`</value>
</data> </data>
<data name="unmute_cmd" xml:space="preserve"> <data name="voiceunmute_cmd" xml:space="preserve">
<value>unmute</value> <value>voiceunmute</value>
</data> </data>
<data name="unmute_desc" xml:space="preserve"> <data name="voiceunmute_desc" xml:space="preserve">
<value>Unmutes mentioned user or users. </value> <value>Gives a previously voice-muted user a permission to speak. </value>
</data> </data>
<data name="unmute_usage" xml:space="preserve"> <data name="voiceunmute_usage" xml:space="preserve">
<value>`.unmute "@Someguy"` or `.unmute "@Someguy" "@Someguy"`</value> <value>`.unmute @Someguy`</value>
</data> </data>
<data name="deafen_cmd" xml:space="preserve"> <data name="deafen_cmd" xml:space="preserve">
<value>deafen deaf</value> <value>deafen deaf</value>