diff options
| author | Alee <Alee14498@gmail.com> | 2019-05-06 18:12:48 -0400 |
|---|---|---|
| committer | Alee <Alee14498@gmail.com> | 2019-05-06 18:12:48 -0400 |
| commit | b01892e0a1a117ad2898fcfe04072f1f35578c12 (patch) | |
| tree | 806c85e5fdba93ab0cb4a4c31ea3e4c2c86681f3 | |
| parent | 414ea5e42170386d4df79db2debc493d0eb4d393 (diff) | |
| download | AleeBot.NET-b01892e0a1a117ad2898fcfe04072f1f35578c12.tar.gz AleeBot.NET-b01892e0a1a117ad2898fcfe04072f1f35578c12.tar.bz2 AleeBot.NET-b01892e0a1a117ad2898fcfe04072f1f35578c12.zip | |
Beta 1 is now just Beta
| -rw-r--r-- | AleeBot/AleeBot.csproj | 9 | ||||
| -rw-r--r-- | AleeBot/Data.cs | 2 | ||||
| -rw-r--r-- | AleeBot/Program.cs | 21 |
3 files changed, 19 insertions, 13 deletions
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 @@ -<Project Sdk="Microsoft.NET.Sdk"> +<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> @@ -9,7 +9,7 @@ <NeutralLanguage>en</NeutralLanguage> <Company>AleeCorp</Company> <ApplicationIcon>AleeBot.ico</ApplicationIcon> - <AssemblyName>AleeBot.NET</AssemblyName> + <AssemblyName>AleeBot</AssemblyName> <RootNamespace>AleeBot</RootNamespace> <RepositoryUrl>https://github.com/AleeCorp/AleeBot.NET</RepositoryUrl> </PropertyGroup> @@ -19,9 +19,4 @@ <PackageReference Include="Newtonsoft.Json" Version="12.0.2" /> <PackageReference Include="System.IO.FileSystem" Version="4.3.0" /> </ItemGroup> - - <Target Name="PreBuild" BeforeTargets="PreBuildEvent"> - <Exec Command="" /> - </Target> - </Project> 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"); } } |
