Telegram 17.0.0 is terminated on cTrader 4.2
Created at 04 Apr 2022, 11:54
Telegram 17.0.0 is terminated on cTrader 4.2
04 Apr 2022, 11:54
Hi sir,
I am having a problem when using Telegram 17.0.0 (.net core 3.1) on cTrader 4.2 (beta). The Telegram simple code works on console but does not cTrader 4.2. When I run, the cTrader will be terminated. See below.
using System;
using cAlgo.API;
using Telegram.Bot;
namespace Ttt42
{
[Robot(AccessRights = AccessRights.None)]
public class Ttt42 : Robot
{
public TelegramBotClient TG;
protected override void OnStart()
{
TG = new Telegram.Bot.TelegramBotClient("token");
}
protected override void OnBar()
{
try
{
SendTG();
}
catch (Exception ex)
{
Print("Telegrame send error {0}", ex.Message);
}
}
protected async void SendTG()
{
await TG.SendTextMessageAsync("channelID", "TG from cTrader");
}
}
}
cTrader error.
Please advice,
Noppanon
amusleh
04 Apr 2022, 11:58
Hi,
Can you try it with Robot AccessRights set to FullAccess?
@amusleh