Up to 5 repeaters.

This commit is contained in:
Kwoth 2017-01-10 23:12:52 +01:00
parent ef688d096b
commit d7dc7bf3fb
3 changed files with 4 additions and 2 deletions

View File

@ -188,6 +188,8 @@ namespace NadekoBot.Modules.Administration
{ {
var gc = uow.GuildConfigs.For(Context.Guild.Id, set => set.Include(x => x.GuildRepeaters)); var gc = uow.GuildConfigs.For(Context.Guild.Id, set => set.Include(x => x.GuildRepeaters));
if (gc.GuildRepeaters.Count >= 5)
return;
gc.GuildRepeaters.Add(toAdd); gc.GuildRepeaters.Add(toAdd);
await uow.CompleteAsync().ConfigureAwait(false); await uow.CompleteAsync().ConfigureAwait(false);

View File

@ -5766,7 +5766,7 @@ namespace NadekoBot.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Repeat a message every X minutes in the current channel.. /// Looks up a localized string similar to Repeat a message every X minutes in the current channel. You can have up to 5 repeating messages on the server in total..
/// </summary> /// </summary>
public static string repeat_desc { public static string repeat_desc {
get { get {

View File

@ -274,7 +274,7 @@
<value>repeat</value> <value>repeat</value>
</data> </data>
<data name="repeat_desc" xml:space="preserve"> <data name="repeat_desc" xml:space="preserve">
<value>Repeat a message every X minutes in the current channel.</value> <value>Repeat a message every X minutes in the current channel. You can have up to 5 repeating messages on the server in total.</value>
</data> </data>
<data name="repeat_usage" xml:space="preserve"> <data name="repeat_usage" xml:space="preserve">
<value>`{0}repeat 5 Hello there`</value> <value>`{0}repeat 5 Hello there`</value>