Added support for channel creation / deletion and joining / leaving stages for Discord

This commit is contained in:
barelyprofessional
2024-08-23 12:27:31 +08:00
parent 61f54c6958
commit 840fe19430
7 changed files with 3634 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\KfChatDotNetBot\KfChatDotNetBot.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NLog" Version="5.3.3" />
</ItemGroup>
<ItemGroup>
<Content Update="NLog.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload="true"
throwExceptions="false"
internalLogLevel="Off" internalLogFile="~/nlog-internal.log">
<targets>
<target xsi:type="ColoredConsole" name="console"/>
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="console" />
</rules>
</nlog>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
// This new template sucks
using NLog;
var logger = LogManager.GetCurrentClassLogger();
logger.Info("Starting up");
var token = "authorization token!";
var proxy = "socks5://whatever:1080";
var discord = new KfChatDotNetBot.Services.DiscordService(token, proxy);
discord.StartWsClient().Wait();
logger.Info("Started");
var exitEvent = new ManualResetEvent(false);
exitEvent.WaitOne();