.textmute/.textunmute -> .chatmute/.chatunmute
This commit is contained in:
parent
b9b42afe87
commit
5856f81bc6
@ -443,7 +443,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
{
|
{
|
||||||
await user.ModifyAsync(usr => usr.Mute = true).ConfigureAwait(false);
|
await user.ModifyAsync(usr => usr.Mute = true).ConfigureAwait(false);
|
||||||
await user.AddRolesAsync(await GetMuteRole(channel.Guild).ConfigureAwait(false)).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
|
catch
|
||||||
{
|
{
|
||||||
@ -463,7 +463,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
{
|
{
|
||||||
await user.ModifyAsync(usr => usr.Mute = false).ConfigureAwait(false);
|
await user.ModifyAsync(usr => usr.Mute = false).ConfigureAwait(false);
|
||||||
await user.RemoveRolesAsync(await GetMuteRole(channel.Guild).ConfigureAwait(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
|
catch
|
||||||
{
|
{
|
||||||
@ -474,14 +474,14 @@ namespace NadekoBot.Modules.Administration
|
|||||||
[NadekoCommand, Usage, Description, Aliases]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[RequirePermission(GuildPermission.ManageRoles)]
|
[RequirePermission(GuildPermission.ManageRoles)]
|
||||||
public async Task TextMute(IUserMessage umsg, IGuildUser user)
|
public async Task ChatMute(IUserMessage umsg, IGuildUser user)
|
||||||
{
|
{
|
||||||
var channel = (ITextChannel)umsg.Channel;
|
var channel = (ITextChannel)umsg.Channel;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await user.AddRolesAsync(await GetMuteRole(channel.Guild).ConfigureAwait(false)).ConfigureAwait(false);
|
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
|
catch
|
||||||
{
|
{
|
||||||
@ -492,14 +492,14 @@ namespace NadekoBot.Modules.Administration
|
|||||||
[NadekoCommand, Usage, Description, Aliases]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[RequirePermission(GuildPermission.ManageRoles)]
|
[RequirePermission(GuildPermission.ManageRoles)]
|
||||||
public async Task TextUnmute(IUserMessage umsg, IGuildUser user)
|
public async Task ChatUnmute(IUserMessage umsg, IGuildUser user)
|
||||||
{
|
{
|
||||||
var channel = (ITextChannel)umsg.Channel;
|
var channel = (ITextChannel)umsg.Channel;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await user.RemoveRolesAsync(await GetMuteRole(channel.Guild).ConfigureAwait(false)).ConfigureAwait(false);
|
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
|
catch
|
||||||
{
|
{
|
||||||
@ -534,7 +534,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
await user.ModifyAsync(usr => usr.Mute = false).ConfigureAwait(false);
|
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
|
catch
|
||||||
{
|
{
|
||||||
|
108
src/NadekoBot/Resources/CommandStrings.Designer.cs
generated
108
src/NadekoBot/Resources/CommandStrings.Designer.cs
generated
@ -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>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to checkmyperms.
|
/// Looks up a localized string similar to checkmyperms.
|
||||||
/// </summary>
|
/// </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>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to tl.
|
/// Looks up a localized string similar to tl.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -2430,14 +2430,14 @@
|
|||||||
<data name="antispam_usage" xml:space="preserve">
|
<data name="antispam_usage" xml:space="preserve">
|
||||||
<value>`{0}antispam 3 Mute` or `{0}antispam 4 Kick` or `{0}antispam 6 Ban`</value>
|
<value>`{0}antispam 3 Mute` or `{0}antispam 4 Kick` or `{0}antispam 6 Ban`</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="textmute_cmd" xml:space="preserve">
|
<data name="chatmute_cmd" xml:space="preserve">
|
||||||
<value>textmute</value>
|
<value>chatmute</value>
|
||||||
</data>
|
</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>
|
<value>Prevents a mentioned user from chatting in text channels.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="textmute_usage" xml:space="preserve">
|
<data name="chatmute_usage" xml:space="preserve">
|
||||||
<value>`{0}textmute @Someone`</value>
|
<value>`{0}chatmute @Someone`</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="voicemute_cmd" xml:space="preserve">
|
<data name="voicemute_cmd" xml:space="preserve">
|
||||||
<value>voicemute</value>
|
<value>voicemute</value>
|
||||||
@ -2484,14 +2484,14 @@
|
|||||||
<data name="setstream_usage" xml:space="preserve">
|
<data name="setstream_usage" xml:space="preserve">
|
||||||
<value>`{0}setstream https://www.twitch.tv/masterkwoth Developing Nakedo`</value>
|
<value>`{0}setstream https://www.twitch.tv/masterkwoth Developing Nakedo`</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="textunmute_cmd" xml:space="preserve">
|
<data name="chatunmute_cmd" xml:space="preserve">
|
||||||
<value>textunmute</value>
|
<value>chatunmute</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="textunmute_desc" xml:space="preserve">
|
<data name="chatunmute_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>
|
<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>
|
||||||
<data name="textunmute_usage" xml:space="preserve">
|
<data name="chatunmute_usage" xml:space="preserve">
|
||||||
<value>`{0}textunmute @Someone`</value>
|
<value>`{0}chatunmute @Someone`</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="unmute_cmd" xml:space="preserve">
|
<data name="unmute_cmd" xml:space="preserve">
|
||||||
<value>unmute</value>
|
<value>unmute</value>
|
||||||
|
Loading…
Reference in New Issue
Block a user