Removed module projects because it can't work like that atm. Commented out package commands.
This commit is contained in:
NadekoBot.Core
Migrations
20171013055008_clear-and-loadedpackage.Designer.cs20171013055008_clear-and-loadedpackage.csNadekoSqliteContextModelSnapshot.cs
Modules
Administration
Gambling
AnimalRacingCommands.cs
Common
CurrencyEventsCommands.csDiceRollCommands.csDrawCommands.csFlipCoinCommands.csFlowerShopCommands.csGambling.csServices
SlotCommands.csWaifuClaimCommands.csWheelOfFortuneCommands.csGames
AcropobiaCommands.csCleverBotCommands.csConnect4Commands.csGames.csHangmanCommands.csLeetCommands.csNunchiCommands.csPlantAndPickCommands.csPollCommands.cs
Common
Acrophobia
ChatterBot
ChatterBotResponse.csChatterBotSession.csCleverbotResponse.csIChatterBotSession.csOfficialCleverbotSession.cs
Connect4
GirlRating.csHangman
Nunchi
Poll.csTicTacToe.csTrivia
TypingArticle.csTypingGame.csServices
SpeedTypingCommands.csTicTacToeCommands.csTriviaCommands.csMusic
Common
Extensions
Music.csServices
Nsfw
Pokemon
Searches
AnimeSearchCommands.cs
Common
AnimeResult.csDefineModel.cs
Exceptions
GoogleSearchResult.csMagicItem.csMangaResult.csOmdbProvider.csOverwatchApiModel.csSearchImageCacher.csSearchPokemon.csStreamResponses.csTimeModels.csWeatherModels.csWikipediaApiModel.csWoWJoke.csExceptions
FeedCommands.csJokeCommands.csLoLCommands.csMemegenCommands.csOsuCommands.csOverwatchCommands.csPlaceCommands.csPokemonSearchCommands.csSearches.csServices
StreamNotificationCommands.csTranslatorCommands.csXkcdCommands.csUtility
BotConfigCommands.csCalcCommands.csCommandMapCommands.cs
Common
Extensions
InfoCommands.csNadekoBot.Modules.Searches.csprojPatreonCommands.csQuoteCommands.csRemindCommands.csRepeatCommands.csServices
CommandMapService.csConverterService.csMessageRepeaterService.csPatreonRewardsService.csRemindService.csStreamRoleService.csVerboseErrorsService.cs
StreamRoleCommands.csUnitConversionCommands.csUtility.csVerboseErrorCommands.csXp
Services
NadekoBot.Modules.Games
NadekoBot.slndocs
mkdocs.ymlsrc/NadekoBot
@ -11,7 +11,6 @@ namespace NadekoBot.Core.Services.Database
|
||||
IQuoteRepository Quotes { get; }
|
||||
IGuildConfigRepository GuildConfigs { get; }
|
||||
IDonatorsRepository Donators { get; }
|
||||
IClashOfClansRepository ClashOfClans { get; }
|
||||
IReminderRepository Reminders { get; }
|
||||
ISelfAssignedRolesRepository SelfAssignedRoles { get; }
|
||||
IBotConfigRepository BotConfig { get; }
|
||||
|
@ -12,8 +12,6 @@ namespace NadekoBot.Core.Services.Database.Models
|
||||
public float CurrencyGenerationChance { get; set; } = 0.02f;
|
||||
public int CurrencyGenerationCooldown { get; set; } = 10;
|
||||
|
||||
public HashSet<ModulePrefix> ModulePrefixes { get; set; } = new HashSet<ModulePrefix>();
|
||||
|
||||
public List<PlayingStatus> RotatingStatusMessages { get; set; } = new List<PlayingStatus>();
|
||||
|
||||
public bool RotatingStatuses { get; set; } = false;
|
||||
@ -70,6 +68,7 @@ Nadeko Support Server: https://discord.gg/nadekobot";
|
||||
public bool CustomReactionsStartWith { get; set; } = false;
|
||||
public int XpPerMessage { get; set; } = 3;
|
||||
public int XpMinutesTimeout { get; set; } = 5;
|
||||
public HashSet<LoadedPackage> LoadedPackages { get; set; } = new HashSet<LoadedPackage>();
|
||||
}
|
||||
|
||||
public class BlockedCmdOrMdl : DbEntity
|
||||
@ -155,23 +154,4 @@ Nadeko Support Server: https://discord.gg/nadekobot";
|
||||
return ((RaceAnimal)obj).Icon == Icon;
|
||||
}
|
||||
}
|
||||
|
||||
public class ModulePrefix : DbEntity
|
||||
{
|
||||
public string ModuleName { get; set; }
|
||||
public string Prefix { get; set; }
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return ModuleName.GetHashCode();
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if(!(obj is ModulePrefix))
|
||||
return base.Equals(obj);
|
||||
|
||||
return ((ModulePrefix)obj).ModuleName == ModuleName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,22 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace NadekoBot.Core.Services.Database.Models
|
||||
{
|
||||
public class ClashCaller : DbEntity
|
||||
{
|
||||
public int? SequenceNumber { get; set; } = null;
|
||||
public string CallUser { get; set; }
|
||||
|
||||
public DateTime TimeAdded { get; set; }
|
||||
|
||||
public bool BaseDestroyed { get; set; }
|
||||
|
||||
public int Stars { get; set; } = 3;
|
||||
|
||||
public int ClashWarId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(ClashWarId))]
|
||||
public ClashWar ClashWar { get; set; }
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
using Discord;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace NadekoBot.Core.Services.Database.Models
|
||||
{
|
||||
public class ClashWar : DbEntity
|
||||
{
|
||||
public string EnemyClan { get; set; }
|
||||
public int Size { get; set; }
|
||||
public StateOfWar WarState { get; set; } = StateOfWar.Created;
|
||||
public DateTime StartedAt { get; set; }
|
||||
|
||||
public ulong GuildId { get; set; }
|
||||
public ulong ChannelId { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public ITextChannel Channel { get; set; }
|
||||
|
||||
public List<ClashCaller> Bases { get; set; } = new List<ClashCaller>();
|
||||
}
|
||||
|
||||
public enum DestroyStars
|
||||
{
|
||||
One, Two, Three
|
||||
}
|
||||
public enum StateOfWar
|
||||
{
|
||||
Started, Ended, Created
|
||||
}
|
||||
}
|
@ -7,7 +7,6 @@ using System;
|
||||
using Microsoft.EntityFrameworkCore.Design;
|
||||
using Microsoft.Data.Sqlite;
|
||||
using System.IO;
|
||||
using NadekoBot.Core.Services.Database.Models;
|
||||
|
||||
namespace NadekoBot.Core.Services.Database
|
||||
{
|
||||
@ -170,16 +169,7 @@ namespace NadekoBot.Core.Services.Database
|
||||
// .HasForeignKey(mp => mp.BotConfigId);
|
||||
|
||||
#endregion
|
||||
|
||||
#region ClashOfClans
|
||||
|
||||
var callersEntity = modelBuilder.Entity<ClashCaller>();
|
||||
callersEntity
|
||||
.HasOne(c => c.ClashWar)
|
||||
.WithMany(c => c.Bases);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Self Assignable Roles
|
||||
|
||||
var selfassignableRolesEntity = modelBuilder.Entity<SelfAssignedRole>();
|
||||
|
@ -1,10 +0,0 @@
|
||||
using NadekoBot.Core.Services.Database.Models;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NadekoBot.Core.Services.Database.Repositories
|
||||
{
|
||||
public interface IClashOfClansRepository : IRepository<ClashWar>
|
||||
{
|
||||
IEnumerable<ClashWar> GetAllWars(List<long> guilds);
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
using NadekoBot.Core.Services.Database.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace NadekoBot.Core.Services.Database.Repositories.Impl
|
||||
{
|
||||
public class ClashOfClansRepository : Repository<ClashWar>, IClashOfClansRepository
|
||||
{
|
||||
public ClashOfClansRepository(DbContext context) : base(context)
|
||||
{
|
||||
}
|
||||
|
||||
public IEnumerable<ClashWar> GetAllWars(List<long> guilds)
|
||||
{
|
||||
var toReturn = _set
|
||||
.Where(cw => guilds.Contains((long)cw.GuildId))
|
||||
.Include(cw => cw.Bases)
|
||||
.ToList();
|
||||
toReturn.ForEach(cw => cw.Bases = cw.Bases.Where(w => w.SequenceNumber != null).OrderBy(w => w.SequenceNumber).ToList());
|
||||
return toReturn;
|
||||
}
|
||||
}
|
||||
}
|
@ -18,9 +18,6 @@ namespace NadekoBot.Core.Services.Database
|
||||
private IDonatorsRepository _donators;
|
||||
public IDonatorsRepository Donators => _donators ?? (_donators = new DonatorsRepository(_context));
|
||||
|
||||
private IClashOfClansRepository _clashOfClans;
|
||||
public IClashOfClansRepository ClashOfClans => _clashOfClans ?? (_clashOfClans = new ClashOfClansRepository(_context));
|
||||
|
||||
private IReminderRepository _reminders;
|
||||
public IReminderRepository Reminders => _reminders ?? (_reminders = new ReminderRepository(_context));
|
||||
|
||||
|
Reference in New Issue
Block a user