Skip to content

Commit

Permalink
Added color settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Bond-009 committed Mar 12, 2017
1 parent f521e00 commit d9dbaf4
Show file tree
Hide file tree
Showing 16 changed files with 186 additions and 53 deletions.
45 changes: 15 additions & 30 deletions iTool.DiscordBot.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B78E872D-D115-4B52-BC2B-746D5E38C40D}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{16EA270D-4D44-44C8-904C-86FF9069D24A}"
EndProject
Project("{13B669BE-BB05-4DDF-9536-439F39A36129}") = "iTool.DiscordBot", "src\iTool.DiscordBot\iTool.DiscordBot.csproj", "{366204C1-C307-4979-B0D7-7B143F2BACA6}"
EndProject
Project("{13B669BE-BB05-4DDF-9536-439F39A36129}") = "iTool.DiscordBot.API", "src\iTool.DiscordBot.API\iTool.DiscordBot.API.csproj", "{E047EC19-0E0F-43F6-90BC-61678E3CFF14}"
Project("{13B669BE-BB05-4DDF-9536-439F39A36129}") = "iTool.DiscordBot", "src\iTool.DiscordBot\iTool.DiscordBot.csproj", "{5B92E328-88E3-4012-AFB2-8FE54AD8F3E1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -22,33 +20,20 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{366204C1-C307-4979-B0D7-7B143F2BACA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{366204C1-C307-4979-B0D7-7B143F2BACA6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{366204C1-C307-4979-B0D7-7B143F2BACA6}.Debug|x64.ActiveCfg = Debug|x64
{366204C1-C307-4979-B0D7-7B143F2BACA6}.Debug|x64.Build.0 = Debug|x64
{366204C1-C307-4979-B0D7-7B143F2BACA6}.Debug|x86.ActiveCfg = Debug|x86
{366204C1-C307-4979-B0D7-7B143F2BACA6}.Debug|x86.Build.0 = Debug|x86
{366204C1-C307-4979-B0D7-7B143F2BACA6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{366204C1-C307-4979-B0D7-7B143F2BACA6}.Release|Any CPU.Build.0 = Release|Any CPU
{366204C1-C307-4979-B0D7-7B143F2BACA6}.Release|x64.ActiveCfg = Release|x64
{366204C1-C307-4979-B0D7-7B143F2BACA6}.Release|x64.Build.0 = Release|x64
{366204C1-C307-4979-B0D7-7B143F2BACA6}.Release|x86.ActiveCfg = Release|x86
{366204C1-C307-4979-B0D7-7B143F2BACA6}.Release|x86.Build.0 = Release|x86
{E047EC19-0E0F-43F6-90BC-61678E3CFF14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E047EC19-0E0F-43F6-90BC-61678E3CFF14}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E047EC19-0E0F-43F6-90BC-61678E3CFF14}.Debug|x64.ActiveCfg = Debug|x64
{E047EC19-0E0F-43F6-90BC-61678E3CFF14}.Debug|x64.Build.0 = Debug|x64
{E047EC19-0E0F-43F6-90BC-61678E3CFF14}.Debug|x86.ActiveCfg = Debug|x86
{E047EC19-0E0F-43F6-90BC-61678E3CFF14}.Debug|x86.Build.0 = Debug|x86
{E047EC19-0E0F-43F6-90BC-61678E3CFF14}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E047EC19-0E0F-43F6-90BC-61678E3CFF14}.Release|Any CPU.Build.0 = Release|Any CPU
{E047EC19-0E0F-43F6-90BC-61678E3CFF14}.Release|x64.ActiveCfg = Release|x64
{E047EC19-0E0F-43F6-90BC-61678E3CFF14}.Release|x64.Build.0 = Release|x64
{E047EC19-0E0F-43F6-90BC-61678E3CFF14}.Release|x86.ActiveCfg = Release|x86
{E047EC19-0E0F-43F6-90BC-61678E3CFF14}.Release|x86.Build.0 = Release|x86
{5B92E328-88E3-4012-AFB2-8FE54AD8F3E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5B92E328-88E3-4012-AFB2-8FE54AD8F3E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5B92E328-88E3-4012-AFB2-8FE54AD8F3E1}.Debug|x64.ActiveCfg = Debug|x64
{5B92E328-88E3-4012-AFB2-8FE54AD8F3E1}.Debug|x64.Build.0 = Debug|x64
{5B92E328-88E3-4012-AFB2-8FE54AD8F3E1}.Debug|x86.ActiveCfg = Debug|x86
{5B92E328-88E3-4012-AFB2-8FE54AD8F3E1}.Debug|x86.Build.0 = Debug|x86
{5B92E328-88E3-4012-AFB2-8FE54AD8F3E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5B92E328-88E3-4012-AFB2-8FE54AD8F3E1}.Release|Any CPU.Build.0 = Release|Any CPU
{5B92E328-88E3-4012-AFB2-8FE54AD8F3E1}.Release|x64.ActiveCfg = Release|x64
{5B92E328-88E3-4012-AFB2-8FE54AD8F3E1}.Release|x64.Build.0 = Release|x64
{5B92E328-88E3-4012-AFB2-8FE54AD8F3E1}.Release|x86.ActiveCfg = Release|x86
{5B92E328-88E3-4012-AFB2-8FE54AD8F3E1}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{366204C1-C307-4979-B0D7-7B143F2BACA6} = {B78E872D-D115-4B52-BC2B-746D5E38C40D}
{E047EC19-0E0F-43F6-90BC-61678E3CFF14} = {B78E872D-D115-4B52-BC2B-746D5E38C40D}
{5B92E328-88E3-4012-AFB2-8FE54AD8F3E1} = {16EA270D-4D44-44C8-904C-86FF9069D24A}
EndGlobalSection
EndGlobal
4 changes: 2 additions & 2 deletions src/iTool.DiscordBot/AudioManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public static void ResetAudioIndex()
List<AudioFile> audioindex = new List<AudioFile>();
audioindex.Add(new AudioFile()
{
Names = {string.Empty},
FileName = string.Empty
FileName = string.Empty,
Names = new List<string>()
});

