Exemplo n.º 1
0
        private void CreateUser(
            User requester,
            [CanBeNull]
            Message message,
            Session <TUser> session)
        {
            TUser user = ServiceProvider.CreateUser( );

            user = ServiceProvider.BindUser(requester.Id, user);

            StringBuilder builder = new StringBuilder( );

            builder.AppendLine("Your user has been created.");
            builder.AppendLine("You can bind this user to any telegram account by using following command:");
            builder.AppendLine( );
            builder.AppendLine("```");
            builder.AppendLine($"/BindToUser {user . Guid} {ServiceProvider . GetContinuationCode ( user )}");
            builder.AppendLine("```");

            // ReSharper disable once ArgumentsStyleNamedExpression
            session.ReplyText(message, builder.ToString( ), parseMode: ParseMode.Markdown);
        }