Clash of clans should be discovered now
This commit is contained in:
parent
612eb22154
commit
ebac646d27
@ -14,7 +14,7 @@ using Discord.WebSocket;
|
|||||||
namespace NadekoBot.Modules.ClashOfClans
|
namespace NadekoBot.Modules.ClashOfClans
|
||||||
{
|
{
|
||||||
[Module(",",AppendSpace = false)]
|
[Module(",",AppendSpace = false)]
|
||||||
internal class ClashOfClans : DiscordModule
|
public class ClashOfClans : DiscordModule
|
||||||
{
|
{
|
||||||
public static ConcurrentDictionary<ulong, List<ClashWar>> ClashWars { get; set; } = new ConcurrentDictionary<ulong, List<ClashWar>>();
|
public static ConcurrentDictionary<ulong, List<ClashWar>> ClashWars { get; set; } = new ConcurrentDictionary<ulong, List<ClashWar>>();
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ using System.Text;
|
|||||||
|
|
||||||
namespace NadekoBot.Classes.ClashOfClans
|
namespace NadekoBot.Classes.ClashOfClans
|
||||||
{
|
{
|
||||||
internal class ClashWar
|
public class ClashWar
|
||||||
{
|
{
|
||||||
public enum DestroyStars
|
public enum DestroyStars
|
||||||
{
|
{
|
||||||
@ -17,7 +17,7 @@ namespace NadekoBot.Classes.ClashOfClans
|
|||||||
Started, Ended, Created
|
Started, Ended, Created
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class Caller
|
public class Caller
|
||||||
{
|
{
|
||||||
public string CallUser { get; set; }
|
public string CallUser { get; set; }
|
||||||
|
|
||||||
@ -86,13 +86,13 @@ namespace NadekoBot.Classes.ClashOfClans
|
|||||||
as ITextChannel; // oh and don't forget to cast it to this arbitrary bullshit
|
as ITextChannel; // oh and don't forget to cast it to this arbitrary bullshit
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void End()
|
public void End()
|
||||||
{
|
{
|
||||||
//Ended = true;
|
//Ended = true;
|
||||||
WarState = StateOfWar.Ended;
|
WarState = StateOfWar.Ended;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Call(string u, int baseNumber)
|
public void Call(string u, int baseNumber)
|
||||||
{
|
{
|
||||||
if (baseNumber < 0 || baseNumber >= Bases.Length)
|
if (baseNumber < 0 || baseNumber >= Bases.Length)
|
||||||
throw new ArgumentException("Invalid base number");
|
throw new ArgumentException("Invalid base number");
|
||||||
@ -107,7 +107,7 @@ namespace NadekoBot.Classes.ClashOfClans
|
|||||||
Bases[baseNumber] = new Caller(u.Trim(), DateTime.UtcNow, false);
|
Bases[baseNumber] = new Caller(u.Trim(), DateTime.UtcNow, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
if (WarState == StateOfWar.Started)
|
if (WarState == StateOfWar.Started)
|
||||||
throw new InvalidOperationException("War already started");
|
throw new InvalidOperationException("War already started");
|
||||||
@ -122,7 +122,7 @@ namespace NadekoBot.Classes.ClashOfClans
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal int Uncall(string user)
|
public int Uncall(string user)
|
||||||
{
|
{
|
||||||
user = user.Trim();
|
user = user.Trim();
|
||||||
for (var i = 0; i < Bases.Length; i++)
|
for (var i = 0; i < Bases.Length; i++)
|
||||||
@ -167,7 +167,7 @@ namespace NadekoBot.Classes.ClashOfClans
|
|||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal int FinishClaim(string user, int stars = 3)
|
public int FinishClaim(string user, int stars = 3)
|
||||||
{
|
{
|
||||||
user = user.Trim();
|
user = user.Trim();
|
||||||
for (var i = 0; i < Bases.Length; i++)
|
for (var i = 0; i < Bases.Length; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user