mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-05-27 11:40:05 +00:00
debugging bot api call
This commit is contained in:
parent
abe03abff6
commit
b118f7d103
@ -4,8 +4,10 @@ using BiblioTech.Commands;
|
||||
using BiblioTech.Rewards;
|
||||
using Discord;
|
||||
using Discord.WebSocket;
|
||||
using DiscordRewards;
|
||||
using Logging;
|
||||
using Nethereum.Model;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BiblioTech
|
||||
{
|
||||
@ -42,6 +44,18 @@ namespace BiblioTech
|
||||
return new Program().MainAsync(args);
|
||||
}
|
||||
|
||||
public static void Write(EventsAndErrors cmd)
|
||||
{
|
||||
if (Log == null) return;
|
||||
|
||||
if (cmd == null)
|
||||
{
|
||||
Log.Log("cmd is null!");
|
||||
return;
|
||||
}
|
||||
Log.Log(JsonConvert.SerializeObject(cmd));
|
||||
}
|
||||
|
||||
public async Task MainAsync(string[] args)
|
||||
{
|
||||
Log.Log("Starting Codex Discord Bot...");
|
||||
|
||||
@ -39,6 +39,8 @@ namespace BiblioTech.Rewards
|
||||
[HttpPost]
|
||||
public async Task<string> Give(EventsAndErrors cmd)
|
||||
{
|
||||
Program.Write(cmd);
|
||||
|
||||
await Safe(() => Program.ChainActivityHandler.ProcessChainActivity(cmd.ActiveChainAddresses));
|
||||
await Safe(() => Program.EventsSender.ProcessChainEvents(cmd.EventsOverview, cmd.Errors));
|
||||
return "OK";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user