Update fetch borkerPosition in bot + better HandleClosePosition + Add debug channel to receive all debug
This commit is contained in:
@@ -503,6 +503,19 @@ namespace Managing.Infrastructure.Messengers.Discord
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SendDebugMessage(string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
var channel = _client.GetChannel(_settings.DebugChannelId) as IMessageChannel;
|
||||
await channel.SendMessageAsync(message);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
SentrySdk.CaptureException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SendClosedPosition(string address, Trade oldTrade)
|
||||
{
|
||||
var fields = new List<EmbedFieldBuilder>()
|
||||
|
||||
@@ -18,12 +18,14 @@ namespace Managing.Infrastructure.Messengers.Discord
|
||||
ButtonExpirationMinutes = config.GetValue<int>("Discord:ButtonExpirationMinutes");
|
||||
HandleUserAction = config.GetValue<bool>("Discord:HandleUserAction");
|
||||
BotActivity = config.GetValue<string>("Discord:BotActivity");
|
||||
DebugChannelId = config.GetValue<ulong>("Discord:DebugChannelId");
|
||||
BotEnabled = true;
|
||||
}
|
||||
|
||||
public int ButtonExpirationMinutes { get; set; }
|
||||
public bool HandleUserAction { get; }
|
||||
public string BotActivity { get; }
|
||||
public ulong DebugChannelId { get; }
|
||||
public string Token { get; }
|
||||
public ulong SignalChannelId { get; }
|
||||
public ulong CopyTradingChannelId { get; }
|
||||
|
||||
Reference in New Issue
Block a user