small changes

This commit is contained in:
Master Kwoth 2017-11-01 04:39:07 +01:00
parent 7beee8df70
commit e2d4576bff
8 changed files with 10 additions and 35 deletions

View File

@ -21,7 +21,7 @@ namespace NadekoBot.Modules.Gambling
private readonly IBotConfigProvider _bc; private readonly IBotConfigProvider _bc;
private readonly CurrencyService _cs; private readonly CurrencyService _cs;
private readonly NadekoRandom rng = new NadekoRandom(); private static readonly NadekoRandom rng = new NadekoRandom();
public FlipCoinCommands(IImagesService images, CurrencyService cs, IBotConfigProvider bc) public FlipCoinCommands(IImagesService images, CurrencyService cs, IBotConfigProvider bc)
{ {

View File

@ -18,7 +18,7 @@ namespace NadekoBot.Modules.Games
{ {
private readonly DiscordSocketClient _client; private readonly DiscordSocketClient _client;
private readonly string[] numbers = new string[] { ":one:", ":two:", ":three:", ":four:", ":five:", ":six:", ":seven:", ":eight:"}; private static readonly string[] numbers = new string[] { ":one:", ":two:", ":three:", ":four:", ":five:", ":six:", ":seven:", ":eight:"};
public Connect4Commands(DiscordSocketClient client) public Connect4Commands(DiscordSocketClient client)
{ {
@ -174,7 +174,7 @@ namespace NadekoBot.Modules.Games
for (int i = 0; i < Connect4Game.NumberOfColumns; i++) for (int i = 0; i < Connect4Game.NumberOfColumns; i++)
{ {
sb.Append(/*new string(' ', 1 + ((i + 1) / 2)) + */numbers[i]); sb.Append(numbers[i]);
} }
return sb.ToString(); return sb.ToString();
} }

View File

@ -50,6 +50,7 @@ namespace NadekoBot.Modules.Games
game.OnEnded += (g) => game.OnEnded += (g) =>
{ {
_service.TicTacToeGames.Remove(channel.Id); _service.TicTacToeGames.Remove(channel.Id);
_sem.Dispose();
}; };
} }
finally finally

View File

@ -12,7 +12,8 @@ namespace NadekoBot.Modules.Searches
[Group] [Group]
public class PlaceCommands : NadekoSubmodule public class PlaceCommands : NadekoSubmodule
{ {
private static string typesStr { get; } = string.Join(", ", Enum.GetNames(typeof(PlaceType))); private static readonly string _typesStr =
string.Join(", ", Enum.GetNames(typeof(PlaceType)));
public enum PlaceType public enum PlaceType
{ {
@ -30,7 +31,7 @@ namespace NadekoBot.Modules.Searches
public async Task Placelist() public async Task Placelist()
{ {
await Context.Channel.SendConfirmAsync(GetText("list_of_place_tags", Prefix), await Context.Channel.SendConfirmAsync(GetText("list_of_place_tags", Prefix),
typesStr) _typesStr)
.ConfigureAwait(false); .ConfigureAwait(false);
} }

View File

@ -1,23 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup>
<OutputPath>..\src\NadekoBot\bin\$(Configuration)\netcoreapp2.0\modules\$(AssemblyName)\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AngleSharp" Version="0.9.9" />
<PackageReference Include="Discord.Net" Version="2.0.0-alpha-build-00832" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NadekoBot.Core\NadekoBot.Core.csproj" />
</ItemGroup>
</Project>

View File

@ -33,10 +33,6 @@
<ItemGroup> <ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0" /> <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="Modules\Utility\NadekoBot.Modules.Searches.csproj" />
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'GlobalNadeko' "> <PropertyGroup Condition=" '$(Configuration)' == 'GlobalNadeko' ">
<DefineConstants>$(DefineConstants);GLOBAL_NADEKO</DefineConstants> <DefineConstants>$(DefineConstants);GLOBAL_NADEKO</DefineConstants>

View File

@ -190,7 +190,7 @@ namespace NadekoBot.Core.Services
private Task LogSuccessfulExecution(IUserMessage usrMsg, ITextChannel channel, params int[] execPoints) private Task LogSuccessfulExecution(IUserMessage usrMsg, ITextChannel channel, params int[] execPoints)
{ {
_log.Info($"S: {_client.ShardId} | Command Executed after " + string.Join("/", execPoints.Select(x => x * _oneThousandth)) + "s\n\t" + _log.Info($"Command Executed after " + string.Join("/", execPoints.Select(x => x * _oneThousandth)) + "s\n\t" +
"User: {0}\n\t" + "User: {0}\n\t" +
"Server: {1}\n\t" + "Server: {1}\n\t" +
"Channel: {2}\n\t" + "Channel: {2}\n\t" +
@ -205,7 +205,7 @@ namespace NadekoBot.Core.Services
private void LogErroredExecution(string errorMessage, IUserMessage usrMsg, ITextChannel channel, params int[] execPoints) private void LogErroredExecution(string errorMessage, IUserMessage usrMsg, ITextChannel channel, params int[] execPoints)
{ {
_log.Warn($"S: {_client.ShardId} | Command Errored after " + string.Join("/", execPoints.Select(x => x * _oneThousandth)) + "s\n\t" + _log.Warn($"Command Errored after " + string.Join("/", execPoints.Select(x => x * _oneThousandth)) + "s\n\t" +
"User: {0}\n\t" + "User: {0}\n\t" +
"Server: {1}\n\t" + "Server: {1}\n\t" +
"Channel: {2}\n\t" + "Channel: {2}\n\t" +

View File

@ -21,7 +21,7 @@ namespace NadekoBot.Core.Services.Impl
private readonly IBotCredentials _creds; private readonly IBotCredentials _creds;
private readonly DateTime _started; private readonly DateTime _started;
public const string BotVersion = "2.3.0"; public const string BotVersion = "2.3.1";
public string Author => "Kwoth#2560"; public string Author => "Kwoth#2560";
public string Library => "Discord.Net"; public string Library => "Discord.Net";