-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
439 changed files
with
1,252,036 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.30114.105 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VKBot", "VKBot\VKBot.csproj", "{276AA340-E436-46E8-A0F7-E8F557C7E307}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{276AA340-E436-46E8-A0F7-E8F557C7E307}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{276AA340-E436-46E8-A0F7-E8F557C7E307}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{276AA340-E436-46E8-A0F7-E8F557C7E307}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{276AA340-E436-46E8-A0F7-E8F557C7E307}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {84A3ADB4-18D7-4B7D-BC79-96EB3E86CACD} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<configSections> | ||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | ||
<section name="VKBot.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> | ||
</sectionGroup> | ||
</configSections> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> | ||
</startup> | ||
<userSettings> | ||
<VKBot.Properties.Settings> | ||
<setting name="TokenVk" serializeAs="String"> | ||
<value /> | ||
</setting> | ||
<setting name="TokenQIWI" serializeAs="String"> | ||
<value /> | ||
</setting> | ||
<setting name="PaymentCheck" serializeAs="String"> | ||
<value>False</value> | ||
</setting> | ||
<setting name="PaymentWait" serializeAs="String"> | ||
<value>0</value> | ||
</setting> | ||
<setting name="PaymentQueue" serializeAs="String"> | ||
<value>0</value> | ||
</setting> | ||
<setting name="IdVk" serializeAs="String"> | ||
<value /> | ||
</setting> | ||
<setting name="MarketInheritance" serializeAs="String"> | ||
<value>False</value> | ||
</setting> | ||
<setting name="UserTokenVk" serializeAs="String"> | ||
<value /> | ||
</setting> | ||
<setting name="UserVk" serializeAs="String"> | ||
<value /> | ||
</setting> | ||
<setting name="AutoStart" serializeAs="String"> | ||
<value>False</value> | ||
</setting> | ||
</VKBot.Properties.Settings> | ||
</userSettings> | ||
<runtime> | ||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
<dependentAssembly> | ||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" /> | ||
</dependentAssembly> | ||
</assemblyBinding> | ||
</runtime> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace VKBot | ||
{ | ||
class Log | ||
{ | ||
public static void Add(string message, long? userId, bool isResponse) | ||
{ | ||
try | ||
{ | ||
string[] separator = { ";;;5" }; | ||
if (!Directory.Exists($@"Logs")) | ||
Directory.CreateDirectory($@"Logs"); | ||
|
||
var today = DateTime.Now; | ||
string date = $"{(today.Day >= 10 ? today.Day.ToString() : "0" + today.Day.ToString())}.{(today.Month >= 10 ? today.Month.ToString() : "0" + today.Month.ToString())}.{today.Year}"; | ||
string time = $"{(today.Hour >= 10 ? today.Hour.ToString() : "0" + today.Hour.ToString())}:{(today.Minute >= 10 ? today.Minute.ToString() : "0" + today.Minute.ToString())}"; | ||
|
||
string path = $@"Logs\{date}.txt"; | ||
if (!File.Exists(path)) | ||
File.Create(path).Close(); | ||
|
||
Task.Factory.StartNew(() => | ||
{ | ||
File.AppendAllLines(path, new string[] { !isResponse ? $"[{time}] (MESSAGE) {userId} >>> {message}" : $"[{time}] (RESPONSE) SERVER >>> {userId}, {message}" }, Encoding.GetEncoding(1251)); | ||
}); | ||
} | ||
catch | ||
{ | ||
} | ||
} | ||
|
||
public static void Payment(string[] Info, long? userId) | ||
{ | ||
try | ||
{ | ||
string[] separator = { ";;;5" }; | ||
if (!Directory.Exists($@"Logs\Payments")) | ||
Directory.CreateDirectory($@"Logs\Payments"); | ||
|
||
var today = DateTime.Now; | ||
string date = $"{(today.Day >= 10 ? today.Day.ToString() : "0" + today.Day.ToString())}.{(today.Month >= 10 ? today.Month.ToString() : "0" + today.Month.ToString())}.{today.Year}"; | ||
string time = $"{(today.Hour >= 10 ? today.Hour.ToString() : "0" + today.Hour.ToString())}:{(today.Minute >= 10 ? today.Minute.ToString() : "0" + today.Minute.ToString())}"; | ||
|
||
string path = $@"Logs\Payments\{date}.txt"; | ||
if (!File.Exists(path)) | ||
File.Create(path).Close(); | ||
|
||
Task.Factory.StartNew(() => | ||
{ | ||
File.AppendAllLines(path, new string[] { $"{time};;;5{userId};;;5{Info[1]};;;5{Info[3]};;;5{Info[5]}" }, Encoding.GetEncoding(1251)); | ||
}); | ||
} | ||
catch | ||
{ | ||
} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.