File.WriteAllText(Common.AudioIndexFile,
Expand Down
147 changes: 147 additions & 0 deletions src/iTool.DiscordBot/Colors.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
namespace iTool.DiscordBot
{
public enum Colors : uint
{
AliceBlue = 0xF0F8FF,
AntiqueWhite = 0xFAEBD7,
Aqua = 0x00FFFF,
Aquamarine = 0x7FFFD4,
Azure = 0xF0FFFF,
Beige = 0xF5F5DC,
Bisque = 0xFFE4C4,
Black = 0x000000,
BlanchedAlmond = 0xFFEBCD,
Blue = 0x0000FF,
BlueViolet = 0x8A2BE2,
Brown = 0xA52A2A,
BurlyWood = 0xDEB887,
CadetBlue = 0x5F9EA0,
Chartreuse = 0x7FFF00,
Chocolate = 0xD2691E,
Coral = 0xFF7F50,
CornflowerBlue = 0x6495ED,
Cornsilk = 0xFFF8DC,
Crimson = 0xDC143C,
Cyan = 0x00FFFF,
DarkBlue = 0x00008B,
DarkCyan = 0x008B8B,
DarkGoldenrod = 0xB8860B,
DarkGray = 0xA9A9A9,
DarkGreen = 0x006400,
DarkKhaki = 0xBDB76B,
DarkMagenta = 0x8B008B,
DarkOliveGreen = 0x556B2F,
DarkOrange = 0xFF8C00,
DarkOrchid = 0x9932CC,
DarkRed = 0x8B0000,
DarkSalmon = 0xE9967A,
DarkSeaGreen = 0x8FBC8F,
DarkSlateBlue = 0x483D8B,
DarkSlateGray = 0x2F4F4F,
DarkTurquoise = 0x00CED1,
DarkViolet = 0x9400D3,
DeepPink = 0xFF1493,
DeepSkyBlue = 0x00BFFF,
DimGray = 0x696969,
DodgerBlue = 0x1E90FF,
Firebrick = 0xB22222,
FloralWhite = 0xFFFAF0,
ForestGreen = 0x228B22,
Fuchsia = 0xFF00FF,
Gainsboro = 0xDCDCDC,
GhostWhite = 0xF8F8FF,
Gold = 0xFFD700,
Goldenrod = 0xDAA520,
Gray = 0x808080,
Green = 0x008000,
GreenYellow = 0xADFF2F,
Honeydew = 0xF0FFF0,
HotPink = 0xFF69B4,
GuardsmanRed = 0xCC0000,
IndianRed = 0xCD5C5C,
Indigo = 0x4B0082,
Ivory = 0xFFFFF0,
Khaki = 0xF0E68C,
Lavender = 0xE6E6FA,
LavenderBlush = 0xFFF0F5,
LawnGreen = 0x7CFC00,
LemonChiffon = 0xFFFACD,
LightBlue = 0xADD8E6,
LightCoral = 0xF08080,
LightCyan = 0xE0FFFF,
LightGoldenrodYellow = 0xFAFAD2,
LightGray = 0xD3D3D3,
LightGreen = 0x90EE90,
LightPink = 0xFFB6C1,
LightSalmon = 0xFFA07A,
LightSeaGreen = 0x20B2AA,
LightSkyBlue = 0x87CEFA,
LightSlateGray = 0x778899,
LightSteelBlue = 0xB0C4DE,
LightYellow = 0xFFFFE0,
Lime = 0x00FF00,
LimeGreen = 0x32CD32,
Linen = 0xFAF0E6,
Magenta = 0xFF00FF,
Maroon = 0x800000,
MediumAquamarine = 0x66CDAA,
MediumBlue = 0x0000CD,
MediumOrchid = 0xBA55D3,
MediumPurple = 0x9370DB,
MediumSeaGreen = 0x3CB371,
MediumSlateBlue = 0x7B68EE,
MediumSpringGreen = 0x00FA9A,
MediumTurquoise = 0x48D1CC,
MediumVioletRed = 0xC71585,
MidnightBlue = 0x191970,
MintCream = 0xF5FFFA,
MistyRose = 0xFFE4E1,
Moccasin = 0xFFE4B5,
NavajoWhite = 0xFFDEAD,
Navy = 0x000080,
OldLace = 0xFDF5E6,
Olive = 0x808000,
OliveDrab = 0x6B8E23,
Orange = 0xFFA500,
OrangeRed = 0xFF4500,
Orchid = 0xDA70D6,
PaleGoldenrod = 0xEEE8AA,
PaleGreen = 0x98FB98,
PaleTurquoise = 0xAFEEEE,
PaleVioletRed = 0xDB7093,
PapayaWhip = 0xFFEFD5,
PeachPuff = 0xFFDAB9,
Peru = 0xCD853F,
Pink = 0xFFC0CB,
Plum = 0xDDA0DD,
PowderBlue = 0xB0E0E6,
Purple = 0x800080,
Red = 0xFF0000,
RosyBrown = 0xBC8F8F,
RoyalBlue = 0x4169E1,
SaddleBrown = 0x8B4513,
Salmon = 0xFA8072,
SandyBrown = 0xF4A460,
SeaGreen = 0x2E8B57,
SeaShell = 0xFFF5EE,
Sienna = 0xA0522D,
Silver = 0xC0C0C0,
SkyBlue = 0x87CEEB,
SlateBlue = 0x6A5ACD,
SlateGray = 0x708090,
Snow = 0xFFFAFA,
SpringGreen = 0x00FF7F,
SteelBlue = 0x4682B4,
Tan = 0xD2B48C,
Teal = 0x008080,
Thistle = 0xD8BFD8,
Tomato = 0xFF6347,
Turquoise = 0x40E0D0,
Violet = 0xEE82EE,
Wheat = 0xF5DEB3,
White = 0xFFFFFF,
WhiteSmoke = 0xF5F5F5,
Yellow = 0xFFFF00,
YellowGreen = 0x9ACD32
}
}
2 changes: 1 addition & 1 deletion src/iTool.DiscordBot/CommandHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public async Task HandleCommand(SocketMessage parameterMessage)
await message.Channel.SendMessageAsync("", embed: new EmbedBuilder()
{
Title = "Error",
Color = new Color(204, 0, 0),
Color = new Color((uint)Program.Settings.ErrorColor),
Description = result.ErrorReason
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/iTool.DiscordBot/Modules/BfH.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public async Task GetOnlinePlayers(string name = null)
await ReplyAsync("", embed: new EmbedBuilder()
{
Title = $"Online players for BfH",
Color = new Color(3, 144, 255),
Color = new Color((uint)Program.Settings.Color),
ThumbnailUrl = "https://eaassets-a.akamaihd.net/battlelog/bb/bfh/logos/bfh-logo-670296c4.png"
}
.AddField(f =>
Expand Down
4 changes: 2 additions & 2 deletions src/iTool.DiscordBot/Modules/CSGO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public async Task CSGOStats(string name = null)
await ReplyAsync("", embed: new EmbedBuilder()
{
Title = $"CS:GO stats for {name}",
Color = new Color(3, 144, 255)
Color = new Color((uint)Program.Settings.Color)
}
.AddField(f =>
{
Expand Down Expand Up @@ -85,7 +85,7 @@ public async Task CSGOLastMatch(string name = null)
await ReplyAsync("", embed: new EmbedBuilder()
{
Title = $"Last match CS:GO stats for {name}",
Color = new Color(3, 144, 255),
Color = new Color((uint)Program.Settings.Color),
}
.AddField(f =>
{
Expand Down
2 changes: 1 addition & 1 deletion src/iTool.DiscordBot/Modules/Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public async Task Blacklist(params IUser[] users)
await ReplyAsync("", embed: new EmbedBuilder()
{
Title = "Blacklist",
Color = new Color(3, 144, 255),
Color = new Color(),
Description = $"Succesfully blacklisted {string.Join(", ", blacklistedUsers)}"
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/iTool.DiscordBot/Modules/Dev.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public async Task GC()
await ReplyAsync("", embed: new EmbedBuilder()
{
Title = "Blacklist",
Color = new Color(3, 144, 255),
Color = new Color((uint)Program.Settings.Color),
Description = ":thumbsup:"
});
}
Expand Down
12 changes: 6 additions & 6 deletions src/iTool.DiscordBot/Modules/General.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public async Task Help(int help = 1)
EmbedBuilder b = new EmbedBuilder()
{
Title = "Commands",
Color = new Color(3, 144, 255),
Color = new Color((uint)Program.Settings.Color),
Description = "Returns the enabled commands in lists of 25.",
Url = "https://github.com/Bond-009/iTool.DiscordBot"
};
Expand All @@ -38,7 +38,7 @@ public async Task Help(int help = 1)
await ReplyAsync("", embed: new EmbedBuilder()
{
Title = "Help",
Color = new Color(3, 144, 255),
Color = new Color((uint)Program.Settings.Color),
Description = "No commands found",
Url = "https://github.com/Bond-009/iTool.DiscordBot"
});
Expand Down Expand Up @@ -70,7 +70,7 @@ public async Task Help(string input)
await ReplyAsync("", embed: new EmbedBuilder()
{
Title = "Command info",
Color = new Color(3, 144, 255),
Color = new Color((uint)Program.Settings.Color),
Description = "No command found",
Url = "https://github.com/Bond-009/iTool.DiscordBot"
});
Expand All @@ -81,7 +81,7 @@ public async Task Help(string input)
EmbedBuilder b = new EmbedBuilder()
{
Title = "Command info",
Color = new Color(3, 144, 255),
Color = new Color((uint)Program.Settings.Color),
Url = "https://github.com/Bond-009/iTool.DiscordBot"
};
b.AddField(f =>
Expand Down Expand Up @@ -130,7 +130,7 @@ public async Task Info()

await ReplyAsync("", embed: new EmbedBuilder()
{
Color = new Color(3, 144, 255)
Color = new Color((uint)Program.Settings.Color)
}
.AddField(f =>
{
Expand Down Expand Up @@ -195,7 +195,7 @@ public async Task UserInfo(IGuildUser user)
{
EmbedBuilder b = new EmbedBuilder()
{
Color = new Color(3, 144, 255),
Color = new Color((uint)Program.Settings.Color),
ThumbnailUrl = user.GetAvatarUrl(AvatarFormat.Png)
};
b.AddField(f =>
Expand Down
4 changes: 2 additions & 2 deletions src/iTool.DiscordBot/Modules/HOTS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public async Task HOTSStats(int region, string battleTag)
EmbedBuilder b = new EmbedBuilder()
{
Title = $"HOTS player summary for {player.Name}",
Color = new Color(3, 144, 255),
Color = new Color((uint)Program.Settings.Color),
Url = $"https://www.hotslogs.com/Player/Profile?PlayerID={player.PlayerID}",
ThumbnailUrl = "https://eu.battle.net/heroes/static/images/logos/logo.png"
}
Expand Down Expand Up @@ -57,7 +57,7 @@ public async Task HOTSStats(int playerID)
EmbedBuilder b = new EmbedBuilder()
{
Title = $"HOTS player summary for {player.Name}",
Color = new Color(3, 144, 255),
Color = new Color((uint)Program.Settings.Color),
Url = $"https://www.hotslogs.com/Player/Profile?PlayerID={player.PlayerID}",
ThumbnailUrl = "https://eu.battle.net/heroes/static/images/logos/logo.png"
}
Expand Down
4 changes: 2 additions & 2 deletions src/iTool.DiscordBot/Modules/Random.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public async Task Cat()
await ReplyAsync("", embed: new EmbedBuilder()
{
Title = "Cat",
Color = new Color(3, 144, 255),
Color = new Color((uint)Program.Settings.Color),
ImageUrl = (string)o["file"]
});
}
Expand All @@ -40,7 +40,7 @@ public async Task Dog()
await ReplyAsync("", embed: new EmbedBuilder()
{
Title = "Dog",
Color = new Color(3, 144, 255),
Color = new Color((uint)Program.Settings.Color),
ImageUrl = link
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/iTool.DiscordBot/Modules/Steam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public async Task PlayerSummaries(string name = null)
await ReplyAsync("", embed: new EmbedBuilder()
{
Title = $"Player summary fot {player.Players.First().PersonaName}",
Color = new Color(3, 144, 255),
Color = new Color((uint)Program.Settings.Color),
ThumbnailUrl = player.Players.First().AvatarMedium,
Url = player.Players.First().ProfileURL
}
Expand Down Expand Up @@ -83,7 +83,7 @@ public async Task PlayerBans(string name = null)
await ReplyAsync("", embed: new EmbedBuilder()
{
Title = $"Community, VAC, and Economy ban statuses",
Color = new Color(3, 144, 255),
Color = new Color((uint)Program.Settings.Color),
}
.AddField(f =>
{
Expand Down
2 changes: 1 addition & 1 deletion src/iTool.DiscordBot/Modules/TagModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public async Task Tag(string name)
await ReplyAsync("", embed: new EmbedBuilder()
{
Title = tag.Title,
Color = new Color(3, 144, 255),
Color = new Color((uint)Program.Settings.Color),
Description = tag.Text,
ImageUrl = tag.Attachment
});
Expand Down
Loading

0 comments on commit d9dbaf4

Please sign in to comment.