added weather example, fixed some descriptions, forgot to close #231

This commit is contained in:
Master Kwoth 2016-04-24 14:26:51 +02:00
parent 5abd1e8800
commit a7e2771fcc
2 changed files with 46 additions and 51 deletions

View File

@ -1,6 +1,7 @@
using Discord.Commands;
using NadekoBot.Extensions;
using NadekoBot.Modules;
using NadekoBot.Modules.Permissions.Classes;
using System;
using System.Threading.Tasks;
@ -79,11 +80,10 @@ namespace NadekoBot.Classes.Conversations.Commands
});
cgb.CreateCommand("dr")
.Description("Deletes a request. Only owner is able to do this.")
.Description("Deletes a request. **Owner Only!**")
.Parameter("reqNumber", ParameterType.Required)
.AddCheck(SimpleCheckers.OwnerOnly())
.Do(async e =>
{
if (NadekoBot.IsOwner(e.User.Id))
{
try
{
@ -100,16 +100,13 @@ namespace NadekoBot.Classes.Conversations.Commands
{
await e.Channel.SendMessage("Error deleting request, probably NaN error.").ConfigureAwait(false);
}
}
else await e.Channel.SendMessage("You don't have permission to do that.").ConfigureAwait(false);
});
cgb.CreateCommand("rr")
.Description("Resolves a request. Only owner is able to do this.")
.Description("Resolves a request. **Owner Only!**")
.Parameter("reqNumber", ParameterType.Required)
.AddCheck(SimpleCheckers.OwnerOnly())
.Do(async e =>
{
if (NadekoBot.IsOwner(e.User.Id))
{
try
{
@ -128,8 +125,6 @@ namespace NadekoBot.Classes.Conversations.Commands
{
await e.Channel.SendMessage("Error resolving request, probably NaN error.").ConfigureAwait(false);
}
}
else await e.Channel.SendMessage("You don't have permission to do that.").ConfigureAwait(false);
});
}

View File

@ -42,7 +42,7 @@ namespace NadekoBot.Modules.Searches
commands.ForEach(cmd => cmd.Init(cgb));
cgb.CreateCommand(Prefix + "we")
.Description("Shows weather data for a specified city and a country BOTH ARE REQUIRED. Weather api is very random if you make a mistake.")
.Description($"Shows weather data for a specified city and a country. BOTH ARE REQUIRED. Use country abbrevations.\n**Usage**: {Prefix}we Moscow RF")
.Parameter("city", ParameterType.Required)
.Parameter("country", ParameterType.Required)
.Do(async e =>