So many fixes. Thanks a lot to @fearnlj01 for the testing

This commit is contained in:
Kwoth 2016-10-10 02:27:33 +02:00
parent 46000b3604
commit 75c4da7edd
11 changed files with 146 additions and 163 deletions

View File

@ -86,6 +86,7 @@ namespace NadekoBot.Modules.Administration
[NadekoCommand, Usage, Description, Aliases] [NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)] [RequireContext(ContextType.Guild)]
[RequirePermission(GuildPermission.ManageMessages)]
public async Task Slowmode(IUserMessage umsg, int msg = 1, int perSec = 5) public async Task Slowmode(IUserMessage umsg, int msg = 1, int perSec = 5)
{ {
var channel = (ITextChannel)umsg.Channel; var channel = (ITextChannel)umsg.Channel;

View File

@ -127,7 +127,7 @@ namespace NadekoBot.Modules.Help
var helpstr = new StringBuilder(); var helpstr = new StringBuilder();
var lastModule = ""; var lastModule = "";
foreach (var com in _commands.Commands) foreach (var com in _commands.Commands.GroupBy(c=>c.Text).Select(g=>g.First()))
{ {
if (com.Module.Name != lastModule) if (com.Module.Name != lastModule)
{ {

View File

@ -109,7 +109,7 @@ namespace NadekoBot.Modules.Searches
await msg.ReplyLong(sb.ToString(), breakOn: new[] { "```xl\n", "\n" }); await msg.ReplyLong(sb.ToString(), breakOn: new[] { "```xl\n", "\n" });
} }
[NadekoCommand, Usage, Description, Aliases] [NadekoCommand, Usage, Description, Aliases]
public async Task Convert(IUserMessage msg, string origin, string target, decimal value) public async Task Convert(IUserMessage msg, string origin, string target, double value)
{ {
var originUnit = Units.Find(x => x.Triggers.Select(y => y.ToLowerInvariant()).Contains(origin.ToLowerInvariant())); var originUnit = Units.Find(x => x.Triggers.Select(y => y.ToLowerInvariant()).Contains(origin.ToLowerInvariant()));
var targetUnit = Units.Find(x => x.Triggers.Select(y => y.ToLowerInvariant()).Contains(target.ToLowerInvariant())); var targetUnit = Units.Find(x => x.Triggers.Select(y => y.ToLowerInvariant()).Contains(target.ToLowerInvariant()));
@ -123,7 +123,7 @@ namespace NadekoBot.Modules.Searches
await msg.Reply(string.Format("Cannot convert {0} to {1}: types of unit are not equal", originUnit.Triggers.First(), targetUnit.Triggers.First())); await msg.Reply(string.Format("Cannot convert {0} to {1}: types of unit are not equal", originUnit.Triggers.First(), targetUnit.Triggers.First()));
return; return;
} }
decimal res; double res;
if (originUnit.Triggers == targetUnit.Triggers) res = value; if (originUnit.Triggers == targetUnit.Triggers) res = value;
else if (originUnit.UnitType == "temperature") else if (originUnit.UnitType == "temperature")
{ {
@ -131,10 +131,10 @@ namespace NadekoBot.Modules.Searches
switch (originUnit.Triggers.First().ToUpperInvariant()) switch (originUnit.Triggers.First().ToUpperInvariant())
{ {
case "C": case "C":
res = value + (decimal)273.15; //celcius! res = value + 273.15; //celcius!
break; break;
case "F": case "F":
res = (value + (decimal)459.67) * ((decimal)5 / 9); res = (value + 459.67) * (5 / 9);
break; break;
default: default:
res = value; res = value;
@ -144,10 +144,10 @@ namespace NadekoBot.Modules.Searches
switch (targetUnit.Triggers.First()) switch (targetUnit.Triggers.First())
{ {
case "C": case "C":
res = value - (decimal)273.15; //celcius! res = value - 273.15; //celcius!
break; break;
case "F": case "F":
res = res * ((decimal)9 / 5) - (decimal)458.67; res = res * (9 / 5) - 458.67;
break; break;
default: default:
break; break;
@ -157,13 +157,14 @@ namespace NadekoBot.Modules.Searches
{ {
if (originUnit.UnitType == "currency") if (originUnit.UnitType == "currency")
{ {
res = (value * targetUnit.Modifier) / originUnit.Modifier; res = (value * (double)targetUnit.Modifier) / (double)originUnit.Modifier;
} }
else else
res = (value * originUnit.Modifier) / targetUnit.Modifier; res = (value * (double)originUnit.Modifier) / (double)targetUnit.Modifier;
} }
res = Math.Round(res, 2); res = Math.Round(res, 2);
await msg.Reply(string.Format("{0} {1} is equal to {2} {3}", value, originUnit.Triggers.First(), res, targetUnit.Triggers.First()));
await msg.Reply(string.Format("{0} {1}s is equal to {2} {3}s", value, originUnit.Triggers.First().SnPl(value.IsInteger() ? (int)value : 2), res, targetUnit.Triggers.First().SnPl(res.IsInteger() ? (int)res : 2)));
} }
} }

View File

@ -39,7 +39,7 @@ namespace NadekoBot.Modules.Searches
country = city.Replace(" ", ""); country = city.Replace(" ", "");
string response; string response;
using (var http = new HttpClient()) using (var http = new HttpClient())
response = await http.GetStringAsync($"http://api.lawlypopzz.xyz/nadekobot/weather/?city={city}&country={country}").ConfigureAwait(false); response = await http.GetStringAsync($"http://api.ninetales.us/nadekobot/weather/?city={city}&country={country}").ConfigureAwait(false);
var obj = JObject.Parse(response)["weather"]; var obj = JObject.Parse(response)["weather"];

View File

@ -73,18 +73,22 @@ namespace NadekoBot.Modules.Utility
if (string.IsNullOrWhiteSpace(keyword)) if (string.IsNullOrWhiteSpace(keyword))
return; return;
var isAdmin = ((IGuildUser)umsg.Author).GuildPermissions.Administrator;
keyword = keyword.ToUpperInvariant(); keyword = keyword.ToUpperInvariant();
string response; string response;
using (var uow = DbHandler.UnitOfWork()) using (var uow = DbHandler.UnitOfWork())
{ {
var q = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Guild.Id, keyword).ConfigureAwait(false); var qs = uow.Quotes.GetAllQuotesByKeyword(channel.Guild.Id, keyword);
if (q == null) if (qs==null || !qs.Any())
{ {
response = "`No quotes found.`"; response = "`No quotes found.`";
return; return;
} }
var q = qs.Shuffle().FirstOrDefault(elem => isAdmin || elem.AuthorId == umsg.Author.Id);
uow.Quotes.Remove(q); uow.Quotes.Remove(q);
await uow.CompleteAsync().ConfigureAwait(false); await uow.CompleteAsync().ConfigureAwait(false);
response = "`Deleted a random quote`"; response = "`Deleted a random quote`";
@ -94,6 +98,7 @@ namespace NadekoBot.Modules.Utility
[NadekoCommand, Usage, Description, Aliases] [NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)] [RequireContext(ContextType.Guild)]
[RequirePermission(GuildPermission.Administrator)]
public async Task DelAllQuotes(IUserMessage umsg, [Remainder] string keyword) public async Task DelAllQuotes(IUserMessage umsg, [Remainder] string keyword)
{ {
var channel = (ITextChannel)umsg.Channel; var channel = (ITextChannel)umsg.Channel;
@ -105,7 +110,7 @@ namespace NadekoBot.Modules.Utility
using (var uow = DbHandler.UnitOfWork()) using (var uow = DbHandler.UnitOfWork())
{ {
var quotes = uow.Quotes.GetAllQuotesByKeyword(keyword); var quotes = uow.Quotes.GetAllQuotesByKeyword(channel.Guild.Id, keyword);
uow.Quotes.RemoveRange(quotes.ToArray());//wtf?! uow.Quotes.RemoveRange(quotes.ToArray());//wtf?!

View File

@ -116,20 +116,30 @@ namespace NadekoBot.Modules.Utility
[NadekoCommand, Usage, Description, Aliases] [NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)] [RequireContext(ContextType.Guild)]
public async Task Roles(IUserMessage msg, IGuildUser target = null) public async Task Roles(IUserMessage msg, IGuildUser target, int page = 1)
{ {
var channel = (ITextChannel)msg.Channel; var channel = (ITextChannel)msg.Channel;
var guild = channel.Guild; var guild = channel.Guild;
const int RolesPerPage = 20;
if (page < 1 || page > 100)
return;
if (target != null) if (target != null)
{ {
await msg.Reply($"`List of roles for **{target.Username}**:` \n• " + string.Join("\n• ", target.Roles.Except(new[] { guild.EveryoneRole }).OrderBy(r => r.Position)).SanitizeMentions()); await msg.Reply($"`Page #{page} of roles for **{target.Username}**:` \n• " + string.Join("\n• ", target.Roles.Skip((page-1) * RolesPerPage).Take(RolesPerPage).Except(new[] { guild.EveryoneRole }).OrderBy(r => r.Position)).SanitizeMentions());
} }
else else
{ {
await msg.Reply("`List of roles:` \n• " + string.Join("\n• ", guild.Roles.Except(new[] { guild.EveryoneRole }).OrderBy(r=>r.Position)).SanitizeMentions()); await msg.Reply($"`Page #{page} of all roles on this server:` \n• " + string.Join("\n• ", guild.Roles.Skip((page - 1) * RolesPerPage).Take(RolesPerPage).Except(new[] { guild.EveryoneRole }).OrderBy(r => r.Position)).SanitizeMentions());
} }
} }
[NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)]
public Task Roles(IUserMessage msg, int page = 1) =>
Roles(msg, null, page);
[NadekoCommand, Usage, Description, Aliases] [NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)] [RequireContext(ContextType.Guild)]
public async Task ChannelTopic(IUserMessage umsg) public async Task ChannelTopic(IUserMessage umsg)

View File

@ -78,7 +78,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to `&gt;8ball should i do something`. /// Looks up a localized string similar to `&gt;8ball should I do something`.
/// </summary> /// </summary>
public static string _8ball_usage { public static string _8ball_usage {
get { get {
@ -96,7 +96,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Add a custom reaction with a trigger and a response. Running this command in server requires Administration permission. Running this command in DM is Bot Owner only and adds a new global custom reaction. Guide here: &lt;https://github.com/Kwoth/NadekoBot/wiki/Custom-Reactions&gt;. /// Looks up a localized string similar to Add a custom reaction with a trigger and a response. Running this command in server requires Administration permission. Running this command in DM is Bot Owner only and adds a new global custom reaction. Guide here: &lt;http://nadekobot.readthedocs.io/en/1.0/Custom%20Reactions/&gt;.
/// </summary> /// </summary>
public static string addcustreact_desc { public static string addcustreact_desc {
get { get {
@ -501,7 +501,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Gives someone a certain amount of flowers. . /// Looks up a localized string similar to Awards someone a certain amount of currency. .
/// </summary> /// </summary>
public static string award_desc { public static string award_desc {
get { get {
@ -582,7 +582,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Bet to guess will the result be heads or tails. Guessing award you double flowers you&apos;ve bet.. /// Looks up a localized string similar to Bet to guess will the result be heads or tails. Guessing awards you double flowers you&apos;ve bet..
/// </summary> /// </summary>
public static string betflip_desc { public static string betflip_desc {
get { get {
@ -1122,7 +1122,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Enables or disables automatic deleting of invites on the channel.If no channel supplied, it will default to current one. Use ALL to apply to all existing channels at once.. /// Looks up a localized string similar to Toggles automatic deleting of invites posted in the channel. Does not negate the .srvrfilterinv enabled setting..
/// </summary> /// </summary>
public static string chnlfilterinv_desc { public static string chnlfilterinv_desc {
get { get {
@ -1131,7 +1131,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to `;cfi enable #general-chat`. /// Looks up a localized string similar to `;cfi`.
/// </summary> /// </summary>
public static string chnlfilterinv_usage { public static string chnlfilterinv_usage {
get { get {
@ -1149,7 +1149,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Enables or disables automatic deleting of messages containing banned words on the channel.If no channel supplied, it will default to current one. Use ALL to apply to all existing channels at once.. /// Looks up a localized string similar to Toggles automatic deleting of messages containing banned words on the channel. Does not negate the .srvrfilterwords enabled setting..
/// </summary> /// </summary>
public static string chnlfilterwords_desc { public static string chnlfilterwords_desc {
get { get {
@ -1158,7 +1158,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to `;cfw enable #general-chat`. /// Looks up a localized string similar to `;cfw`.
/// </summary> /// </summary>
public static string chnlfilterwords_usage { public static string chnlfilterwords_usage {
get { get {
@ -1329,7 +1329,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to claimfinish cf cf3 claimfinish3. /// Looks up a localized string similar to claimfinish cf.
/// </summary> /// </summary>
public static string claimfinish_cmd { public static string claimfinish_cmd {
get { get {
@ -1338,7 +1338,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Finish your claim with 3 stars if you destroyed a base. Optional second argument finishes for someone else.. /// Looks up a localized string similar to Finish your claim with 3 stars if you destroyed a base. First argument is the war number, optional second argument finishes for someone else..
/// </summary> /// </summary>
public static string claimfinish_desc { public static string claimfinish_desc {
get { get {
@ -1347,7 +1347,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to `,cf [war_number] [optional_other_name]`. /// Looks up a localized string similar to `,cf 1 Someone`.
/// </summary> /// </summary>
public static string claimfinish_usage { public static string claimfinish_usage {
get { get {
@ -1365,7 +1365,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Finish your claim with 1 stars if you destroyed a base. Optional second argument finishes for someone else.. /// Looks up a localized string similar to Finish your claim with 1 star if you destroyed a base. First argument is the war number, optional second argument finishes for someone else..
/// </summary> /// </summary>
public static string claimfinish1_desc { public static string claimfinish1_desc {
get { get {
@ -1374,7 +1374,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to `,cf [war_number] [optional_other_name]`. /// Looks up a localized string similar to `,cf1 2 SomeGirl`.
/// </summary> /// </summary>
public static string claimfinish1_usage { public static string claimfinish1_usage {
get { get {
@ -1392,7 +1392,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Finish your claim with 2 stars if you destroyed a base. Optional second argument finishes for someone else.. /// Looks up a localized string similar to Finish your claim with 2 stars if you destroyed a base. First argument is the war number, optional second argument finishes for someone else..
/// </summary> /// </summary>
public static string claimfinish2_desc { public static string claimfinish2_desc {
get { get {
@ -1401,7 +1401,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to `,cf [war_number] [optional_other_name]`. /// Looks up a localized string similar to `,cf2 1 SomeGuy`.
/// </summary> /// </summary>
public static string claimfinish2_usage { public static string claimfinish2_usage {
get { get {
@ -1473,7 +1473,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Sets a cooldown per user for a command. Set 0 to clear.. /// Looks up a localized string similar to Sets a cooldown per user for a command. Set to 0 to remove the cooldown..
/// </summary> /// </summary>
public static string cmdcooldown_desc { public static string cmdcooldown_desc {
get { get {
@ -1527,7 +1527,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to List all of the bot&apos;s commands from a certain module.. /// Looks up a localized string similar to List all of the bot&apos;s commands from a certain module. You can either specify full, or only first few letters of the module name..
/// </summary> /// </summary>
public static string commands_desc { public static string commands_desc {
get { get {
@ -1536,7 +1536,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to `-commands` or `.commands`. /// Looks up a localized string similar to `-commands Administration` or `-cmds Admin`.
/// </summary> /// </summary>
public static string commands_usage { public static string commands_usage {
get { get {
@ -1554,7 +1554,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Convert quantities from&gt;to.. /// Looks up a localized string similar to Convert quantities. Use `~convertlist` to see supported dimensions and currencies..
/// </summary> /// </summary>
public static string convert_desc { public static string convert_desc {
get { get {
@ -1563,7 +1563,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to `~convert m&gt;km 1000`. /// Looks up a localized string similar to `~convert m km 1000`.
/// </summary> /// </summary>
public static string convert_usage { public static string convert_usage {
get { get {
@ -1581,7 +1581,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to List of the convertable dimensions and currencies.. /// Looks up a localized string similar to List of the convertible dimensions and currencies..
/// </summary> /// </summary>
public static string convertlist_desc { public static string convertlist_desc {
get { get {
@ -1905,7 +1905,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Deletes all quotes with the specified keyword. You have to either be bot owner or the creator of the quote to delete it.. /// Looks up a localized string similar to Deletes a random quote with the specified keyword. You have to either be server Administrator or the creator of the quote to delete it..
/// </summary> /// </summary>
public static string deletequote_desc { public static string deletequote_desc {
get { get {
@ -2094,7 +2094,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Instructions for helping the project!. /// Looks up a localized string similar to Instructions for helping the project financially..
/// </summary> /// </summary>
public static string donate_desc { public static string donate_desc {
get { get {
@ -2103,7 +2103,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to `-donate` or `~donate`. /// Looks up a localized string similar to `-donate`.
/// </summary> /// </summary>
public static string donate_usage { public static string donate_usage {
get { get {
@ -2310,7 +2310,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Adds or removes (if it exists) a word from the list of filtered words. /// Looks up a localized string similar to Adds or removes (if it exists) a word from the list of filtered words..
/// </summary> /// </summary>
public static string filterword_desc { public static string filterword_desc {
get { get {
@ -2418,7 +2418,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Toggles currency generation on this channel. Every posted message will have 2% chance to spawn a NadekoFlower. Requires Manage Messages permission.. /// Looks up a localized string similar to Toggles currency generation on this channel. Every posted message will have chance to spawn a NadekoFlower. Chance is specified by the Bot Owner. (default is 2%).
/// </summary> /// </summary>
public static string gencurrency_desc { public static string gencurrency_desc {
get { get {
@ -2472,7 +2472,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Give someone a certain amount of NadekoFlowers. /// Looks up a localized string similar to Give someone a certain amount of currency..
/// </summary> /// </summary>
public static string give_desc { public static string give_desc {
get { get {
@ -2571,7 +2571,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to greetdel. /// Looks up a localized string similar to greetdel grdel.
/// </summary> /// </summary>
public static string greetdel_cmd { public static string greetdel_cmd {
get { get {
@ -2706,7 +2706,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to h help. /// Looks up a localized string similar to help h.
/// </summary> /// </summary>
public static string h_cmd { public static string h_cmd {
get { get {
@ -2715,7 +2715,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Either shows a help for a single command, or PMs you help link if no arguments are specified.. /// Looks up a localized string similar to Either shows a help for a single command, or DMs you help link if no arguments are specified..
/// </summary> /// </summary>
public static string h_desc { public static string h_desc {
get { get {
@ -2724,7 +2724,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to `-h !m q` or just `-h`. /// Looks up a localized string similar to `-h !!q` or `-h`.
/// </summary> /// </summary>
public static string h_usage { public static string h_usage {
get { get {
@ -2877,7 +2877,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Shows a random NSFW hentai image from gelbooru and danbooru with a given tag. Tag is optional but preffered. (multiple tags are appended with +). /// Looks up a localized string similar to Shows a 2 random images (from gelbooru and danbooru) with a given tag. Tag is optional but preferred. Only 1 tag allowed..
/// </summary> /// </summary>
public static string hentai_desc { public static string hentai_desc {
get { get {
@ -2886,7 +2886,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to `~hentai yuri+kissing`. /// Looks up a localized string similar to `~hentai yuri`.
/// </summary> /// </summary>
public static string hentai_usage { public static string hentai_usage {
get { get {
@ -3156,7 +3156,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to `.jcsc`. /// Looks up a localized string similar to `.jcsc TokenHere`.
/// </summary> /// </summary>
public static string jcsc_usage { public static string jcsc_usage {
get { get {
@ -3255,7 +3255,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Displays bot currency leaderboard. /// Looks up a localized string similar to Displays bot currency leaderboard..
/// </summary> /// </summary>
public static string leaderboard_desc { public static string leaderboard_desc {
get { get {
@ -3444,7 +3444,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Lists whole permission chain with their indexes. You can specify optional page number if there are a lot of permissions. /// Looks up a localized string similar to Lists whole permission chain with their indexes. You can specify an optional page number if there are a lot of permissions..
/// </summary> /// </summary>
public static string listperms_desc { public static string listperms_desc {
get { get {
@ -3849,7 +3849,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Shows a list of filtered words. /// Looks up a localized string similar to Shows a list of filtered words..
/// </summary> /// </summary>
public static string lstfilterwords_desc { public static string lstfilterwords_desc {
get { get {
@ -4065,7 +4065,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to List all bot modules.. /// Looks up a localized string similar to Lists all bot modules..
/// </summary> /// </summary>
public static string modules_desc { public static string modules_desc {
get { get {
@ -4074,7 +4074,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to `-modules` or `.modules`. /// Looks up a localized string similar to `-modules`.
/// </summary> /// </summary>
public static string modules_usage { public static string modules_usage {
get { get {
@ -5001,7 +5001,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to removeplaying rmlp repl. /// Looks up a localized string similar to removeplaying rmpl repl.
/// </summary> /// </summary>
public static string removeplaying_cmd { public static string removeplaying_cmd {
get { get {
@ -5091,7 +5091,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Renames a role. Roles you are renaming must be lower than bot&apos;s highest role. **Manage Roles Permissions.**. /// Looks up a localized string similar to Renames a role. Roles you are renaming must be lower than bot&apos;s highest role..
/// </summary> /// </summary>
public static string renamerole_desc { public static string renamerole_desc {
get { get {
@ -5324,33 +5324,6 @@ namespace NadekoBot.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to rmvfilterword rw.
/// </summary>
public static string rmvfilterword_cmd {
get {
return ResourceManager.GetString("rmvfilterword_cmd", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Removes the word from the list of filtered words.
/// </summary>
public static string rmvfilterword_desc {
get {
return ResourceManager.GetString("rmvfilterword_desc", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to `;rw poop`.
/// </summary>
public static string rmvfilterword_usage {
get {
return ResourceManager.GetString("rmvfilterword_usage", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to rolecmd rc. /// Looks up a localized string similar to rolecmd rc.
/// </summary> /// </summary>
@ -5793,7 +5766,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Send a message to someone on a different server through the bot. . /// Looks up a localized string similar to Sends a message to someone on a different server through the bot. Separate server and channel/user ids with | and prepend channel id with `c:` and user id with `u:`..
/// </summary> /// </summary>
public static string send_desc { public static string send_desc {
get { get {
@ -5802,7 +5775,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to `.send sid`. /// Looks up a localized string similar to `.send serverid|c:channelid` or `.send serverid|u:userid`.
/// </summary> /// </summary>
public static string send_usage { public static string send_usage {
get { get {
@ -6414,7 +6387,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Enables or disables automatic deleting of invites on the server.. /// Looks up a localized string similar to Toggles automatic deleting of invites posted in the server..
/// </summary> /// </summary>
public static string srvrfilterinv_desc { public static string srvrfilterinv_desc {
get { get {
@ -6423,7 +6396,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to `;sfi disable`. /// Looks up a localized string similar to `;sfi`.
/// </summary> /// </summary>
public static string srvrfilterinv_usage { public static string srvrfilterinv_usage {
get { get {
@ -6441,7 +6414,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Enables or disables automatic deleting of messages containing forbidden words on the server.. /// Looks up a localized string similar to Toggles automatic deleting of messages containing forbidden words on the server..
/// </summary> /// </summary>
public static string srvrfilterwords_desc { public static string srvrfilterwords_desc {
get { get {
@ -6450,7 +6423,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to `;sfw disable`. /// Looks up a localized string similar to `;sfw`.
/// </summary> /// </summary>
public static string srvrfilterwords_usage { public static string srvrfilterwords_usage {
get { get {
@ -6630,7 +6603,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to toggle whether the self-assigned roles should be exclusive. /// Looks up a localized string similar to Toggles whether the self-assigned roles are exclusive. (So that any person can have only one of the self assignable roles).
/// </summary> /// </summary>
public static string tesar_desc { public static string tesar_desc {
get { get {
@ -6711,7 +6684,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to List the valid languages for translation.. /// Looks up a localized string similar to Lists the valid languages for translation..
/// </summary> /// </summary>
public static string translangs_desc { public static string translangs_desc {
get { get {
@ -6738,7 +6711,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Translates from&gt;to text. From the given language to the destiation language.. /// Looks up a localized string similar to Translates from&gt;to text. From the given language to the destination language..
/// </summary> /// </summary>
public static string translate_desc { public static string translate_desc {
get { get {
@ -7395,7 +7368,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to `.voicerpresence`. /// Looks up a localized string similar to `.voicepresence`.
/// </summary> /// </summary>
public static string voicepresence_usage { public static string voicepresence_usage {
get { get {
@ -7458,7 +7431,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to whosplaying. /// Looks up a localized string similar to whosplaying whpl.
/// </summary> /// </summary>
public static string whosplaying_cmd { public static string whosplaying_cmd {
get { get {
@ -7476,7 +7449,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to `.whoplays Overwatch`. /// Looks up a localized string similar to `.whpl Overwatch`.
/// </summary> /// </summary>
public static string whosplaying_usage { public static string whosplaying_usage {
get { get {

View File

@ -118,13 +118,13 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="h_cmd" xml:space="preserve"> <data name="h_cmd" xml:space="preserve">
<value>h help</value> <value>help h</value>
</data> </data>
<data name="h_desc" xml:space="preserve"> <data name="h_desc" xml:space="preserve">
<value>Either shows a help for a single command, or PMs you help link if no arguments are specified.</value> <value>Either shows a help for a single command, or DMs you help link if no arguments are specified.</value>
</data> </data>
<data name="h_usage" xml:space="preserve"> <data name="h_usage" xml:space="preserve">
<value>`-h !m q` or just `-h`</value> <value>`-h !!q` or `-h`</value>
</data> </data>
<data name="hgit_cmd" xml:space="preserve"> <data name="hgit_cmd" xml:space="preserve">
<value>hgit</value> <value>hgit</value>
@ -139,31 +139,31 @@
<value>donate</value> <value>donate</value>
</data> </data>
<data name="donate_desc" xml:space="preserve"> <data name="donate_desc" xml:space="preserve">
<value>Instructions for helping the project!</value> <value>Instructions for helping the project financially.</value>
</data> </data>
<data name="donate_usage" xml:space="preserve"> <data name="donate_usage" xml:space="preserve">
<value>`-donate` or `~donate`</value> <value>`-donate`</value>
</data> </data>
<data name="modules_cmd" xml:space="preserve"> <data name="modules_cmd" xml:space="preserve">
<value>modules mdls</value> <value>modules mdls</value>
</data> </data>
<data name="modules_desc" xml:space="preserve"> <data name="modules_desc" xml:space="preserve">
<value>List all bot modules.</value> <value>Lists all bot modules.</value>
</data> </data>
<data name="modules_usage" xml:space="preserve"> <data name="modules_usage" xml:space="preserve">
<value>`-modules` or `.modules`</value> <value>`-modules`</value>
</data> </data>
<data name="commands_cmd" xml:space="preserve"> <data name="commands_cmd" xml:space="preserve">
<value>commands cmds</value> <value>commands cmds</value>
</data> </data>
<data name="commands_desc" xml:space="preserve"> <data name="commands_desc" xml:space="preserve">
<value>List all of the bot's commands from a certain module.</value> <value>List all of the bot's commands from a certain module. You can either specify full, or only first few letters of the module name.</value>
</data> </data>
<data name="commands_usage" xml:space="preserve"> <data name="commands_usage" xml:space="preserve">
<value>`-commands` or `.commands`</value> <value>`-commands Administration` or `-cmds Admin`</value>
</data> </data>
<data name="greetdel_cmd" xml:space="preserve"> <data name="greetdel_cmd" xml:space="preserve">
<value>greetdel</value> <value>greetdel grdel</value>
</data> </data>
<data name="greetdel_desc" xml:space="preserve"> <data name="greetdel_desc" xml:space="preserve">
<value>Toggles automatic deletion of greet messages. </value> <value>Toggles automatic deletion of greet messages. </value>
@ -268,7 +268,7 @@
<value>Toggles logging to this channel whenever someone joins or leaves a voice channel you are in right now. </value> <value>Toggles logging to this channel whenever someone joins or leaves a voice channel you are in right now. </value>
</data> </data>
<data name="voicepresence_usage" xml:space="preserve"> <data name="voicepresence_usage" xml:space="preserve">
<value>`.voicerpresence`</value> <value>`.voicepresence`</value>
</data> </data>
<data name="repeatinvoke_cmd" xml:space="preserve"> <data name="repeatinvoke_cmd" xml:space="preserve">
<value>repeatinvoke repinv</value> <value>repeatinvoke repinv</value>
@ -316,7 +316,7 @@
<value>`.lipl`</value> <value>`.lipl`</value>
</data> </data>
<data name="removeplaying_cmd" xml:space="preserve"> <data name="removeplaying_cmd" xml:space="preserve">
<value>removeplaying rmlp repl</value> <value>removeplaying rmpl repl</value>
</data> </data>
<data name="removeplaying_desc" xml:space="preserve"> <data name="removeplaying_desc" xml:space="preserve">
<value>Removes a playing string on a given number. </value> <value>Removes a playing string on a given number. </value>
@ -367,7 +367,7 @@
<value>Joins current channel to an instance of cross server channel using the token. </value> <value>Joins current channel to an instance of cross server channel using the token. </value>
</data> </data>
<data name="jcsc_usage" xml:space="preserve"> <data name="jcsc_usage" xml:space="preserve">
<value>`.jcsc`</value> <value>`.jcsc TokenHere`</value>
</data> </data>
<data name="lcsc_cmd" xml:space="preserve"> <data name="lcsc_cmd" xml:space="preserve">
<value>lcsc</value> <value>lcsc</value>
@ -409,7 +409,7 @@
<value>togglexclsar tesar</value> <value>togglexclsar tesar</value>
</data> </data>
<data name="tesar_desc" xml:space="preserve"> <data name="tesar_desc" xml:space="preserve">
<value>toggle whether the self-assigned roles should be exclusive</value> <value>Toggles whether the self-assigned roles are exclusive. (So that any person can have only one of the self assignable roles)</value>
</data> </data>
<data name="tesar_usage" xml:space="preserve"> <data name="tesar_usage" xml:space="preserve">
<value>`.tesar`</value> <value>`.tesar`</value>
@ -436,7 +436,7 @@
<value>addcustreact acr</value> <value>addcustreact acr</value>
</data> </data>
<data name="addcustreact_desc" xml:space="preserve"> <data name="addcustreact_desc" xml:space="preserve">
<value>Add a custom reaction with a trigger and a response. Running this command in server requires Administration permission. Running this command in DM is Bot Owner only and adds a new global custom reaction. Guide here: &lt;https://github.com/Kwoth/NadekoBot/wiki/Custom-Reactions&gt;</value> <value>Add a custom reaction with a trigger and a response. Running this command in server requires Administration permission. Running this command in DM is Bot Owner only and adds a new global custom reaction. Guide here: &lt;http://nadekobot.readthedocs.io/en/1.0/Custom%20Reactions/&gt;</value>
</data> </data>
<data name="addcustreact_usage" xml:space="preserve"> <data name="addcustreact_usage" xml:space="preserve">
<value>`.acr "hello" Hi there %user%`</value> <value>`.acr "hello" Hi there %user%`</value>
@ -553,7 +553,7 @@
<value>renamerole renr</value> <value>renamerole renr</value>
</data> </data>
<data name="renamerole_desc" xml:space="preserve"> <data name="renamerole_desc" xml:space="preserve">
<value>Renames a role. Roles you are renaming must be lower than bot's highest role. **Manage Roles Permissions.**</value> <value>Renames a role. Roles you are renaming must be lower than bot's highest role.</value>
</data> </data>
<data name="renamerole_usage" xml:space="preserve"> <data name="renamerole_usage" xml:space="preserve">
<value>`.renr "First role" SecondRole`</value> <value>`.renr "First role" SecondRole`</value>
@ -760,10 +760,10 @@
<value>send</value> <value>send</value>
</data> </data>
<data name="send_desc" xml:space="preserve"> <data name="send_desc" xml:space="preserve">
<value>Send a message to someone on a different server through the bot. </value> <value>Sends a message to someone on a different server through the bot. Separate server and channel/user ids with | and prepend channel id with `c:` and user id with `u:`.</value>
</data> </data>
<data name="send_usage" xml:space="preserve"> <data name="send_usage" xml:space="preserve">
<value>`.send sid`</value> <value>`.send serverid|c:channelid` or `.send serverid|u:userid`</value>
</data> </data>
<data name="mentionrole_cmd" xml:space="preserve"> <data name="mentionrole_cmd" xml:space="preserve">
<value>mentionrole menro</value> <value>mentionrole menro</value>
@ -865,13 +865,13 @@
<value>`.uinfo @SomeUser`</value> <value>`.uinfo @SomeUser`</value>
</data> </data>
<data name="whosplaying_cmd" xml:space="preserve"> <data name="whosplaying_cmd" xml:space="preserve">
<value>whosplaying</value> <value>whosplaying whpl</value>
</data> </data>
<data name="whosplaying_desc" xml:space="preserve"> <data name="whosplaying_desc" xml:space="preserve">
<value>Shows a list of users who are playing the specified game.</value> <value>Shows a list of users who are playing the specified game.</value>
</data> </data>
<data name="whosplaying_usage" xml:space="preserve"> <data name="whosplaying_usage" xml:space="preserve">
<value>`.whoplays Overwatch`</value> <value>`.whpl Overwatch`</value>
</data> </data>
<data name="inrole_cmd" xml:space="preserve"> <data name="inrole_cmd" xml:space="preserve">
<value>inrole</value> <value>inrole</value>
@ -958,52 +958,43 @@
<value>chnlfilterinv cfi</value> <value>chnlfilterinv cfi</value>
</data> </data>
<data name="chnlfilterinv_desc" xml:space="preserve"> <data name="chnlfilterinv_desc" xml:space="preserve">
<value>Enables or disables automatic deleting of invites on the channel.If no channel supplied, it will default to current one. Use ALL to apply to all existing channels at once.</value> <value>Toggles automatic deleting of invites posted in the channel. Does not negate the .srvrfilterinv enabled setting.</value>
</data> </data>
<data name="chnlfilterinv_usage" xml:space="preserve"> <data name="chnlfilterinv_usage" xml:space="preserve">
<value>`;cfi enable #general-chat`</value> <value>`;cfi`</value>
</data> </data>
<data name="srvrfilterinv_cmd" xml:space="preserve"> <data name="srvrfilterinv_cmd" xml:space="preserve">
<value>srvrfilterinv sfi</value> <value>srvrfilterinv sfi</value>
</data> </data>
<data name="srvrfilterinv_desc" xml:space="preserve"> <data name="srvrfilterinv_desc" xml:space="preserve">
<value>Enables or disables automatic deleting of invites on the server.</value> <value>Toggles automatic deleting of invites posted in the server.</value>
</data> </data>
<data name="srvrfilterinv_usage" xml:space="preserve"> <data name="srvrfilterinv_usage" xml:space="preserve">
<value>`;sfi disable`</value> <value>`;sfi`</value>
</data> </data>
<data name="chnlfilterwords_cmd" xml:space="preserve"> <data name="chnlfilterwords_cmd" xml:space="preserve">
<value>chnlfilterwords cfw</value> <value>chnlfilterwords cfw</value>
</data> </data>
<data name="chnlfilterwords_desc" xml:space="preserve"> <data name="chnlfilterwords_desc" xml:space="preserve">
<value>Enables or disables automatic deleting of messages containing banned words on the channel.If no channel supplied, it will default to current one. Use ALL to apply to all existing channels at once.</value> <value>Toggles automatic deleting of messages containing banned words on the channel. Does not negate the .srvrfilterwords enabled setting.</value>
</data> </data>
<data name="chnlfilterwords_usage" xml:space="preserve"> <data name="chnlfilterwords_usage" xml:space="preserve">
<value>`;cfw enable #general-chat`</value> <value>`;cfw`</value>
</data> </data>
<data name="filterword_cmd" xml:space="preserve"> <data name="filterword_cmd" xml:space="preserve">
<value>fw</value> <value>fw</value>
</data> </data>
<data name="filterword_desc" xml:space="preserve"> <data name="filterword_desc" xml:space="preserve">
<value>Adds or removes (if it exists) a word from the list of filtered words</value> <value>Adds or removes (if it exists) a word from the list of filtered words.</value>
</data> </data>
<data name="filterword_usage" xml:space="preserve"> <data name="filterword_usage" xml:space="preserve">
<value>`;fw poop`</value> <value>`;fw poop`</value>
</data> </data>
<data name="rmvfilterword_cmd" xml:space="preserve">
<value>rmvfilterword rw</value>
</data>
<data name="rmvfilterword_desc" xml:space="preserve">
<value>Removes the word from the list of filtered words</value>
</data>
<data name="rmvfilterword_usage" xml:space="preserve">
<value>`;rw poop`</value>
</data>
<data name="lstfilterwords_cmd" xml:space="preserve"> <data name="lstfilterwords_cmd" xml:space="preserve">
<value>lstfilterwords lfw</value> <value>lstfilterwords lfw</value>
</data> </data>
<data name="lstfilterwords_desc" xml:space="preserve"> <data name="lstfilterwords_desc" xml:space="preserve">
<value>Shows a list of filtered words</value> <value>Shows a list of filtered words.</value>
</data> </data>
<data name="lstfilterwords_usage" xml:space="preserve"> <data name="lstfilterwords_usage" xml:space="preserve">
<value>`;lfw`</value> <value>`;lfw`</value>
@ -1012,10 +1003,10 @@
<value>srvrfilterwords sfw</value> <value>srvrfilterwords sfw</value>
</data> </data>
<data name="srvrfilterwords_desc" xml:space="preserve"> <data name="srvrfilterwords_desc" xml:space="preserve">
<value>Enables or disables automatic deleting of messages containing forbidden words on the server.</value> <value>Toggles automatic deleting of messages containing forbidden words on the server.</value>
</data> </data>
<data name="srvrfilterwords_usage" xml:space="preserve"> <data name="srvrfilterwords_usage" xml:space="preserve">
<value>`;sfw disable`</value> <value>`;sfw`</value>
</data> </data>
<data name="permrole_cmd" xml:space="preserve"> <data name="permrole_cmd" xml:space="preserve">
<value>permrole pr</value> <value>permrole pr</value>
@ -1228,7 +1219,7 @@
<value>cmdcooldown cmdcd</value> <value>cmdcooldown cmdcd</value>
</data> </data>
<data name="cmdcooldown_desc" xml:space="preserve"> <data name="cmdcooldown_desc" xml:space="preserve">
<value>Sets a cooldown per user for a command. Set 0 to clear.</value> <value>Sets a cooldown per user for a command. Set to 0 to remove the cooldown.</value>
</data> </data>
<data name="cmdcooldown_usage" xml:space="preserve"> <data name="cmdcooldown_usage" xml:space="preserve">
<value>`;cmdcd "some cmd" 5`</value> <value>`;cmdcd "some cmd" 5`</value>
@ -1264,7 +1255,7 @@
<value>deletequote delq</value> <value>deletequote delq</value>
</data> </data>
<data name="deletequote_desc" xml:space="preserve"> <data name="deletequote_desc" xml:space="preserve">
<value>Deletes all quotes with the specified keyword. You have to either be bot owner or the creator of the quote to delete it.</value> <value>Deletes a random quote with the specified keyword. You have to either be server Administrator or the creator of the quote to delete it.</value>
</data> </data>
<data name="deletequote_usage" xml:space="preserve"> <data name="deletequote_usage" xml:space="preserve">
<value>`.delq abc`</value> <value>`.delq abc`</value>
@ -1336,7 +1327,7 @@
<value>betflip bf</value> <value>betflip bf</value>
</data> </data>
<data name="betflip_desc" xml:space="preserve"> <data name="betflip_desc" xml:space="preserve">
<value>Bet to guess will the result be heads or tails. Guessing award you double flowers you've bet.</value> <value>Bet to guess will the result be heads or tails. Guessing awards you double flowers you've bet.</value>
</data> </data>
<data name="betflip_usage" xml:space="preserve"> <data name="betflip_usage" xml:space="preserve">
<value>`$bf 5 heads` or `$bf 3 t`</value> <value>`$bf 5 heads` or `$bf 3 t`</value>
@ -1399,7 +1390,7 @@
<value>give</value> <value>give</value>
</data> </data>
<data name="give_desc" xml:space="preserve"> <data name="give_desc" xml:space="preserve">
<value>Give someone a certain amount of NadekoFlowers</value> <value>Give someone a certain amount of currency.</value>
</data> </data>
<data name="give_usage" xml:space="preserve"> <data name="give_usage" xml:space="preserve">
<value>`$give 1 "@SomeGuy"`</value> <value>`$give 1 "@SomeGuy"`</value>
@ -1408,7 +1399,7 @@
<value>award</value> <value>award</value>
</data> </data>
<data name="award_desc" xml:space="preserve"> <data name="award_desc" xml:space="preserve">
<value>Gives someone a certain amount of flowers. </value> <value>Awards someone a certain amount of currency. </value>
</data> </data>
<data name="award_usage" xml:space="preserve"> <data name="award_usage" xml:space="preserve">
<value>`$award 100 @person`</value> <value>`$award 100 @person`</value>
@ -1435,7 +1426,7 @@
<value>leaderboard lb</value> <value>leaderboard lb</value>
</data> </data>
<data name="leaderboard_desc" xml:space="preserve"> <data name="leaderboard_desc" xml:space="preserve">
<value>Displays bot currency leaderboard</value> <value>Displays bot currency leaderboard.</value>
</data> </data>
<data name="leaderboard_usage" xml:space="preserve"> <data name="leaderboard_usage" xml:space="preserve">
<value>`$lb`</value> <value>`$lb`</value>
@ -1534,7 +1525,7 @@
<value>gencurrency gc</value> <value>gencurrency gc</value>
</data> </data>
<data name="gencurrency_desc" xml:space="preserve"> <data name="gencurrency_desc" xml:space="preserve">
<value>Toggles currency generation on this channel. Every posted message will have 2% chance to spawn a NadekoFlower. Requires Manage Messages permission.</value> <value>Toggles currency generation on this channel. Every posted message will have chance to spawn a NadekoFlower. Chance is specified by the Bot Owner. (default is 2%)</value>
</data> </data>
<data name="gencurrency_usage" xml:space="preserve"> <data name="gencurrency_usage" xml:space="preserve">
<value>`&gt;gc`</value> <value>`&gt;gc`</value>
@ -1564,7 +1555,7 @@
<value>Ask the 8ball a yes/no question.</value> <value>Ask the 8ball a yes/no question.</value>
</data> </data>
<data name="_8ball_usage" xml:space="preserve"> <data name="_8ball_usage" xml:space="preserve">
<value>`&gt;8ball should i do something`</value> <value>`&gt;8ball should I do something`</value>
</data> </data>
<data name="rps_cmd" xml:space="preserve"> <data name="rps_cmd" xml:space="preserve">
<value>rps</value> <value>rps</value>
@ -1930,16 +1921,16 @@
<value>convert</value> <value>convert</value>
</data> </data>
<data name="convert_desc" xml:space="preserve"> <data name="convert_desc" xml:space="preserve">
<value>Convert quantities from&gt;to.</value> <value>Convert quantities. Use `~convertlist` to see supported dimensions and currencies.</value>
</data> </data>
<data name="convert_usage" xml:space="preserve"> <data name="convert_usage" xml:space="preserve">
<value>`~convert m&gt;km 1000`</value> <value>`~convert m km 1000`</value>
</data> </data>
<data name="convertlist_cmd" xml:space="preserve"> <data name="convertlist_cmd" xml:space="preserve">
<value>convertlist</value> <value>convertlist</value>
</data> </data>
<data name="convertlist_desc" xml:space="preserve"> <data name="convertlist_desc" xml:space="preserve">
<value>List of the convertable dimensions and currencies.</value> <value>List of the convertible dimensions and currencies.</value>
</data> </data>
<data name="convertlist_usage" xml:space="preserve"> <data name="convertlist_usage" xml:space="preserve">
<value>`~convertlist`</value> <value>`~convertlist`</value>
@ -2263,10 +2254,10 @@
<value>hentai</value> <value>hentai</value>
</data> </data>
<data name="hentai_desc" xml:space="preserve"> <data name="hentai_desc" xml:space="preserve">
<value>Shows a random NSFW hentai image from gelbooru and danbooru with a given tag. Tag is optional but preffered. (multiple tags are appended with +)</value> <value>Shows a 2 random images (from gelbooru and danbooru) with a given tag. Tag is optional but preferred. Only 1 tag allowed.</value>
</data> </data>
<data name="hentai_usage" xml:space="preserve"> <data name="hentai_usage" xml:space="preserve">
<value>`~hentai yuri+kissing`</value> <value>`~hentai yuri`</value>
</data> </data>
<data name="danbooru_cmd" xml:space="preserve"> <data name="danbooru_cmd" xml:space="preserve">
<value>danbooru</value> <value>danbooru</value>
@ -2368,31 +2359,31 @@
<value>`,call [war_number] [base_number] [optional_other_name]`</value> <value>`,call [war_number] [base_number] [optional_other_name]`</value>
</data> </data>
<data name="claimfinish_cmd" xml:space="preserve"> <data name="claimfinish_cmd" xml:space="preserve">
<value>claimfinish cf cf3 claimfinish3</value> <value>claimfinish cf</value>
</data> </data>
<data name="claimfinish_desc" xml:space="preserve"> <data name="claimfinish_desc" xml:space="preserve">
<value>Finish your claim with 3 stars if you destroyed a base. Optional second argument finishes for someone else.</value> <value>Finish your claim with 3 stars if you destroyed a base. First argument is the war number, optional second argument finishes for someone else.</value>
</data> </data>
<data name="claimfinish_usage" xml:space="preserve"> <data name="claimfinish_usage" xml:space="preserve">
<value>`,cf [war_number] [optional_other_name]`</value> <value>`,cf 1 Someone`</value>
</data> </data>
<data name="claimfinish2_cmd" xml:space="preserve"> <data name="claimfinish2_cmd" xml:space="preserve">
<value>claimfinish2 cf2</value> <value>claimfinish2 cf2</value>
</data> </data>
<data name="claimfinish2_desc" xml:space="preserve"> <data name="claimfinish2_desc" xml:space="preserve">
<value>Finish your claim with 2 stars if you destroyed a base. Optional second argument finishes for someone else.</value> <value>Finish your claim with 2 stars if you destroyed a base. First argument is the war number, optional second argument finishes for someone else.</value>
</data> </data>
<data name="claimfinish2_usage" xml:space="preserve"> <data name="claimfinish2_usage" xml:space="preserve">
<value>`,cf [war_number] [optional_other_name]`</value> <value>`,cf2 1 SomeGuy`</value>
</data> </data>
<data name="claimfinish1_cmd" xml:space="preserve"> <data name="claimfinish1_cmd" xml:space="preserve">
<value>claimfinish1 cf1</value> <value>claimfinish1 cf1</value>
</data> </data>
<data name="claimfinish1_desc" xml:space="preserve"> <data name="claimfinish1_desc" xml:space="preserve">
<value>Finish your claim with 1 stars if you destroyed a base. Optional second argument finishes for someone else.</value> <value>Finish your claim with 1 star if you destroyed a base. First argument is the war number, optional second argument finishes for someone else.</value>
</data> </data>
<data name="claimfinish1_usage" xml:space="preserve"> <data name="claimfinish1_usage" xml:space="preserve">
<value>`,cf [war_number] [optional_other_name]`</value> <value>`,cf1 2 SomeGirl`</value>
</data> </data>
<data name="unclaim_cmd" xml:space="preserve"> <data name="unclaim_cmd" xml:space="preserve">
<value>unclaim ucall uc</value> <value>unclaim ucall uc</value>
@ -2461,7 +2452,7 @@
<value>translate trans</value> <value>translate trans</value>
</data> </data>
<data name="translate_desc" xml:space="preserve"> <data name="translate_desc" xml:space="preserve">
<value>Translates from&gt;to text. From the given language to the destiation language.</value> <value>Translates from&gt;to text. From the given language to the destination language.</value>
</data> </data>
<data name="translate_usage" xml:space="preserve"> <data name="translate_usage" xml:space="preserve">
<value>`~trans en&gt;fr Hello`</value> <value>`~trans en&gt;fr Hello`</value>
@ -2470,7 +2461,7 @@
<value>translangs</value> <value>translangs</value>
</data> </data>
<data name="translangs_desc" xml:space="preserve"> <data name="translangs_desc" xml:space="preserve">
<value>List the valid languages for translation.</value> <value>Lists the valid languages for translation.</value>
</data> </data>
<data name="translangs_usage" xml:space="preserve"> <data name="translangs_usage" xml:space="preserve">
<value>`~translangs`</value> <value>`~translangs`</value>
@ -2557,7 +2548,7 @@
<value>cash $$</value> <value>cash $$</value>
</data> </data>
<data name="listperms_desc" xml:space="preserve"> <data name="listperms_desc" xml:space="preserve">
<value>Lists whole permission chain with their indexes. You can specify optional page number if there are a lot of permissions</value> <value>Lists whole permission chain with their indexes. You can specify an optional page number if there are a lot of permissions.</value>
</data> </data>
<data name="listperms_usage" xml:space="preserve"> <data name="listperms_usage" xml:space="preserve">
<value>`;lp` or `;lp 3`</value> <value>`;lp` or `;lp 3`</value>

View File

@ -9,7 +9,7 @@ namespace NadekoBot.Services.Database.Repositories
{ {
public interface IQuoteRepository : IRepository<Quote> public interface IQuoteRepository : IRepository<Quote>
{ {
IEnumerable<Quote> GetAllQuotesByKeyword(string keyword); IEnumerable<Quote> GetAllQuotesByKeyword(ulong guildId, string keyword);
Task<Quote> GetRandomQuoteByKeywordAsync(ulong guildId, string keyword); Task<Quote> GetRandomQuoteByKeywordAsync(ulong guildId, string keyword);
} }
} }

View File

@ -15,13 +15,13 @@ namespace NadekoBot.Services.Database.Repositories.Impl
{ {
} }
public IEnumerable<Quote> GetAllQuotesByKeyword(string keyword) => public IEnumerable<Quote> GetAllQuotesByKeyword(ulong guildId, string keyword) =>
_set.Where(q => q.Keyword == keyword); _set.Where(q => q.GuildId == guildId && q.Keyword == keyword);
public Task<Quote> GetRandomQuoteByKeywordAsync(ulong guildId, string keyword) public Task<Quote> GetRandomQuoteByKeywordAsync(ulong guildId, string keyword)
{ {
var rng = new NadekoRandom(); var rng = new NadekoRandom();
return _set.Where(q => q.Keyword == keyword).OrderBy(q => rng.Next()).FirstOrDefaultAsync(); return _set.Where(q => q.GuildId == guildId && q.Keyword == keyword).OrderBy(q => rng.Next()).FirstOrDefaultAsync();
} }
} }
} }

View File

@ -23,6 +23,8 @@ namespace NadekoBot.Extensions
http.DefaultRequestHeaders.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); http.DefaultRequestHeaders.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
} }
public static bool IsInteger(this double number) => number == Math.Truncate(number);
public static string SanitizeMentions(this string str) => public static string SanitizeMentions(this string str) =>
str.Replace("@everyone", "@everyοne").Replace("@here", "@һere"); str.Replace("@everyone", "@everyοne").Replace("@here", "@һere");