From b01892e0a1a117ad2898fcfe04072f1f35578c12 Mon Sep 17 00:00:00 2001 From: Alee Date: Mon, 6 May 2019 18:12:48 -0400 Subject: Beta 1 is now just Beta --- AleeBot/AleeBot.csproj | 9 ++------- AleeBot/Data.cs | 2 +- AleeBot/Program.cs | 21 ++++++++++++++++----- 3 files changed, 19 insertions(+), 13 deletions(-) (limited to 'AleeBot') diff --git a/AleeBot/AleeBot.csproj b/AleeBot/AleeBot.csproj index 3e59679..3bce0a8 100644 --- a/AleeBot/AleeBot.csproj +++ b/AleeBot/AleeBot.csproj @@ -1,4 +1,4 @@ - + Exe @@ -9,7 +9,7 @@ en AleeCorp AleeBot.ico - AleeBot.NET + AleeBot AleeBot https://github.com/AleeCorp/AleeBot.NET @@ -19,9 +19,4 @@ - - - - - diff --git a/AleeBot/Data.cs b/AleeBot/Data.cs index 0f1ab10..62a5f98 100644 --- a/AleeBot/Data.cs +++ b/AleeBot/Data.cs @@ -23,7 +23,7 @@ namespace AleeBot { //This will be storing public variables such as versions and stuff. - public static string Version = "3.0 Beta 1"; + public static string Version = "3.0 Beta"; public static string prefix = "ab:"; } } diff --git a/AleeBot/Program.cs b/AleeBot/Program.cs index c996cc7..88cdce3 100644 --- a/AleeBot/Program.cs +++ b/AleeBot/Program.cs @@ -62,6 +62,8 @@ namespace AleeBot _client.MessageReceived += Message; + //await _client.SetGameAsync(); + _client.Ready += () => { Console.WriteLine("[SUCCESS] AleeBot "+ Data.Version + " is now ready!"); @@ -70,16 +72,17 @@ namespace AleeBot await Task.Delay(-1); } + private async Task Message(SocketMessage message) { if (message.Content == Data.prefix + "help") { var embed = new EmbedBuilder(); - embed.WithTitle("AleeBot.NET "+ Data.Version +" Help"); + embed.WithTitle("AleeBot.NET "+ Data.Version +" Help."); embed.WithDescription("Every command you input into AleeBot is `ab:`"); embed.WithColor(Color.Green); - embed.AddField("Commands:", "ab:help\nab:ping"); + embed.AddField("Commands:", "ab:help\nab:ping\nab:git\nab:poweroff"); await message.Channel.SendMessageAsync(embed: embed.Build()); } else if (message.Content == Data.prefix + "ping") @@ -88,9 +91,17 @@ namespace AleeBot } else if (message.Content == Data.prefix + "poweroff") { - //if (message.Author = 242775871059001344) - await message.Channel.SendMessageAsync("⚠ AleeBot will now exit!"); - Environment.Exit(0); + if (message.Author.Id == 242775871059001344) + { + await message.Channel.SendMessageAsync("⚠ AleeBot will now exit!"); + Environment.Exit(0); + } else + { + await message.Channel.SendMessageAsync("You don't have permissions to power me off..."); + } + } else if (message.Content == Data.prefix + "git") + { + await message.Channel.SendMessageAsync("Feel free to contribute in the AleeBot repo by following this link!\nhttps://github.com/AleeCorp/AleeBot.NET"); } } -- cgit v1.2.3