.textmute/.textunmute -> .chatmute/.chatunmute

This commit is contained in:
Kwoth 2016-10-22 09:43:12 +02:00
parent b9b42afe87
commit 5856f81bc6
3 changed files with 72 additions and 72 deletions

View File

@ -443,7 +443,7 @@ namespace NadekoBot.Modules.Administration
{
await user.ModifyAsync(usr => usr.Mute = true).ConfigureAwait(false);
await user.AddRolesAsync(await GetMuteRole(channel.Guild).ConfigureAwait(false)).ConfigureAwait(false);
await channel.SendMessageAsync($"**{user}** was text and voice muted successfully.").ConfigureAwait(false);
await channel.SendMessageAsync($"**{user}** was muted from text and voice chat successfully.").ConfigureAwait(false);
}
catch
{
@ -463,7 +463,7 @@ namespace NadekoBot.Modules.Administration
{
await user.ModifyAsync(usr => usr.Mute = false).ConfigureAwait(false);
await user.RemoveRolesAsync(await GetMuteRole(channel.Guild).ConfigureAwait(false)).ConfigureAwait(false);
await channel.SendMessageAsync($"**{user}** was text and voice muted successfully.").ConfigureAwait(false);
await channel.SendMessageAsync($"**{user}** was unmuted from text and voice chat successfully.").ConfigureAwait(false);
}
catch
{
@ -474,14 +474,14 @@ namespace NadekoBot.Modules.Administration
[NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)]
[RequirePermission(GuildPermission.ManageRoles)]
public async Task TextMute(IUserMessage umsg, IGuildUser user)
public async Task ChatMute(IUserMessage umsg, IGuildUser user)
{
var channel = (ITextChannel)umsg.Channel;
try
{
await user.AddRolesAsync(await GetMuteRole(channel.Guild).ConfigureAwait(false)).ConfigureAwait(false);
await channel.SendMessageAsync($"**{user}** was text muted successfully.").ConfigureAwait(false);
await channel.SendMessageAsync($"**{user}** was muted from chatting successfully.").ConfigureAwait(false);
}
catch
{
@ -492,14 +492,14 @@ namespace NadekoBot.Modules.Administration
[NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)]
[RequirePermission(GuildPermission.ManageRoles)]
public async Task TextUnmute(IUserMessage umsg, IGuildUser user)
public async Task ChatUnmute(IUserMessage umsg, IGuildUser user)
{
var channel = (ITextChannel)umsg.Channel;
try
{
await user.RemoveRolesAsync(await GetMuteRole(channel.Guild).ConfigureAwait(false)).ConfigureAwait(false);
await channel.SendMessageAsync($"**{user}** was text muted successfully.").ConfigureAwait(false);
await channel.SendMessageAsync($"**{user}** was unmuted from chatting successfully.").ConfigureAwait(false);
}
catch
{
@ -534,7 +534,7 @@ namespace NadekoBot.Modules.Administration
try
{
await user.ModifyAsync(usr => usr.Mute = false).ConfigureAwait(false);
await channel.SendMessageAsync("Unmute successful").ConfigureAwait(false);
await channel.SendMessageAsync($"**{user}** was voice unmuted successfully.").ConfigureAwait(false);
}
catch
{

View File

@ -1031,6 +1031,60 @@ namespace NadekoBot.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to chatmute.
/// </summary>
public static string chatmute_cmd {
get {
return ResourceManager.GetString("chatmute_cmd", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Prevents a mentioned user from chatting in text channels..
/// </summary>
public static string chatmute_desc {
get {
return ResourceManager.GetString("chatmute_desc", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to `{0}chatmute @Someone`.
/// </summary>
public static string chatmute_usage {
get {
return ResourceManager.GetString("chatmute_usage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to chatunmute.
/// </summary>
public static string chatunmute_cmd {
get {
return ResourceManager.GetString("chatunmute_cmd", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Removes a mute role previously set on a mentioned user with `{0}chatmute` which prevented him from chatting in text channels..
/// </summary>
public static string chatunmute_desc {
get {
return ResourceManager.GetString("chatunmute_desc", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to `{0}chatunmute @Someone`.
/// </summary>
public static string chatunmute_usage {
get {
return ResourceManager.GetString("chatunmute_usage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to checkmyperms.
/// </summary>
@ -6269,60 +6323,6 @@ namespace NadekoBot.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to textmute.
/// </summary>
public static string textmute_cmd {
get {
return ResourceManager.GetString("textmute_cmd", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Prevents a mentioned user from chatting in text channels..
/// </summary>
public static string textmute_desc {
get {
return ResourceManager.GetString("textmute_desc", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to `{0}textmute @Someone`.
/// </summary>
public static string textmute_usage {
get {
return ResourceManager.GetString("textmute_usage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to textunmute.
/// </summary>
public static string textunmute_cmd {
get {
return ResourceManager.GetString("textunmute_cmd", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Removes a mute role previously set on a mentioned user with `{0}textmute` which prevented him from chatting in text channels..
/// </summary>
public static string textunmute_desc {
get {
return ResourceManager.GetString("textunmute_desc", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to `{0}textunmute @Someone`.
/// </summary>
public static string textunmute_usage {
get {
return ResourceManager.GetString("textunmute_usage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to tl.
/// </summary>

View File

@ -2430,14 +2430,14 @@
<data name="antispam_usage" xml:space="preserve">
<value>`{0}antispam 3 Mute` or `{0}antispam 4 Kick` or `{0}antispam 6 Ban`</value>
</data>
<data name="textmute_cmd" xml:space="preserve">
<value>textmute</value>
<data name="chatmute_cmd" xml:space="preserve">
<value>chatmute</value>
</data>
<data name="textmute_desc" xml:space="preserve">
<data name="chatmute_desc" xml:space="preserve">
<value>Prevents a mentioned user from chatting in text channels.</value>
</data>
<data name="textmute_usage" xml:space="preserve">
<value>`{0}textmute @Someone`</value>
<data name="chatmute_usage" xml:space="preserve">
<value>`{0}chatmute @Someone`</value>
</data>
<data name="voicemute_cmd" xml:space="preserve">
<value>voicemute</value>
@ -2484,14 +2484,14 @@
<data name="setstream_usage" xml:space="preserve">
<value>`{0}setstream https://www.twitch.tv/masterkwoth Developing Nakedo`</value>
</data>
<data name="textunmute_cmd" xml:space="preserve">
<value>textunmute</value>
<data name="chatunmute_cmd" xml:space="preserve">
<value>chatunmute</value>
</data>
<data name="textunmute_desc" xml:space="preserve">
<value>Removes a mute role previously set on a mentioned user with `{0}textmute` which prevented him from chatting in text channels.</value>
<data name="chatunmute_desc" xml:space="preserve">
<value>Removes a mute role previously set on a mentioned user with `{0}chatmute` which prevented him from chatting in text channels.</value>
</data>
<data name="textunmute_usage" xml:space="preserve">
<value>`{0}textunmute @Someone`</value>
<data name="chatunmute_usage" xml:space="preserve">
<value>`{0}chatunmute @Someone`</value>
</data>
<data name="unmute_cmd" xml:space="preserve">
<value>unmute</value>