Fixed .xpex command help, .xpex channel will now default to current channel

This commit is contained in:
Master Kwoth 2017-09-10 19:14:29 +02:00
parent 6b896d8091
commit b9f22df756
2 changed files with 5 additions and 2 deletions

View File

@ -130,8 +130,11 @@ namespace NadekoBot.Modules.Xp
[NadekoCommand, Usage, Description, Aliases]
[RequireUserPermission(GuildPermission.ManageChannels)]
[RequireContext(ContextType.Guild)]
public async Task XpExclude(Channel _, [Remainder] ITextChannel channel)
public async Task XpExclude(Channel _, [Remainder] ITextChannel channel = null)
{
if (channel == null)
channel = (ITextChannel)Context.Channel;
var ex = _service.ToggleExcludeChannel(Context.Guild.Id, channel.Id);
await ReplyConfirmLocalized((ex ? "excluded" : "not_excluded"), Format.Bold(channel.ToString())).ConfigureAwait(false);

View File

@ -3595,7 +3595,7 @@
<value>xpexclude xpex</value>
</data>
<data name="xpexclude_usage" xml:space="preserve">
<value>`{0}xpex User @b1nzy` `{0}xpex Server`</value>
<value>`{0}xpex Role Excluded-Role` `{0}xpex Server`</value>
</data>
<data name="xpexclude_desc" xml:space="preserve">
<value>Exclude a user or a role from the xp system, or whole current server.</value>